Re: [PATCH] tracing: create events only when configed
From: Lai Jiangshan
Date: Wed May 27 2009 - 04:22:55 EST
Steven Rostedt wrote:
> On Fri, 22 May 2009, Lai Jiangshan wrote:
>> There some unneeded events in debugfs/tracing/ftrace/ when the
>> corresponding CONFIG_XXXX=n.
>> And when CONFIG_ENABLE_EVENT_TRACING=n, various events
>> are still created.
>> Now when CONFIG_ENABLE_EVENT_TRACING=n, various events are
>> not created, trace_export.c is compiled only for creating
>> [Impact:] cleanup
> I have an issue with this patch. I purposely kept the
> debugfs/tracing/ftrace events there since you may have a binary buffer
> that you want to read that has those events but you are not running a
> kernel that enabled them. But I guess the counter arguement for that is
> then those events may not be the same offset as the kernel that ran it.
> OK, maybe it would be fine to disable the events if the kernel does not
> use them.
All these offset/format/id(except TRACE_EVENT's id) are constant
when kernel built.
Could we GENERATE all these info when kernel built?
This info will be installed to system when we 'make modules_install',
and this info will be put into kernel-XXXXX.rpm by distributions
which enable ftrace.
This will highly help for reading a binary buffer which events
are not for current running kernel. (And this binary buffer is
maybe extracted a vmcore.)
> We should also put the same #ifdef's around the structs to make
> sure no other trace uses them.
Maybe I miss something, I have no idea around WHICH structs
we should also put the same #ifdef's. ^_^
> Still seems a bit messy with all those ifdefs :-/
> The second change with the CONFIG_ENABLE_EVENT_TRACER is something that we
> are having issue with the make scripts. We want EVENT_TRACE enabled
> anytime TRACING is enabled. We do _not_ want to disable it.
Thank you for told me.
One other thing:
select STACKTRACE if STACKTRACE_SUPPORT
No other config slects EVENT_TRACING, it means TRACING and EVENT_TRACING are the same thing, can we covert all config EVENT_TRACING to config TRACING, and remove EVENT_TRACING? (or reverse)
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/