<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/trace_export.c, branch v3.14-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/trace/trace_export.c?h=v3.14-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/trace/trace_export.c?h=v3.14-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-11-05T21:50:20Z</updated>
<entry>
<title>tracing: Update event filters for multibuffer</title>
<updated>2013-11-05T21:50:20Z</updated>
<author>
<name>Tom Zanussi</name>
<email>tom.zanussi@linux.intel.com</email>
</author>
<published>2013-10-24T13:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f306cc82a93d6b19f01634b80c580b9755c8b7cc'/>
<id>urn:sha1:f306cc82a93d6b19f01634b80c580b9755c8b7cc</id>
<content type='text'>
The trace event filters are still tied to event calls rather than
event files, which means you don't get what you'd expect when using
filters in the multibuffer case:

Before:

  # echo 'bytes_alloc &gt; 8192' &gt; /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  bytes_alloc &gt; 8192
  # mkdir /sys/kernel/debug/tracing/instances/test1
  # echo 'bytes_alloc &gt; 2048' &gt; /sys/kernel/debug/tracing/instances/test1/events/kmem/kmalloc/filter
  # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  bytes_alloc &gt; 2048
  # cat /sys/kernel/debug/tracing/instances/test1/events/kmem/kmalloc/filter
  bytes_alloc &gt; 2048

Setting the filter in tracing/instances/test1/events shouldn't affect
the same event in tracing/events as it does above.

After:

  # echo 'bytes_alloc &gt; 8192' &gt; /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  bytes_alloc &gt; 8192
  # mkdir /sys/kernel/debug/tracing/instances/test1
  # echo 'bytes_alloc &gt; 2048' &gt; /sys/kernel/debug/tracing/instances/test1/events/kmem/kmalloc/filter
  # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/filter
  bytes_alloc &gt; 8192
  # cat /sys/kernel/debug/tracing/instances/test1/events/kmem/kmalloc/filter
  bytes_alloc &gt; 2048

We'd like to just move the filter directly from ftrace_event_call to
ftrace_event_file, but there are a couple cases that don't yet have
multibuffer support and therefore have to continue using the current
event_call-based filters.  For those cases, a new USE_CALL_FILTER bit
is added to the event_call flags, whose main purpose is to keep the
old behavior for those cases until they can be updated with
multibuffer support; at that point, the USE_CALL_FILTER flag (and the
new associated call_filter_check_discard() function) can go away.

The multibuffer support also made filter_current_check_discard()
redundant, so this change removes that function as well and replaces
it with filter_check_discard() (or call_filter_check_discard() as
appropriate).

Link: http://lkml.kernel.org/r/f16e9ce4270c62f46b2e966119225e1c3cca7e60.1382620672.git.tom.zanussi@linux.intel.com

Signed-off-by: Tom Zanussi &lt;tom.zanussi@linux.intel.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix some section mismatch warnings</title>
<updated>2013-03-15T04:34:54Z</updated>
<author>
<name>Li Zefan</name>
<email>lizefan@huawei.com</email>
</author>
<published>2013-03-04T06:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=523c81135bb23b2d9a8c21365d90d21b1309c138'/>
<id>urn:sha1:523c81135bb23b2d9a8c21365d90d21b1309c138</id>
<content type='text'>
As we've added __init annotation to field-defining functions, we should
add __refdata annotation to event_call variables, which reference those
functions.

Link: http://lkml.kernel.org/r/51343C1F.2050502@huawei.com

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Annotate event field-defining functions with __init</title>
<updated>2013-03-15T04:34:51Z</updated>
<author>
<name>Li Zefan</name>
<email>lizefan@huawei.com</email>
</author>
<published>2013-02-21T02:33:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7e4f44b153e1ec07bb64c1c1671cdf492465bbf3'/>
<id>urn:sha1:7e4f44b153e1ec07bb64c1c1671cdf492465bbf3</id>
<content type='text'>
Those functions are called either during kernel boot or module init.

Before:

$ dmesg | grep 'Freeing unused kernel memory'
Freeing unused kernel memory: 1208k freed
Freeing unused kernel memory: 1360k freed
Freeing unused kernel memory: 1960k freed

After:

$ dmesg | grep 'Freeing unused kernel memory'
Freeing unused kernel memory: 1236k freed
Freeing unused kernel memory: 1388k freed
Freeing unused kernel memory: 1960k freed

Link: http://lkml.kernel.org/r/5125877D.5000201@huawei.com

Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Do not enable function event with enable</title>
<updated>2012-05-10T19:55:43Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-05-10T19:55:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b63776fa3ca96c4ecda76f6fa947b7b0add66ac'/>
<id>urn:sha1:9b63776fa3ca96c4ecda76f6fa947b7b0add66ac</id>
<content type='text'>
With the adding of function tracing event to perf, it caused a
side effect that produces the following warning when enabling all
events in ftrace:

 # echo 1 &gt; /sys/kernel/debug/tracing/events/enable

[console]
event trace: Could not enable event function

This is because when enabling all events via the debugfs system
it ignores events that do not have a -&gt;reg() function assigned.
This was to skip over the ftrace internal events (as they are
not TRACE_EVENTs). But as the ftrace function event now has
a -&gt;reg() function attached to it for use with perf, it is no
longer ignored.

Worse yet, this -&gt;reg() function is being called when it should
not be. It returns an error and causes the above warning to
be printed.

By adding a new event_call flag (TRACE_EVENT_FL_IGNORE_ENABLE)
and have all ftrace internel event structures have it set,
setting the events/enable will no longe try to incorrectly enable
the function event and does not warn.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent</title>
<updated>2012-03-24T07:19:09Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2012-03-24T07:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=04a54d27ce9698d108d29c8a6a50c28f7446336b'/>
<id>urn:sha1:04a54d27ce9698d108d29c8a6a50c28f7446336b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tracing: Fix ftrace stack trace entries</title>
<updated>2012-03-22T16:19:23Z</updated>
<author>
<name>Wolfgang Mauerer</name>
<email>wolfgang.mauerer@siemens.com</email>
</author>
<published>2012-03-22T10:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=01de982abf8c9e10fc3089e10585cd2cc914bdab'/>
<id>urn:sha1:01de982abf8c9e10fc3089e10585cd2cc914bdab</id>
<content type='text'>
8 hex characters tell only half the tale for 64 bit CPUs,
so use the appropriate length.

Link: http://lkml.kernel.org/r/1332411501-8059-2-git-send-email-wolfgang.mauerer@siemens.com

Cc: stable@vger.kernel.org
Signed-off-by: Wolfgang Mauerer &lt;wolfgang.mauerer@siemens.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Allow to specify filter field type for ftrace events</title>
<updated>2012-02-21T16:08:29Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2012-02-15T14:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02aa3162edaa166a01d193f80ccde890be8b55da'/>
<id>urn:sha1:02aa3162edaa166a01d193f80ccde890be8b55da</id>
<content type='text'>
Adding FILTER_TRACE_FN event field type for function tracepoint
event, so it can be properly recognized within filtering code.

Currently all fields of ftrace subsystem events share the common
field type FILTER_OTHER. Since the function trace fields need
special care within the filtering code we need to recognize it
properly, hence adding the FILTER_TRACE_FN event type.

Adding filter parameter to the FTRACE_ENTRY macro, to specify the
filter field type for the event.

Link: http://lkml.kernel.org/r/1329317514-8131-7-git-send-email-jolsa@redhat.com

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace, perf: Add support to use function tracepoint in perf</title>
<updated>2012-02-21T16:08:27Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2012-02-15T14:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ced39002f5ea736b716ae233fb68b26d59783912'/>
<id>urn:sha1:ced39002f5ea736b716ae233fb68b26d59783912</id>
<content type='text'>
Adding perf registration support for the ftrace function event,
so it is now possible to register it via perf interface.

The perf_event struct statically contains ftrace_ops as a handle
for function tracer. The function tracer is registered/unregistered
in open/close actions.

To be efficient, we enable/disable ftrace_ops each time the traced
process is scheduled in/out (via TRACE_REG_PERF_(ADD|DELL) handlers).
This way tracing is enabled only when the process is running.
Intentionally using this way instead of the event's hw state
PERF_HES_STOPPED, which would not disable the ftrace_ops.

It is now possible to use function trace within perf commands
like:

  perf record -e ftrace:function ls
  perf stat -e ftrace:function ls

Allowed only for root.

Link: http://lkml.kernel.org/r/1329317514-8131-6-git-send-email-jolsa@redhat.com

Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace: Add FTRACE_ENTRY_REG macro to allow event registration</title>
<updated>2012-02-21T16:08:26Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2012-02-15T14:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e59a0bff3ecf389951e3c9378ddfd00f6448bfaa'/>
<id>urn:sha1:e59a0bff3ecf389951e3c9378ddfd00f6448bfaa</id>
<content type='text'>
Adding FTRACE_ENTRY_REG macro so particular ftrace entries
could specify registration function and thus become accesible
via perf.

This will be used in upcomming patch for function trace.

Link: http://lkml.kernel.org/r/1329317514-8131-5-git-send-email-jolsa@redhat.com

Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Replace trace_event struct array with pointer array</title>
<updated>2011-02-03T02:37:13Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-01-27T14:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e4a9ea5ee7c8812a7bf0c3fb725ceeaa3d4c2fcc'/>
<id>urn:sha1:e4a9ea5ee7c8812a7bf0c3fb725ceeaa3d4c2fcc</id>
<content type='text'>
Currently the trace_event structures are placed in the _ftrace_events
section, and at link time, the linker makes one large array of all
the trace_event structures. On boot up, this array is read (much like
the initcall sections) and the events are processed.

The problem is that there is no guarantee that gcc will place complex
structures nicely together in an array format. Two structures in the
same file may be placed awkwardly, because gcc has no clue that they
are suppose to be in an array.

A hack was used previous to force the alignment to 4, to pack the
structures together. But this caused alignment issues with other
architectures (sparc).

Instead of packing the structures into an array, the structures' addresses
are now put into the _ftrace_event section. As pointers are always the
natural alignment, gcc should always pack them tightly together
(otherwise initcall, extable, etc would also fail).

By having the pointers to the structures in the section, we can still
iterate the trace_events without causing unnecessary alignment problems
with other architectures, or depending on the current behaviour of
gcc that will likely change in the future just to tick us kernel developers
off a little more.

The _ftrace_event section is also moved into the .init.data section
as it is now only needed at boot up.

Suggested-by: David Miller &lt;davem@davemloft.net&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
