[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48517A56.20603@redhat.com>
Date: Thu, 12 Jun 2008 15:34:46 -0400
From: Masami Hiramatsu <mhiramat@...hat.com>
To: "Frank Ch. Eigler" <fche@...hat.com>
CC: Peter Zijlstra <peterz@...radead.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Hideo AOKI <haoki@...hat.com>, mingo@...e.hu,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: Kernel marker has no performance impact on ia64.
Hi Frank,
Frank Ch. Eigler wrote:
> Hi -
>
> On Thu, Jun 12, 2008 at 01:05:52PM -0400, Masami Hiramatsu wrote:
>> [...]
>>>> "sched_switch(struct task_struct * next, struct task_struct * prev)":"next %p prev %p"
>>>> out of tree. Thus, you can use the printf-style format parser.
>>> That's an interesting idea, but errors in this table would themselves
>>> only be caught at C compilation time.
>
>> Hmm, why would you think so? I think if we can't find corresponding
>> entry from the lookup table, it becomes an error.
>
> Sure, but if the entry exists but is wrong, we'd emit C code that
> won't compile.
I think if someone changes the trace point in the kernel,
Module.markers is also changed.
ex.)
DEFINE_TRACE(sched_switch, (struct task_struct * next, struct task_struct * prev),
next, prev);
if someone changes above to below,
DEFINE_TRACE(sched_switch, (int prev_pid, int next_pid), prev_pid, next_pid);
Module.markers also change like
sched_switch vmlinux (struct task_struct * next, struct task_struct * prev)
to
sched_switch vmlinux (int prev_pid, int next_pid)
In this case, the below entry never matches to new Module.markers.
"sched_switch(struct task_struct * next, struct task_struct * prev)":"next %p prev %p"
Thus, we can find an error.
However, of cause, we should take care of the task_struct changes.
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists