[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080612164318.GB17814@redhat.com>
Date: Thu, 12 Jun 2008 12:43:18 -0400
From: "Frank Ch. Eigler" <fche@...hat.com>
To: Masami Hiramatsu <mhiramat@...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 -
On Thu, Jun 12, 2008 at 12:16:35PM -0400, Masami Hiramatsu wrote:
> [...]
> > Think this through. How should systemtap (or another user-space
> > separate-compiled tool like lttng) do this exactly?
> > [...]
> > (d) or another way?
>
> use a lookup table. we can expect that the marking points which
> regularly inserted in the upstream kernel are stable(not so
> frequently change). In that case, we can easily maintain
> a lookup table which has pairs of format strings like as
> "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. Worse, it does nothing helpful
for actually pulling out the next/prev fields of interest. Remember,
real tracing users don't care so much about the task_struct pointers,
but about observable things like PIDs. Systemtap would be back to the
debuginfo or C-header-guessing/parsing job (or embedded-C, yuck).
This is another reason why markers are a nice solution. They allow
passing of actual useful values: not just the %p pointers but the most
interesting derived values (e.g., prev->pid). And they do this
*efficiently* - in out-of-line code that imposes no measurable
overhead in the normal case..
- FChE
--
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