1libtraceevent(3) 2================ 3 4NAME 5---- 6tep_load_plugins, tep_unload_plugins - Load / unload traceevent plugins. 7 8SYNOPSIS 9-------- 10[verse] 11-- 12*#include <event-parse.h>* 13 14struct tep_plugin_list pass:[*]*tep_load_plugins*(struct tep_handle pass:[*]_tep_); 15void *tep_unload_plugins*(struct tep_plugin_list pass:[*]_plugin_list_, struct tep_handle pass:[*]_tep_); 16-- 17 18DESCRIPTION 19----------- 20The _tep_load_plugins()_ function loads all plugins, located in the plugin 21directories. The _tep_ argument is trace event parser context. 22The plugin directories are : 23[verse] 24-- 25 - System's plugin directory, defined at the library compile time. It 26 depends on the library installation prefix and usually is 27 _(install_preffix)/lib/traceevent/plugins_ 28 - Directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_ 29 - User's plugin directory, located at _~/.local/lib/traceevent/plugins_ 30-- 31Loading of plugins can be controlled by the _tep_flags_, using the 32_tep_set_flag()_ API: 33[verse] 34-- 35 _TEP_DISABLE_SYS_PLUGINS_ - do not load plugins, located in 36 the system's plugin directory. 37 _TEP_DISABLE_PLUGINS_ - do not load any plugins. 38-- 39The _tep_set_flag()_ API needs to be called before _tep_load_plugins()_, if 40loading of all plugins is not the desired case. 41 42The _tep_unload_plugins()_ function unloads the plugins, previously loaded by 43_tep_load_plugins()_. The _tep_ argument is trace event parser context. The 44_plugin_list_ is the list of loaded plugins, returned by 45the _tep_load_plugins()_ function. 46 47RETURN VALUE 48------------ 49The _tep_load_plugins()_ function returns a list of successfully loaded plugins, 50or NULL in case no plugins are loaded. 51 52EXAMPLE 53------- 54[source,c] 55-- 56#include <event-parse.h> 57... 58struct tep_handle *tep = tep_alloc(); 59... 60struct tep_plugin_list *plugins = tep_load_plugins(tep); 61if (plugins == NULL) { 62 /* no plugins are loaded */ 63} 64... 65tep_unload_plugins(plugins, tep); 66-- 67 68FILES 69----- 70[verse] 71-- 72*event-parse.h* 73 Header file to include in order to have access to the library APIs. 74*-ltraceevent* 75 Linker switch to add when building a program that uses the library. 76-- 77 78SEE ALSO 79-------- 80_libtraceevent(3)_, _trace-cmd(1)_, _tep_set_flag(3)_ 81 82AUTHOR 83------ 84[verse] 85-- 86*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*. 87*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page. 88-- 89REPORTING BUGS 90-------------- 91Report bugs to <linux-trace-devel@vger.kernel.org> 92 93LICENSE 94------- 95libtraceevent is Free Software licensed under the GNU LGPL 2.1 96 97RESOURCES 98--------- 99https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 100