6 tep_list_events, tep_list_events_copy -
7 Get list of events, sorted by given criteria.
13 *#include <event-parse.h>*
15 enum *tep_event_sort_type* {
17 _TEP_EVENT_SORT_NAME_,
18 _TEP_EVENT_SORT_SYSTEM_,
21 struct tep_event pass:[*]pass:[*]*tep_list_events*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_);
22 struct tep_event pass:[*]pass:[*]*tep_list_events_copy*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_);
27 The _tep_list_events()_ function returns an array of pointers to the events,
28 sorted by the _sort_type_ criteria. The last element of the array is NULL.
29 The returned memory must not be freed, it is managed by the library.
30 The function is not thread safe. The _tep_ argument is trace event parser
31 context. The _sort_type_ argument is the required sort criteria:
34 _TEP_EVENT_SORT_ID_ - sort by the event ID.
35 _TEP_EVENT_SORT_NAME_ - sort by the event (name, system, id) triplet.
36 _TEP_EVENT_SORT_SYSTEM_ - sort by the event (system, name, id) triplet.
39 The _tep_list_events_copy()_ is a thread safe version of _tep_list_events()_.
40 It has the same behavior, but the returned array is allocated internally and
41 must be freed by the caller. Note that the content of the array must not be
42 freed (see the EXAMPLE below).
46 The _tep_list_events()_ function returns an array of pointers to events.
47 In case of an error, NULL is returned. The returned array must not be freed,
48 it is managed by the library.
50 The _tep_list_events_copy()_ function returns an array of pointers to events.
51 In case of an error, NULL is returned. The returned array must be freed by
58 #include <event-parse.h>
60 struct tep_handle *tep = tep_alloc();
63 struct tep_event_format **events;
66 events = tep_list_events(tep, TEP_EVENT_SORT_ID);
68 /* Failed to get the events, sorted by ID */
71 /* walk through the list of the events, sorted by ID */
77 events = tep_list_events_copy(tep, TEP_EVENT_SORT_NAME);
79 /* Failed to get the events, sorted by name */
82 /* walk through the list of the events, sorted by name */
96 Header file to include in order to have access to the library APIs.
98 Linker switch to add when building a program that uses the library.
103 _libtraceevent(3)_, _trace-cmd(1)_
109 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
110 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
114 Report bugs to <linux-trace-devel@vger.kernel.org>
118 libtraceevent is Free Software licensed under the GNU LGPL 2.1
122 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git