<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/lib/traceevent, branch v3.16</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/tools/lib/traceevent?h=v3.16</id>
<link rel='self' href='https://git.amat.us/linux/atom/tools/lib/traceevent?h=v3.16'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-06-07T21:33:37Z</updated>
<entry>
<title>tools lib traceevent: Added support for __get_bitmask() macro</title>
<updated>2014-06-07T21:33:37Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-06-03T03:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=473a778a2f2949972b52ad7fc61577f381f2d05e'/>
<id>urn:sha1:473a778a2f2949972b52ad7fc61577f381f2d05e</id>
<content type='text'>
Coming in v3.16, trace events will be able to save bitmasks in raw
format in the ring buffer and output it with the __get_bitmask() macro.

In order for userspace tools to parse this, it must be able to handle
the __get_bitmask() call and be able to convert the data that's in
the ring buffer into a nice bitmask format. The output is similar to
what the kernel uses to print bitmasks, with a comma separator every
4 bytes (8 characters).

This allows for cpumasks to also be saved efficiently.

The first user is the thermal:thermal_power_limit event which has the
following output:

 thermal_power_limit:  cpus=0000000f freq=1900000 cdev_state=0 power=5252

Link: http://lkml.kernel.org/r/20140506132238.22e136d1@gandalf.local.home

Suggested-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Tested-by: Javi Merino &lt;javi.merino@arm.com&gt;
Link: http://lkml.kernel.org/r/20140603032224.229186537@goodmis.org
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Add options to function plugin</title>
<updated>2014-06-07T21:33:37Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-06-03T03:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=49440828ad7b809e9d31f6108875e3b1e974690c'/>
<id>urn:sha1:49440828ad7b809e9d31f6108875e3b1e974690c</id>
<content type='text'>
Add the options "parent" and "indent" to the function plugin.

When parent is set, the output looks like this:

function:             fsnotify_modify &lt;-- vfs_write
function:             zone_statistics &lt;-- get_page_from_freelist
function:                __inc_zone_state &lt;-- zone_statistics
function:                inotify_inode_queue_event &lt;-- fsnotify_modify
function:                fsnotify_parent &lt;-- fsnotify_modify
function:                __inc_zone_state &lt;-- zone_statistics
function:                   __fsnotify_parent &lt;-- fsnotify_parent
function:                   inotify_dentry_parent_queue_event &lt;-- fsnotify_parent
function:             add_to_page_cache_lru &lt;-- do_read_cache_page

When it's not set, it looks like:

function:             fsnotify_modify
function:             zone_statistics
function:                __inc_zone_state
function:                inotify_inode_queue_event
function:                fsnotify_parent
function:                __inc_zone_state
function:                   __fsnotify_parent
function:                   inotify_dentry_parent_queue_event
function:             add_to_page_cache_lru

When the otpion "indent" is not set, it looks like this:

function:             fsnotify_modify &lt;-- vfs_write
function:             zone_statistics &lt;-- get_page_from_freelist
function:             __inc_zone_state &lt;-- zone_statistics
function:             inotify_inode_queue_event &lt;-- fsnotify_modify
function:             fsnotify_parent &lt;-- fsnotify_modify
function:             __inc_zone_state &lt;-- zone_statistics
function:             __fsnotify_parent &lt;-- fsnotify_parent
function:             inotify_dentry_parent_queue_event &lt;-- fsnotify_parent
function:             add_to_page_cache_lru &lt;-- do_read_cache_page

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140603032224.056940410@goodmis.org
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Add options to plugins</title>
<updated>2014-06-07T21:33:36Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-06-03T22:41:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5827f2faabe40cc285cc67b697277547a19b6c9a'/>
<id>urn:sha1:5827f2faabe40cc285cc67b697277547a19b6c9a</id>
<content type='text'>
The traceevent plugins allows developers to have their events print out
information that is more advanced than what can be achieved by the
trace event format files.

As these plugins are used on the userspace side of the tracing tools, it
is only logical that the tools should be able to produce different types
of output for the events. The types of events still need to be defined by
the plugins thus we need a way to pass information from the tool to the
plugin to specify what type of information to be shown.

Not only does the information need to be passed by the tool to plugin, but
the plugin also requires a way to notify the tool of what options it can
provide.

This builds the plugin option infrastructure that is taken from trace-cmd
that is used to allow plugins to produce different output based on the
options specified by the tool.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140603184154.0a4c031c@gandalf.local.home
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Add flag to not load event plugins</title>
<updated>2014-06-07T21:33:36Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-06-03T03:20:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7c3196c79051f9e1a498f5be8fe6870bde5e55d'/>
<id>urn:sha1:a7c3196c79051f9e1a498f5be8fe6870bde5e55d</id>
<content type='text'>
Add a flag to pevent that will let the callers be able to set it and
keep the system, and perhaps even normal plugins from being loaded.

This is useful when plugins might hide certain information and seeing
the raw events shows what may be going on.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140603032223.678098063@goodmis.org
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Fix memory leak in pretty_print()</title>
<updated>2014-04-23T11:19:30Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-04-22T23:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=de04f8657de9d3351a2d5880f1f7080b23b798cf'/>
<id>urn:sha1:de04f8657de9d3351a2d5880f1f7080b23b798cf</id>
<content type='text'>
Commit 12e55569a244 "tools lib traceevent: Use helper trace-seq in print
functions like kernel does" added a extra trace_seq helper to process
string arguments like the kernel does it. But the difference between the
kernel and the userspace library is that the kernel's trace_seq structure
has a static allocated buffer. The userspace one has a dynamically
allocated one. It requires a trace_seq_destroy(), otherwise it produces
a nasty memory leak.

Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/20140422192330.6bb09bf8@gandalf.local.home
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Fix backward compatibility macros for pevent filter enums</title>
<updated>2014-04-23T11:19:23Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-04-22T02:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4508793541140723ab862d83095f6b5141d24e49'/>
<id>urn:sha1:4508793541140723ab862d83095f6b5141d24e49</id>
<content type='text'>
The return value for pevent_filter_match() is suppose to return FILTER_NONE
if the event doesn't have a filter, and FILTER_NOEXIST if there is no filter
at all. But the change 41e12e580a7 "tools lib traceevent: Refactor
pevent_filter_match() to get rid of die()" replaced the return value
with PEVENT_ERRNO__* values and added "backward compatibility" macros
that used the old names. Unfortunately, the NOEXIST and NONE macros were
swapped, and this broke users that use the old return names.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/20140421222346.0351ced4@gandalf.local.home
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Do not call warning() directly</title>
<updated>2014-04-14T10:55:00Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-03-19T01:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e9e5dfd86b9fdea8c75bae42cba052901b94f78'/>
<id>urn:sha1:9e9e5dfd86b9fdea8c75bae42cba052901b94f78</id>
<content type='text'>
The patch 3a3ffa2e82205 ("tools lib traceevent: Report better error
message on bad function args") added the error message but it seems
there's no reason to call warning() directly.

So change it to do_warning_event() to provide event information too.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/1395192174-26273-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Print event name when show warning if possible</title>
<updated>2014-04-14T10:55:00Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-03-19T01:22:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3388cc3eb848154d0f2a0cd01542201d0d0fdad7'/>
<id>urn:sha1:3388cc3eb848154d0f2a0cd01542201d0d0fdad7</id>
<content type='text'>
It's sometimes useful to know where the parse failure was occurred.  Add
do_warning_event() macro to see the failing event.

It now shows the messages like below:

  $ perf test 5
   5: parse events tests                                     :  Warning: [kvmmmu:kvm_mmu_get_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_sync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_unsync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_prepare_zap_page] bad op token {
    Warning: [kvmmmu:fast_page_fault] function is_writable_pte not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_commit] function sizeof not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_start] function sizeof not defined
    Warning: [xen:xen_mmu_set_pgd] function sizeof not defined
    Warning: [xen:xen_mmu_set_pud] function sizeof not defined
    Warning: [xen:xen_mmu_set_pmd] function sizeof not defined
    ...

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/1395192174-26273-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix traceevent plugin path definitions</title>
<updated>2014-01-23T18:48:12Z</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@fedoraproject.org</email>
</author>
<published>2014-01-22T15:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b935a58dbff457c27fd63e1e1bb29db20b2ee6a8'/>
<id>urn:sha1:b935a58dbff457c27fd63e1e1bb29db20b2ee6a8</id>
<content type='text'>
The plugindir_SQ definition contains $(prefix) which is not needed as
the $(libdir) definition already contains prefix in it.  This leads to
the path including an extra prefix in it, e.g. /usr/usr/lib64.

The -DPLUGIN_DIR defintion includes DESTDIR.  This is incorrect, as it
sets the plugin search path to include the value of DESTDIR.  DESTDIR is
a mechanism to install in a non-standard location such as a chroot or an
RPM build root.  In the RPM case, this leads to the search path being
incorrect after the resulting RPM is installed (or in some cases an RPM
build failure).

Remove both of these unnecessary inclusions.

Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Acked-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/20140122150147.GK16455@hansolo.jdub.homelinux.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Unregister handler when xen plugin is unloaded</title>
<updated>2014-01-16T19:26:25Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-01-16T02:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf6b3a95ff439b1dcd6151b3f38810f3cec1e319'/>
<id>urn:sha1:bf6b3a95ff439b1dcd6151b3f38810f3cec1e319</id>
<content type='text'>
The function handler should be unregistered when the plugin is unloaded
otherwise it'll try to access invalid memory.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: http://lkml.kernel.org/r/1389839478-5887-13-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
