All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] tracing: create events only when configed
Date: Wed, 27 May 2009 16:19:10 +0800	[thread overview]
Message-ID: <4A1CF77E.20003@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0905261227470.26705@gandalf.stny.rr.com>

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
>> TRACEPOINTs.
>>
>> [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:

config EVENT_TRACING
	bool

config TRACING
	bool
	select DEBUG_FS
	select RING_BUFFER
	select STACKTRACE if STACKTRACE_SUPPORT
	select TRACEPOINTS
	select NOP_TRACER
	select BINARY_PRINTF
	select EVENT_TRACING

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)

Lai


      reply	other threads:[~2009-05-27  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22  9:40 [PATCH] tracing: create events only when configed Lai Jiangshan
2009-05-24 21:05 ` Frederic Weisbecker
2009-05-25  1:03   ` Lai Jiangshan
2009-05-25 23:18     ` Frederic Weisbecker
2009-05-26 16:38 ` Steven Rostedt
2009-05-27  8:19   ` Lai Jiangshan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1CF77E.20003@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.