<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace.h, branch v2.6.30</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-04-07T21:10:10Z</updated>
<entry>
<title>Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-04-07T21:10:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-07T21:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c93f216b5b985a12a18323e5ca2eb01db3d2f000'/>
<id>urn:sha1:c93f216b5b985a12a18323e5ca2eb01db3d2f000</id>
<content type='text'>
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
  branch tracer: Fix for enabling branch profiling makes sparse unusable
  ftrace: Correct a text align for event format output
  Update /debug/tracing/README
  tracing/ftrace: alloc the started cpumask for the trace file
  tracing, x86: remove duplicated #include
  ftrace: Add check of sched_stopped for probe_sched_wakeup
  function-graph: add proper initialization for init task
  tracing/ftrace: fix missing include string.h
  tracing: fix incorrect return type of ns2usecs()
  tracing: remove CALLER_ADDR2 from wakeup tracer
  blktrace: fix pdu_len when tracing packet command requests
  blktrace: small cleanup in blk_msg_write()
  blktrace: NUL-terminate user space messages
  tracing: move scripts/trace/power.pl to scripts/tracing/power.pl
</content>
</entry>
<entry>
<title>tracing: fix incorrect return type of ns2usecs()</title>
<updated>2009-04-07T11:59:23Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2009-03-30T05:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf8e3474654f20433aab9aa35826d43b5f245008'/>
<id>urn:sha1:cf8e3474654f20433aab9aa35826d43b5f245008</id>
<content type='text'>
Impact: fix time output bug in 32bits system

ns2usecs() returns 'long', it's incorrect.

(In i386)
...
          &lt;idle&gt;-0     [000]   521.442100: _spin_lock &lt;-tick_do_update_jiffies64
          &lt;idle&gt;-0     [000]   521.442101: do_timer &lt;-tick_do_update_jiffies64
          &lt;idle&gt;-0     [000]   521.442102: update_wall_time &lt;-do_timer
          &lt;idle&gt;-0     [000]   521.442102: update_xtime_cache &lt;-update_wall_time
....
(It always print the time less than 2200 seconds besides ...)
Because 'long' is 32bits in i386. ( (1&lt;&lt;31) useconds is about 2200 seconds)

...
          &lt;idle&gt;-0     [001] 4154502640.134759: rcu_bh_qsctr_inc &lt;-__do_softirq
          &lt;idle&gt;-0     [001] 4154502640.134760: _local_bh_enable &lt;-__do_softirq
          &lt;idle&gt;-0     [001] 4154502640.134761: idle_cpu &lt;-irq_exit
...
(very large value)
Because 'long' is a signed type and it is 32bits in i386.

Changes in v2:
return 'unsigned long long' instead of 'cycle_t'

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
LKML-Reference: &lt;49D05D10.4030009@cn.fujitsu.com&gt;
Reported-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.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>kmemtrace: use tracepoints</title>
<updated>2009-04-03T10:23:06Z</updated>
<author>
<name>Eduard - Gabriel Munteanu</name>
<email>eduard.munteanu@linux360.ro</email>
</author>
<published>2009-03-23T13:12:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca2b84cb3c4a0d4d2143b46ec072cdff5d1b3b87'/>
<id>urn:sha1:ca2b84cb3c4a0d4d2143b46ec072cdff5d1b3b87</id>
<content type='text'>
kmemtrace now uses tracepoints instead of markers. We no longer need to
use format specifiers to pass arguments.

Signed-off-by: Eduard - Gabriel Munteanu &lt;eduard.munteanu@linux360.ro&gt;
[ folded: Use the new TP_PROTO and TP_ARGS to fix the build.     ]
[ folded: fix build when CONFIG_KMEMTRACE is disabled.           ]
[ folded: define tracepoints when CONFIG_TRACEPOINTS is enabled. ]
Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
LKML-Reference: &lt;ae61c0f37156db8ec8dc0d5778018edde60a92e3.1237813499.git.eduard.munteanu@linux360.ro&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace', 'tracing/kprobes', 'tracing/blktrace-v2' and 'tracing/textedit' into tracing/core-v2</title>
<updated>2009-03-31T15:46:40Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-31T15:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b54e45b0005875f59cb8b1c44d429a161d5f245'/>
<id>urn:sha1:8b54e45b0005875f59cb8b1c44d429a161d5f245</id>
<content type='text'>
</content>
</entry>
<entry>
<title>function-graph: add option for include sleep times</title>
<updated>2009-03-24T15:06:24Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-24T15:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be6f164a02f394675e2ac2077dd354cebef5b4c0'/>
<id>urn:sha1:be6f164a02f394675e2ac2077dd354cebef5b4c0</id>
<content type='text'>
Impact: give user a choice to show times spent while sleeping

The user may want to see the time a function spent sleeping.
This patch adds the trace option "sleep-time" to allow that.
The "sleep-time" option is default on.

 echo sleep-time &gt; /debug/tracing/trace_options

produces:

 ------------------------------------------
 2)  avahi-d-3428  =&gt;    &lt;idle&gt;-0
 ------------------------------------------

 2)               |      finish_task_switch() {
 2)   0.621 us    |        _spin_unlock_irq();
 2)   2.202 us    |      }
 2) ! 1002.197 us |    }
 2) ! 1003.521 us |  }

where as,

 echo nosleep-time &gt; /debug/tracing/trace_options

produces:

 0)    &lt;idle&gt;-0    =&gt;  yum-upd-3416
 ------------------------------------------

 0)               |              finish_task_switch() {
 0)   0.643 us    |                _spin_unlock_irq();
 0)   2.342 us    |              }
 0) + 41.302 us   |            }
 0) + 42.453 us   |          }

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracing/filters: use trace_seq_printf() to print filters</title>
<updated>2009-03-24T07:26:52Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2009-03-24T07:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bda2d517bfa3ce3d7044e06988cdddae7adffe2'/>
<id>urn:sha1:4bda2d517bfa3ce3d7044e06988cdddae7adffe2</id>
<content type='text'>
Impact: cleanup

Instead of just using the trace_seq buffer to print the filters, use
trace_seq_printf() as it was intended to be used.

Reported-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1237878871.8339.59.camel@charm-linux&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/events: don't use wake up for events</title>
<updated>2009-03-23T08:22:14Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-22T22:10:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07edf7121374609709ef1b0889f6e7b8d6a62ec1'/>
<id>urn:sha1:07edf7121374609709ef1b0889f6e7b8d6a62ec1</id>
<content type='text'>
Impact: fix hard-lockup with sched switch events

Some ftrace events, such as sched wakeup, can be traced
while the runqueue lock is hold. Since they are using
trace_current_buffer_unlock_commit(), they call wake_up()
which can try to grab the runqueue lock too, resulting in
a deadlock.

Now for all event, we call a new helper:
trace_nowake_buffer_unlock_commit() which do pretty the same than
trace_current_buffer_unlock_commit() except than it doesn't call
trace_wake_up().

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1237759847-21025-4-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: add per-subsystem filtering</title>
<updated>2009-03-22T17:38:47Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2009-03-22T08:31:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cfb180f3e71b2a280a254c8646a9ab1beab63f84'/>
<id>urn:sha1:cfb180f3e71b2a280a254c8646a9ab1beab63f84</id>
<content type='text'>
This patch adds per-subsystem filtering to the event tracing subsystem.

It adds a 'filter' debugfs file to each subsystem directory.  This file
can be written to to set filters; reading from it will display the
current set of filters set for that subsystem.

Basically what it does is propagate the filter down to each event
contained in the subsystem.  If a particular event doesn't have a field
with the name specified in the filter, it simply doesn't get set for
that event.  You can verify whether or not the filter was set for a
particular event by looking at the filter file for that event.

As with per-event filters, compound expressions are supported, echoing
'0' to the subsystem's filter file clears all filters in the subsystem,
etc.

Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1237710677.7703.49.camel@charm-linux&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: add per-event filtering</title>
<updated>2009-03-22T17:38:46Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2009-03-22T08:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ce7e4249921d5073e764f7ff7ad83cfa9894bd7'/>
<id>urn:sha1:7ce7e4249921d5073e764f7ff7ad83cfa9894bd7</id>
<content type='text'>
This patch adds per-event filtering to the event tracing subsystem.

It adds a 'filter' debugfs file to each event directory.  This file can
be written to to set filters; reading from it will display the current
set of filters set for that event.

Basically, any field listed in the 'format' file for an event can be
filtered on (including strings, but not yet other array types) using
either matching ('==') or non-matching ('!=') 'predicates'.  A
'predicate' can be either a single expression:

 # echo pid != 0 &gt; filter

 # cat filter
 pid != 0

or a compound expression of up to 8 sub-expressions combined using '&amp;&amp;'
or '||':

 # echo comm == Xorg &gt; filter
 # echo "&amp;&amp; sig != 29" &gt; filter

 # cat filter
 comm == Xorg
 &amp;&amp; sig != 29

Only events having field values matching an expression will be available
in the trace output; non-matching events are discarded.

Note that a compound expression is built up by echoing each
sub-expression separately - it's not the most efficient way to do
things, but it keeps the parser simple and assumes that compound
expressions will be relatively uncommon.  In any case, a subsequent
patch introducing a way to set filters for entire subsystems should
mitigate any need to do this for lots of events.

Setting a filter without an '&amp;&amp;' or '||' clears the previous filter
completely and sets the filter to the new expression:

 # cat filter
 comm == Xorg
 &amp;&amp; sig != 29

 # echo comm != Xorg

 # cat filter
 comm != Xorg

To clear a filter, echo 0 to the filter file:

 # echo 0 &gt; filter
 # cat filter
 none

The limit of 8 predicates for a compound expression is arbitrary - for
efficiency, it's implemented as an array of pointers to predicates, and
8 seemed more than enough for any filter...

Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1237710665.7703.48.camel@charm-linux&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing: add run-time field descriptions for event filtering</title>
<updated>2009-03-22T17:11:22Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2009-03-22T08:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf027f645e6aee4f0ca6197a6b6a57f327fdb13f'/>
<id>urn:sha1:cf027f645e6aee4f0ca6197a6b6a57f327fdb13f</id>
<content type='text'>
This patch makes the field descriptions defined for event tracing
available at run-time, for the event-filtering mechanism introduced
in a subsequent patch.

The common event fields are prepended with 'common_' in the format
display, allowing them to be distinguished from the other fields
that might internally have same name and can therefore be
unambiguously used in filters.

Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;1237710639.7703.46.camel@charm-linux&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
