6 tep_get_event, tep_get_first_event, tep_get_events_count - Access events.
12 *#include <event-parse.h>*
14 struct tep_event pass:[*]*tep_get_event*(struct tep_handle pass:[*]_tep_, int _index_);
15 struct tep_event pass:[*]*tep_get_first_event*(struct tep_handle pass:[*]_tep_);
16 int *tep_get_events_count*(struct tep_handle pass:[*]_tep_);
21 The _tep_get_event()_ function returns a pointer to event at the given _index_.
22 The _tep_ argument is trace event parser context, the _index_ is the index of
25 The _tep_get_first_event()_ function returns a pointer to the first event.
26 As events are stored in an array, this function returns the pointer to the
27 beginning of the array. The _tep_ argument is trace event parser context.
29 The _tep_get_events_count()_ function returns the number of the events
30 in the array. The _tep_ argument is trace event parser context.
34 The _tep_get_event()_ returns a pointer to the event located at _index_.
35 NULL is returned in case of error, in case there are no events or _index_ is
38 The _tep_get_first_event()_ returns a pointer to the first event. NULL is
39 returned in case of error, or in case there are no events.
41 The _tep_get_events_count()_ returns the number of the events. 0 is
42 returned in case of error, or in case there are no events.
48 #include <event-parse.h>
50 struct tep_handle *tep = tep_alloc();
52 int i,count = tep_get_events_count(tep);
53 struct tep_event *event, *events = tep_get_first_event(tep);
56 /* There are no events */
58 for (i = 0; i < count; i++) {
60 /* process events[i] */
63 /* Get the last event */
64 event = tep_get_event(tep, count-1);
73 Header file to include in order to have access to the library APIs.
75 Linker switch to add when building a program that uses the library.
80 _libtraceevent(3)_, _trace-cmd(1)_
86 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
87 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
91 Report bugs to <linux-trace-devel@vger.kernel.org>
95 libtraceevent is Free Software licensed under the GNU LGPL 2.1
99 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git