cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

libtraceevent-set_flag.txt (2618B)


      1libtraceevent(3)
      2================
      3
      4NAME
      5----
      6tep_set_flag, tep_clear_flag, tep_test_flag -
      7Manage flags of trace event parser context.
      8
      9SYNOPSIS
     10--------
     11[verse]
     12--
     13*#include <event-parse.h>*
     14
     15enum *tep_flag* {
     16	_TEP_NSEC_OUTPUT_,
     17	_TEP_DISABLE_SYS_PLUGINS_,
     18	_TEP_DISABLE_PLUGINS_
     19};
     20void *tep_set_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
     21void *tep_clear_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
     22bool *tep_test_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
     23--
     24
     25DESCRIPTION
     26-----------
     27Trace event parser context flags are defined in *enum tep_flag*:
     28[verse]
     29--
     30_TEP_NSEC_OUTPUT_ - print event's timestamp in nano seconds, instead of micro seconds.
     31_TEP_DISABLE_SYS_PLUGINS_ - disable plugins, located in system's plugin
     32			directory. This directory is defined at library compile
     33			time, and usually depends on library installation
     34			prefix: (install_preffix)/lib/traceevent/plugins
     35_TEP_DISABLE_PLUGINS_ - disable all library plugins:
     36			- in system's plugin directory
     37			- in directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_
     38			- in user's home directory, _~/.traceevent/plugins_
     39--
     40Note: plugin related flags must me set before calling _tep_load_plugins()_ API.
     41
     42The _tep_set_flag()_ function sets _flag_ to _tep_ context.
     43
     44The _tep_clear_flag()_ function clears _flag_ from _tep_ context.
     45
     46The _tep_test_flag()_ function tests if _flag_ is set to _tep_ context.
     47
     48RETURN VALUE
     49------------
     50_tep_test_flag()_ function returns true if _flag_ is set, false otherwise.
     51
     52EXAMPLE
     53-------
     54[source,c]
     55--
     56#include <event-parse.h>
     57...
     58struct tep_handle *tep = tep_alloc();
     59...
     60/* Print timestamps in nanoseconds */
     61tep_set_flag(tep,  TEP_NSEC_OUTPUT);
     62...
     63if (tep_test_flag(tep, TEP_NSEC_OUTPUT)) {
     64	/* print timestamps in nanoseconds */
     65} else {
     66	/* print timestamps in microseconds */
     67}
     68...
     69/* Print timestamps in microseconds */
     70tep_clear_flag(tep, TEP_NSEC_OUTPUT);
     71...
     72--
     73FILES
     74-----
     75[verse]
     76--
     77*event-parse.h*
     78	Header file to include in order to have access to the library APIs.
     79*-ltraceevent*
     80	Linker switch to add when building a program that uses the library.
     81--
     82
     83SEE ALSO
     84--------
     85_libtraceevent(3)_, _trace-cmd(1)_
     86
     87AUTHOR
     88------
     89[verse]
     90--
     91*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
     92*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
     93--
     94REPORTING BUGS
     95--------------
     96Report bugs to  <linux-trace-devel@vger.kernel.org>
     97
     98LICENSE
     99-------
    100libtraceevent is Free Software licensed under the GNU LGPL 2.1
    101
    102RESOURCES
    103---------
    104https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git