1LIBTRACEEVENT(3)             libtraceevent Manual             LIBTRACEEVENT(3)
2
3
4

NAME

6       tep_set_flag, tep_clear_flag, tep_test_flag - Manage flags of trace
7       event parser context.
8

SYNOPSIS

10       #include <event-parse.h>
11
12       enum tep_flag {
13               TEP_NSEC_OUTPUT,
14               TEP_DISABLE_SYS_PLUGINS,
15               TEP_DISABLE_PLUGINS
16       };
17       void tep_set_flag(struct tep_handle *tep, enum tep_flag flag);
18       void tep_clear_flag(struct tep_handle *tep, enum tep_flag flag);
19       bool tep_test_flag(struct tep_handle *tep, enum tep_flag flag);
20

DESCRIPTION

22       Trace event parser context flags are defined in enum tep_flag:
23
24           TEP_NSEC_OUTPUT - print event’s timestamp in nano seconds, instead of micro seconds.
25           TEP_DISABLE_SYS_PLUGINS - disable plugins, located in system’s plugin
26                                   directory. This directory is defined at library compile
27                                   time, and usually depends on library installation
28                                   prefix: (install_preffix)/lib/traceevent/plugins
29           TEP_DISABLE_PLUGINS - disable all library plugins:
30                                   - in system’s plugin directory
31                                   - in directory, defined by the environment variable TRACEEVENT_PLUGIN_DIR
32                                   - in user’s home directory, ~/.traceevent/plugins
33
34       Note: plugin related flags must me set before calling
35       tep_load_plugins() API.
36
37       The tep_set_flag() function sets flag to tep context.
38
39       The tep_clear_flag() function clears flag from tep context.
40
41       The tep_test_flag() function tests if flag is set to tep context.
42

RETURN VALUE

44       tep_test_flag() function returns true if flag is set, false otherwise.
45

EXAMPLE

47           #include <event-parse.h>
48           ...
49           struct tep_handle *tep = tep_alloc();
50           ...
51           /* Print timestamps in nanoseconds */
52           tep_set_flag(tep,  TEP_NSEC_OUTPUT);
53           ...
54           if (tep_test_flag(tep, TEP_NSEC_OUTPUT)) {
55                   /* print timestamps in nanoseconds */
56           } else {
57                   /* print timestamps in microseconds */
58           }
59           ...
60           /* Print timestamps in microseconds */
61           tep_clear_flag(tep, TEP_NSEC_OUTPUT);
62           ...
63

FILES

65           event-parse.h
66                   Header file to include in order to have access to the library APIs.
67           -ltraceevent
68                   Linker switch to add when building a program that uses the library.
69

SEE ALSO

71       libtraceevent(3), trace-cmd(1)
72

AUTHOR

74           Steven Rostedt <rostedt@goodmis.org[1]>, author of libtraceevent.
75           Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>, author of this man page.
76

REPORTING BUGS

78       Report bugs to <linux-trace-devel@vger.kernel.org[3]>
79

LICENSE

81       libtraceevent is Free Software licensed under the GNU LGPL 2.1
82

RESOURCES

84       https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
85

NOTES

87        1. rostedt@goodmis.org
88           mailto:rostedt@goodmis.org
89
90        2. tz.stoyanov@gmail.com
91           mailto:tz.stoyanov@gmail.com
92
93        3. linux-trace-devel@vger.kernel.org
94           mailto:linux-trace-devel@vger.kernel.org
95
96
97
98libtraceevent 1.5.3               04/15/2022                  LIBTRACEEVENT(3)
Impressum