[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45099E90.8030508@opersys.com>
Date: Thu, 14 Sep 2006 14:25:20 -0400
From: Karim Yaghmour <karim@...rsys.com>
To: Ingo Molnar <mingo@...e.hu>
CC: "Martin J. Bligh" <mbligh@...igh.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@...l.org>, Ingo Molnar <mingo@...hat.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Tom Zanussi <zanussi@...ibm.com>, ltt-dev@...fik.org,
Michel Dagenais <michel.dagenais@...ymtl.ca>
Subject: Re: [PATCH 0/11] LTTng-core (basic tracing infrastructure) 0.5.108
Ingo Molnar wrote:
> but that's not how a fair chunk of people want to use tracing. People
> (enterprise customers trying to figure out performance problems,
> engineers trying to debug things on a live, production system) want to
> be able to insert a tracepoint anywhere and anytime - and also they want
> to have zero overhead from tracing if no tracepoints are used on a
> system.
This is an implementation issue. You can easily have it so that at
the site of a marker you generate some code in a special "trace"
section of the binary which does the actual tracing and insert
noops at the marker site. Therefore the only penalty until the
tracing is enabled is the execution of additional noops.
[ note: this comes from a suggestion made by Hiramatsu-san at
this year's OLS. ]
> wrong: the original demo tracepoints that came with SystemTap still work
> on the current kernel, because the 'coupling' is loose: based on
> function names.
>
> Static tracepoints on the other hand, if added via an external patch, do
> depend on the target function not moving around and the context of the
> tracepoint not being changed. (and static tracepoints if in the source
> all the time are a constant hindrance to development and code
> readability.)
Instrumentation of function boundaries is usually not much of an issue.
Instrumentation of key events, though, is different. Here's the classic:
@@ -1709,6 +1712,7 @@ switch_tasks:
++*switch_count;
prepare_arch_switch(rq, next);
+ TRACE_SCHEDCHANGE(prev, next);
prev = context_switch(rq, prev, next);
barrier();
This is the kind of thing for which the instrumentation, be it static
or dynamic, requires some kind of intelligent analysis of where to
get the info. Now, answer honestly, wouldn't it be simpler to have
such an event marker instead of having to figure out for every kernel
binary you get where the darned probe needs to be inserted?
Karim
-
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