login
Header Space

 
 

Re: [RFC PATCH 1/2] Marker probes in futex.c

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <a.p.zijlstra@...>
Cc: <prasad@...>, <linux-kernel@...>, <tglx@...>, <mingo@...>, <mathieu.desnoyers@...>
Date: Friday, April 18, 2008 - 10:29 am

Hi -

On Fri, Apr 18, 2008 at 08:46:44AM +0200, Peter Zijlstra wrote:

At least two answers apply.  The markers being put in should be chosen
with the concurrence of the subsystem maintainer, who should help
identify those key quantities that are likely to be both long-lived
and good diagnostic value.  So that's the discussion we're having
right now: which values should be passed.  If they're long-lived, then
they can be given a long-lived name - and it doesn't have to be a
low-level C variable name.  (There's no reason why we can't also have
a slew of short-lived pure-debugging sorts of markers compiled in.  A
marker naming convention like "__futex..." can be adopted for such
purposes - where nothing is promised for version n+1, just hoping to
help diagnose problems in this version.)

The other answer is that we should ensure that tools do not assume
that the set of markers is fixed.  Let's never set such an
expectation.  (In systemtap, we have several abstraction and
version-adaptation facilities that aim to hide such changes.)
The kernel guy can choose at least two methods to help tools
without contraining himself too much.  He can change

        trace_mark(futex_foo, "p1 %d p2 %d", p1, p2);

to a pair:

        trace_mark(futex_foo, "p1 %d p2 %d", 0, p2); // backward compat.
        trace_mark(futex_foo2, "p2 %d p3 %d", p2, p3); // new marker

or even just drop the backward compatibility one altogether.

It will need judicious choices by the kernel and willingness by the
tools to keep up.  Those that don't will simply notice fewer events
coming in, but nothing important *breaking*.

The current crop of tools (lttng, systemtap) are both from friendly
groups who recognize that they have more of an expendable diagnostic
rather than operational role, and thus are willing to carry that
burden.  By the time new tools will show up, we will have more
experience with the degree and type of marker changes over time, and
they won't be in a position to place new constraints on the
establishment.



Indeed.  This is why it's important for the subsystem maintainer to
wisely influence the markers as they go in.




It's not just that - it's a whole package including easy creation of
new markers, the code that manages their activation and deactivation,
the tool code that connects up to receive new events *and parameters*.
The current approach does not require tight compilation-level
coupling.  Indeed, for a new marker, the current approach requires
*no* code changes to anywhere other than the one-line inserted marker,
for tools like systemtap to connect and use them.  Cool eh?


- FChE
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 1/2] Marker probes in futex.c, K. Prasad, (Tue Apr 15, 7:53 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Tue Apr 15, 8:02 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Andrew Morton, (Fri Apr 18, 6:44 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, K. Prasad, (Tue Apr 15, 11:52 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Wed Apr 16, 11:51 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Thu Apr 17, 6:02 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Fri Apr 18, 2:46 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Sat Apr 19, 10:13 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Sat Apr 19, 10:56 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Fri Apr 18, 10:29 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Sat Apr 19, 10:52 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Sat Apr 19, 2:03 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Sat Apr 19, 2:29 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Sat Apr 19, 2:48 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Nicholas Miell, (Tue Apr 22, 1:50 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, K. Prasad, (Sat Apr 19, 8:28 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Tue Apr 15, 8:32 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Tue Apr 15, 8:56 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Tue Apr 15, 9:25 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Wed Apr 16, 11:51 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Thu Apr 17, 3:19 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Peter Zijlstra, (Fri Apr 18, 2:56 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Thu Apr 17, 4:16 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, K. Prasad, (Sat Apr 19, 8:13 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Sat Apr 19, 5:33 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Ingo Molnar, (Tue Apr 15, 9:17 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Tue Apr 15, 9:47 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Ingo Molnar, (Tue Apr 15, 12:48 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Tue Apr 15, 5:38 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Ingo Molnar, (Wed Apr 16, 9:17 am)
text_poke, vmap and vmalloc on x86_64, Mathieu Desnoyers, (Wed Apr 16, 4:10 pm)
Re: text_poke, vmap and vmalloc on x86_64, Mathieu Desnoyers, (Wed Apr 16, 5:22 pm)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Arjan van de Ven, (Wed Apr 16, 9:46 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Wed Apr 16, 10:00 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Arjan van de Ven, (Wed Apr 16, 10:24 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Wed Apr 16, 10:48 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Arjan van de Ven, (Wed Apr 16, 11:32 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Wed Apr 16, 11:39 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Ingo Molnar, (Wed Apr 16, 10:29 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Ingo Molnar, (Tue Apr 15, 10:04 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Mathieu Desnoyers, (Tue Apr 15, 10:39 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Frank Ch. Eigler, (Tue Apr 15, 10:21 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, Alexey Dobriyan, (Tue Apr 15, 8:50 am)
Re: [RFC PATCH 1/2] Marker probes in futex.c, K. Prasad, (Tue Apr 15, 12:13 pm)
speck-geostationary