Re: Kernel marker has no performance impact on ia64.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Wednesday, June 4, 2008 - 4:22 pm

* Peter Zijlstra (peterz@infradead.org) wrote:

Not exactly. Something more along the lines of

static inline void 
trace_sched_switch(struct task_struct *prev, struct task_struct *next)
{
  /* Internal tracers. */
  ftrace_sched_switch(prev, next);
  othertracer_sched_switch(prev, next);
  /*
   * System-wide tracing. Useful information is exported here.
   * Probes connecting to these markers are expected to only use the
   * information provided to them for data collection purpose. Type
   * casting pointers is discouraged.
   */
	trace_mark(kernel_sched_switch, "prev_pid %d next_pid %d prev_state %ld",
    prev->pid, next->pid, prev->state);
}


It would make much more sense to put this formatting information along
with the trace point (e.g. in a a kernel/sched-trace.h header) rather
that to hide it in a tracer (loadable module) because this information
is an interface to the trace point.


I totally agree with you that not having the capacity to inspect pointer
types is a problem for tracers which wants to receive the "raw" pointer
and deal with the data they need like big boys. On the other hand, it
requires them to be closely tied to the kernel internals and therefore
it makes sense to call them directly from the tracing site, thus
bypassing the marker format string.

However, letting the marker specify the data format so a tracer could
format it into a memory buffer (in a binary or text format, depending on
the implementation) or so that a tool like systemtap can use this
identified information without having to be closely tied to the kernel
makes sense to me.

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Kernel marker has no performance impact on ia64., Hideo AOKI, (Mon Jun 2, 3:12 pm)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Mon Jun 2, 3:32 pm)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Mon Jun 2, 4:21 pm)
RE: Kernel marker has no performance impact on ia64., Takashi Nishiie, (Mon Jun 2, 11:07 pm)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Tue Jun 3, 9:58 pm)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Wed Jun 4, 3:27 pm)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Wed Jun 4, 4:22 pm)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Wed Jun 4, 4:26 pm)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Wed Jun 4, 4:40 pm)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Thu Jun 5, 1:12 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Thu Jun 5, 7:28 am)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Thu Jun 12, 6:53 am)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Thu Jun 12, 7:04 am)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Thu Jun 12, 7:27 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Thu Jun 12, 8:31 am)
Re: Kernel marker has no performance impact on ia64., Frank Ch. Eigler, (Thu Jun 12, 8:53 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Thu Jun 12, 9:16 am)
Re: Kernel marker has no performance impact on ia64., Frank Ch. Eigler, (Thu Jun 12, 9:43 am)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Thu Jun 12, 9:53 am)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Thu Jun 12, 9:56 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Thu Jun 12, 10:05 am)
Re: Kernel marker has no performance impact on ia64., Frank Ch. Eigler, (Thu Jun 12, 10:38 am)
Re: Kernel marker has no performance impact on ia64., Frank Ch. Eigler, (Thu Jun 12, 10:48 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Thu Jun 12, 12:34 pm)
Re: Kernel marker has no performance impact on ia64., Mathieu Desnoyers, (Thu Jun 12, 3:10 pm)
RE: Kernel marker has no performance impact on ia64., Takashi Nishiie, (Thu Jun 12, 9:19 pm)
Re: Kernel marker has no performance impact on ia64., Peter Zijlstra, (Fri Jun 13, 4:01 am)
Re: Kernel marker has no performance impact on ia64., Frank Ch. Eigler, (Fri Jun 13, 7:17 am)
Re: Kernel marker has no performance impact on ia64., Masami Hiramatsu, (Fri Jun 13, 11:02 am)
RE: Kernel marker has no performance impact on ia64., Takashi Nishiie, (Sun Jun 15, 7:58 pm)