<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/lib/traceevent/parse-filter.c, branch v6.0</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=v6.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-12-06T20:37:22Z</updated>
<entry>
<title>libtraceevent: Add __rel_loc relative location attribute support</title>
<updated>2021-12-06T20:37:22Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2021-11-22T09:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd7729043b31b32b34daaa6775e255b76de7f976'/>
<id>urn:sha1:cd7729043b31b32b34daaa6775e255b76de7f976</id>
<content type='text'>
Add '__rel_loc' new dynamic data location attribute which encodes
the data location from the next to the field itself. This is similar
to the '__data_loc' but the location offset is not from the event
entry but from the next of the field.

This patch adds '__rel_loc' decoding support in the libtraceevent.

Link: https://lkml.kernel.org/r/163757343994.510314.13241077597729303802.stgit@devnote2

Cc: Beau Belgrave &lt;beaub@linux.microsoft.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Tom Zanussi &lt;zanussi@kernel.org&gt;
Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Hide non API functions</title>
<updated>2020-10-13T14:47:38Z</updated>
<author>
<name>Tzvetomir Stoyanov (VMware)</name>
<email>tz.stoyanov@gmail.com</email>
</author>
<published>2020-09-30T11:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a41c32105cc12a7d2ae11a591929a6add98987cd'/>
<id>urn:sha1:a41c32105cc12a7d2ae11a591929a6add98987cd</id>
<content type='text'>
There are internal library functions, which are not declared as a static.
They are used inside the library from different files. Hide them from
the library users, as they are not part of the API.
These functions are made hidden and are renamed without the prefix "tep_":
 tep_free_plugin_paths
 tep_peek_char
 tep_buffer_init
 tep_get_input_buf_ptr
 tep_get_input_buf
 tep_read_token
 tep_free_token
 tep_free_event
 tep_free_format_field
 __tep_parse_format

Link: https://lore.kernel.org/linux-trace-devel/e4afdd82deb5e023d53231bb13e08dca78085fb0.camel@decadent.org.uk/
Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Tzvetomir Stoyanov (VMware) &lt;tz.stoyanov@gmail.com&gt;
Reviewed-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/lkml/20200930110733.280534-1-tz.stoyanov@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Take care of return value of asprintf</title>
<updated>2020-04-18T12:05:00Z</updated>
<author>
<name>He Zhe</name>
<email>zhe.he@windriver.com</email>
</author>
<published>2020-02-20T01:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8ff18be1f5c6ba1c2befb043bea6e7eaf9f8987'/>
<id>urn:sha1:f8ff18be1f5c6ba1c2befb043bea6e7eaf9f8987</id>
<content type='text'>
According to the API, if memory allocation wasn't possible, or some
other error occurs, asprintf will return -1, and the contents of strp
below are undefined.

  int asprintf(char **strp, const char *fmt, ...);

This patch takes care of return value of asprintf to make it less error
prone and prevent the following build warning.

  ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: He Zhe &lt;zhe.he@windriver.com&gt;
Reviewed-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Cc: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: hewenliang4@huawei.com
Link: http://lore.kernel.org/lkml/1582163930-233692-1-git-send-email-zhe.he@windriver.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Fix memory leakage in filter_event</title>
<updated>2019-12-20T21:47:50Z</updated>
<author>
<name>Hewenliang</name>
<email>hewenliang4@huawei.com</email>
</author>
<published>2019-12-09T06:35:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f84ae29a6169318f9c929720c49d96323d2bbab9'/>
<id>urn:sha1:f84ae29a6169318f9c929720c49d96323d2bbab9</id>
<content type='text'>
It is necessary to call free_arg(arg) when add_filter_type() returns NULL
in filter_event().

Signed-off-by: Hewenliang &lt;hewenliang4@huawei.com&gt;
Reviewed-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Cc: Feilong Lin &lt;linfeilong@huawei.com&gt;
Cc: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Link: http://lore.kernel.org/lkml/20191209063549.59941-1-hewenliang4@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>libtraceevent: Fix memory leakage in copy_filter_type</title>
<updated>2019-11-22T13:48:14Z</updated>
<author>
<name>Hewenliang</name>
<email>hewenliang4@huawei.com</email>
</author>
<published>2019-11-19T01:44:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=10992af6bf46a2048ad964985a5b77464e5563b1'/>
<id>urn:sha1:10992af6bf46a2048ad964985a5b77464e5563b1</id>
<content type='text'>
It is necessary to free the memory that we have allocated when error occurs.

Fixes: ef3072cd1d5c ("tools lib traceevent: Get rid of die in add_filter_type()")
Signed-off-by: Hewenliang &lt;hewenliang4@huawei.com&gt;
Reviewed-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Cc: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Link: http://lore.kernel.org/lkml/20191119014415.57210-1-hewenliang4@huawei.com
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Rename input arguments and local variables of libtraceevent from pevent to tep</title>
<updated>2019-04-01T18:18:10Z</updated>
<author>
<name>Tzvetomir Stoyanov</name>
<email>tstoyanov@vmware.com</email>
</author>
<published>2019-04-01T16:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9bd7796959a8b92afe79c392dd54992bfc67328'/>
<id>urn:sha1:c9bd7796959a8b92afe79c392dd54992bfc67328</id>
<content type='text'>
"pevent" to "tep" renaming of:
 - all "pevent" input arguments of libtraceevent internal functions.
 - all local "pevent" variables of libtraceevent.

This makes the implementation consistent with the chosen naming
convention, tep (trace event parser), and will avoid any confusion with
the old pevent name

Signed-off-by: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-5-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.944953447@goodmis.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools, tools lib traceevent: Rename "pevent" member of struct tep_event_filter to "tep"</title>
<updated>2019-04-01T18:18:10Z</updated>
<author>
<name>Tzvetomir Stoyanov</name>
<email>tstoyanov@vmware.com</email>
</author>
<published>2019-04-01T16:43:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b1f4c426a60387f1291d2ba3838c7b0914be12f'/>
<id>urn:sha1:6b1f4c426a60387f1291d2ba3838c7b0914be12f</id>
<content type='text'>
The member "pevent" of the struct tep_event_filter is renamed to "tep".
This makes the struct consistent with the chosen naming convention:

  tep (trace event parser), instead of the old pevent.

Signed-off-by: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-4-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.785896189@goodmis.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools, tools lib traceevent: Rename "pevent" member of struct tep_event to "tep"</title>
<updated>2019-04-01T18:18:10Z</updated>
<author>
<name>Tzvetomir Stoyanov</name>
<email>tstoyanov@vmware.com</email>
</author>
<published>2019-04-01T16:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69769ce159cbfd7567815a86cfc3ea63423de61b'/>
<id>urn:sha1:69769ce159cbfd7567815a86cfc3ea63423de61b</id>
<content type='text'>
The member "pevent" of the struct tep_event is renamed to "tep". This
makes the struct consistent with the chosen naming convention:

  tep (trace event parser), instead of the old pevent.

Signed-off-by: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-3-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.627724996@goodmis.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Rename input arguments of libtraceevent APIs from pevent to tep</title>
<updated>2019-04-01T18:18:09Z</updated>
<author>
<name>Tzvetomir Stoyanov</name>
<email>tstoyanov@vmware.com</email>
</author>
<published>2019-04-01T16:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=047ff221e3ab07129a3566683e95a4d142f7c3c0'/>
<id>urn:sha1:047ff221e3ab07129a3566683e95a4d142f7c3c0</id>
<content type='text'>
Input arguments of libtraceevent APIs are renamed from "struct
tep_handle *pevent" to "struct tep_handle *tep". This makes the API
consistent with the chosen naming convention: tep (trace event parser),
instead of the old pevent.

Signed-off-by: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-2-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.465573837@goodmis.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib traceevent: Remove call to exit() from tep_filter_add_filter_str()</title>
<updated>2019-04-01T18:18:09Z</updated>
<author>
<name>Tzvetomir Stoyanov</name>
<email>tstoyanov@vmware.com</email>
</author>
<published>2019-04-01T16:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fea6b632235b9bedc58c72cd24f1865bb0c365db'/>
<id>urn:sha1:fea6b632235b9bedc58c72cd24f1865bb0c365db</id>
<content type='text'>
This patch removes call to exit() from tep_filter_add_filter_str(). A
library function should not force the application to exit. In the
current implementation tep_filter_add_filter_str() calls exit() when a
special "test_filters" mode is set, used only for debugging purposes.
When this mode is set and a filter is added - its string is printed to
the console and exit() is called. This patch changes the logic - when in
"test_filters" mode, the filter string is still printed, but the exit()
is not called. It is up to the application to track when "test_filters"
mode is set and to call exit, if needed.

Signed-off-by: Tzvetomir Stoyanov &lt;tstoyanov@vmware.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20190326154328.28718-9-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190401164344.121717482@goodmis.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
