Re: [PATCH 4/4] tracing/events: add trace-events-sample

From: Christoph Hellwig
Date: Thu Apr 16 2009 - 13:00:59 EST


On Tue, Apr 14, 2009 at 11:15:15PM -0400, Steven Rostedt wrote:
> +++ b/samples/trace_events/Makefile
> @@ -0,0 +1,8 @@
> +# builds the trace events example kernel modules;
> +# then to use one (as root): insmod <module_name.ko>
> +
> +PWD := $(shell pwd)
> +
> +CFLAGS_trace-events-sample.o := -I$(PWD)/samples/trace_events/

CFLAGS_trace-events-sample.o += -I$(src)

That should better be written as. But you'd easily get rid of that
by just including the file using #include "foo.h" instead of <foo.h>,
no?

> --- /dev/null
> +++ b/samples/trace_events/trace-events-sample.h
> @@ -0,0 +1,124 @@
> +/*
> + * Notice that this file is not protected like a normal header.
> + * We also must allow for rereading of this file. The
> + *
> + * || defined(TRACE_HEADER_MULTI_READ)
> + *
> + * serves this purpose.
> + */
> +#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
> +#define _TRACE_EVENT_SAMPLE_H

Why do we need this protection at all? It only be included by the users
of the tracepoints, and it seems just fair to take some more than normal
precaution for more than unusual magic headers.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/