<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_sched_switch.c, branch v3.6-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace/trace_sched_switch.c?h=v3.6-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace/trace_sched_switch.c?h=v3.6-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-02-08T22:14:56Z</updated>
<entry>
<title>tracing: Remove obsolete sched_switch tracer</title>
<updated>2011-02-08T22:14:56Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-02-08T18:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87d80de2800d087ea833cb79bc13f85ff34ed49f'/>
<id>urn:sha1:87d80de2800d087ea833cb79bc13f85ff34ed49f</id>
<content type='text'>
The trace events sched_switch and sched_wakeup do the same thing
as the stand alone sched_switch tracer does. It is no longer needed.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Let tracepoints have data passed to tracepoint callbacks</title>
<updated>2010-05-14T13:50:34Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2010-04-20T21:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38516ab59fbc5b3bb278cf5e1fe2867c70cff32e'/>
<id>urn:sha1:38516ab59fbc5b3bb278cf5e1fe2867c70cff32e</id>
<content type='text'>
This patch adds data to be passed to tracepoint callbacks.

The created functions from DECLARE_TRACE() now need a mandatory data
parameter. For example:

DECLARE_TRACE(mytracepoint, int value, value)

Will create the register function:

int register_trace_mytracepoint((void(*)(void *data, int value))probe,
                                void *data);

As the first argument, all callbacks (probes) must take a (void *data)
parameter. So a callback for the above tracepoint will look like:

void myprobe(void *data, int value)
{
}

The callback may choose to ignore the data parameter.

This change allows callbacks to register a private data pointer along
with the function probe.

	void mycallback(void *data, int value);

	register_trace_mytracepoint(mycallback, mydata);

Then the mycallback() will receive the "mydata" as the first parameter
before the args.

A more detailed example:

  DECLARE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));

  /* In the C file */

  DEFINE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));

  [...]

       trace_mytracepoint(status);

  /* In a file registering this tracepoint */

  int my_callback(void *data, int status)
  {
	struct my_struct my_data = data;
	[...]
  }

  [...]
	my_data = kmalloc(sizeof(*my_data), GFP_KERNEL);
	init_my_data(my_data);
	register_trace_mytracepoint(my_callback, my_data);

The same callback can also be registered to the same tracepoint as long
as the data registered is different. Note, the data must also be used
to unregister the callback:

	unregister_trace_mytracepoint(my_callback, my_data);

Because of the data parameter, tracepoints declared this way can not have
no args. That is:

  DECLARE_TRACE(mytracepoint, TP_PROTO(void), TP_ARGS());

will cause an error.

If no arguments are needed, a new macro can be used instead:

  DECLARE_TRACE_NOARGS(mytracepoint);

Since there are no arguments, the proto and args fields are left out.

This is part of a series to make the tracepoint footprint smaller:

   text	   data	    bss	    dec	    hex	filename
4913961	1088356	 861512	6863829	 68bbd5	vmlinux.orig
4914025	1088868	 861512	6864405	 68be15	vmlinux.class
4918492	1084612	 861512	6864616	 68bee8	vmlinux.tracepoint

Again, this patch also increases the size of the kernel, but
lays the ground work for decreasing it.

 v5: Fixed net/core/drop_monitor.c to handle these updates.

 v4: Moved the DECLARE_TRACE() DECLARE_TRACE_NOARGS out of the
     #ifdef CONFIG_TRACE_POINTS, since the two are the same in both
     cases. The __DECLARE_TRACE() is what changes.
     Thanks to Frederic Weisbecker for pointing this out.

 v3: Made all register_* functions require data to be passed and
     all callbacks to take a void * parameter as its first argument.
     This makes the calling functions comply with C standards.

     Also added more comments to the modifications of DECLARE_TRACE().

 v2: Made the DECLARE_TRACE() have the ability to pass arguments
     and added a new DECLARE_TRACE_NOARGS() for tracepoints that
     do not need any arguments.

Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>sched: Remove rq argument to the tracepoints</title>
<updated>2010-05-07T09:28:17Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-05-04T18:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27a9da6538ee18046d7bff8e36a9f783542c54c3'/>
<id>urn:sha1:27a9da6538ee18046d7bff8e36a9f783542c54c3</id>
<content type='text'>
struct rq isn't visible outside of sched.o so its near useless to
expose the pointer, also there are no users of it, so remove it.

Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1272997616.1642.207.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: pass around ring buffer instead of tracer</title>
<updated>2009-09-04T22:59:39Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-09-02T18:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e77405ad80f53966524b5c31244e13fbbbecbd84'/>
<id>urn:sha1:e77405ad80f53966524b5c31244e13fbbbecbd84</id>
<content type='text'>
The latency tracers (irqsoff and wakeup) can swap trace buffers
on the fly. If an event is happening and has reserved data on one of
the buffers, and the latency tracer swaps the global buffer with the
max buffer, the result is that the event may commit the data to the
wrong buffer.

This patch changes the API to the trace recording to be recieve the
buffer that was used to reserve a commit. Then this buffer can be passed
in to the commit.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Move sched event insertion helpers in the sched switch tracer file</title>
<updated>2009-08-06T05:28:06Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-07-29T16:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=82e04af498a85ba425efe77580b7ba08234411df'/>
<id>urn:sha1:82e04af498a85ba425efe77580b7ba08234411df</id>
<content type='text'>
The sched events helpers which insert the sched switch and wakeup
events into the ring buffer currently reside in trace.c
But this file is quite overloaded and the right place for these helpers
is in the sched switch tracer file.

Then move them to trace_functions.c

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/events: move trace point headers into include/trace/events</title>
<updated>2009-04-15T02:05:43Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-04-14T23:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad8d75fff811a6a230f7f43b05a6483099349533'/>
<id>urn:sha1:ad8d75fff811a6a230f7f43b05a6483099349533</id>
<content type='text'>
Impact: clean up

Create a sub directory in include/trace called events to keep the
trace point headers in their own separate directory. Only headers that
declare trace points should be defined in this directory.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: clean up enable logic for sched_switch</title>
<updated>2009-04-07T12:43:09Z</updated>
<author>
<name>Zhaolei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2009-03-31T07:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dcef788eb9659b61a2110284fcce3ca6e63480d2'/>
<id>urn:sha1:dcef788eb9659b61a2110284fcce3ca6e63480d2</id>
<content type='text'>
Unify sched_switch and sched_wakeup's action to following logic:
Do record_cmdline when start_cmdline_record() is called.
Start tracing events when the tracer is started.

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
LKML-Reference: &lt;49D1C596.5050203@cn.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Add check of sched_stopped for probe_sched_wakeup</title>
<updated>2009-04-07T12:01:11Z</updated>
<author>
<name>Zhaolei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2009-03-31T07:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bcae09b93e7f96f700b6bb372c2b3f2b36636dc'/>
<id>urn:sha1:8bcae09b93e7f96f700b6bb372c2b3f2b36636dc</id>
<content type='text'>
The wakeup tracing in sched_switch does not stop when a user
disables tracing. This is because the probe_sched_wakeup() is missing
the check to prevent the wakeup from being traced.

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
LKML-Reference: &lt;49D1C543.3010307@cn.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: make sched_switch stop/start light weight</title>
<updated>2009-03-18T03:10:45Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-17T23:59:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5fec6ddcb43a91aa9a254c8ecf174c803de6f07e'/>
<id>urn:sha1:5fec6ddcb43a91aa9a254c8ecf174c803de6f07e</id>
<content type='text'>
The stopping and starting of a tracer should be light weight and
be able to be called in all contexts. The sched_switch grabbed
mutexes in the start/stop functions. This patch changes it to a
simple variable, on/off.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracing/core: use appropriate waiting on trace_pipe</title>
<updated>2009-02-18T00:40:20Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-02-11T01:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6eaaa5d57e76c454479833fc8594cd7c3b75c789'/>
<id>urn:sha1:6eaaa5d57e76c454479833fc8594cd7c3b75c789</id>
<content type='text'>
Impact: api and pipe waiting change

Currently, the waiting used in tracing_read_pipe() is done through a
100 msecs schedule_timeout() loop which periodically check if there
are traces on the buffer.

This can cause small latencies for programs which are reading the incoming
events.

This patch makes the reader waiting for the trace_wait waitqueue except
for few tracers such as the sched and functions tracers which might be
already hold the runqueue lock while waking up the reader.

This is performed through a new callback wait_pipe() on struct tracer.
If none is implemented on a specific tracer, the default waiting for
trace_wait queue is attached.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
