0001 libtraceevent(3)
0002 ================
0003
0004 NAME
0005 ----
0006 tep_set_flag, tep_clear_flag, tep_test_flag -
0007 Manage flags of trace event parser context.
0008
0009 SYNOPSIS
0010 --------
0011 [verse]
0012 --
0013 *#include <event-parse.h>*
0014
0015 enum *tep_flag* {
0016 _TEP_NSEC_OUTPUT_,
0017 _TEP_DISABLE_SYS_PLUGINS_,
0018 _TEP_DISABLE_PLUGINS_
0019 };
0020 void *tep_set_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
0021 void *tep_clear_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
0022 bool *tep_test_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
0023 --
0024
0025 DESCRIPTION
0026 -----------
0027 Trace event parser context flags are defined in *enum tep_flag*:
0028 [verse]
0029 --
0030 _TEP_NSEC_OUTPUT_ - print event's timestamp in nano seconds, instead of micro seconds.
0031 _TEP_DISABLE_SYS_PLUGINS_ - disable plugins, located in system's plugin
0032 directory. This directory is defined at library compile
0033 time, and usually depends on library installation
0034 prefix: (install_preffix)/lib/traceevent/plugins
0035 _TEP_DISABLE_PLUGINS_ - disable all library plugins:
0036 - in system's plugin directory
0037 - in directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_
0038 - in user's home directory, _~/.traceevent/plugins_
0039 --
0040 Note: plugin related flags must me set before calling _tep_load_plugins()_ API.
0041
0042 The _tep_set_flag()_ function sets _flag_ to _tep_ context.
0043
0044 The _tep_clear_flag()_ function clears _flag_ from _tep_ context.
0045
0046 The _tep_test_flag()_ function tests if _flag_ is set to _tep_ context.
0047
0048 RETURN VALUE
0049 ------------
0050 _tep_test_flag()_ function returns true if _flag_ is set, false otherwise.
0051
0052 EXAMPLE
0053 -------
0054 [source,c]
0055 --
0056 #include <event-parse.h>
0057 ...
0058 struct tep_handle *tep = tep_alloc();
0059 ...
0060 /* Print timestamps in nanoseconds */
0061 tep_set_flag(tep, TEP_NSEC_OUTPUT);
0062 ...
0063 if (tep_test_flag(tep, TEP_NSEC_OUTPUT)) {
0064 /* print timestamps in nanoseconds */
0065 } else {
0066 /* print timestamps in microseconds */
0067 }
0068 ...
0069 /* Print timestamps in microseconds */
0070 tep_clear_flag(tep, TEP_NSEC_OUTPUT);
0071 ...
0072 --
0073 FILES
0074 -----
0075 [verse]
0076 --
0077 *event-parse.h*
0078 Header file to include in order to have access to the library APIs.
0079 *-ltraceevent*
0080 Linker switch to add when building a program that uses the library.
0081 --
0082
0083 SEE ALSO
0084 --------
0085 _libtraceevent(3)_, _trace-cmd(1)_
0086
0087 AUTHOR
0088 ------
0089 [verse]
0090 --
0091 *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
0092 *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
0093 --
0094 REPORTING BUGS
0095 --------------
0096 Report bugs to <linux-trace-devel@vger.kernel.org>
0097
0098 LICENSE
0099 -------
0100 libtraceevent is Free Software licensed under the GNU LGPL 2.1
0101
0102 RESOURCES
0103 ---------
0104 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git