David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | libtraceevent(3) |
| 2 | ================ |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | tep_load_plugins, tep_unload_plugins - Load / unload traceevent plugins. |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | -- |
| 12 | *#include <event-parse.h>* |
| 13 | |
| 14 | struct tep_plugin_list pass:[*]*tep_load_plugins*(struct tep_handle pass:[*]_tep_); |
| 15 | void *tep_unload_plugins*(struct tep_plugin_list pass:[*]_plugin_list_, struct tep_handle pass:[*]_tep_); |
| 16 | -- |
| 17 | |
| 18 | DESCRIPTION |
| 19 | ----------- |
| 20 | The _tep_load_plugins()_ function loads all plugins, located in the plugin |
| 21 | directories. The _tep_ argument is trace event parser context. |
| 22 | The 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 | -- |
| 31 | Loading 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 | -- |
| 39 | The _tep_set_flag()_ API needs to be called before _tep_load_plugins()_, if |
| 40 | loading of all plugins is not the desired case. |
| 41 | |
| 42 | The _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 |
| 45 | the _tep_load_plugins()_ function. |
| 46 | |
| 47 | RETURN VALUE |
| 48 | ------------ |
| 49 | The _tep_load_plugins()_ function returns a list of successfully loaded plugins, |
| 50 | or NULL in case no plugins are loaded. |
| 51 | |
| 52 | EXAMPLE |
| 53 | ------- |
| 54 | [source,c] |
| 55 | -- |
| 56 | #include <event-parse.h> |
| 57 | ... |
| 58 | struct tep_handle *tep = tep_alloc(); |
| 59 | ... |
| 60 | struct tep_plugin_list *plugins = tep_load_plugins(tep); |
| 61 | if (plugins == NULL) { |
| 62 | /* no plugins are loaded */ |
| 63 | } |
| 64 | ... |
| 65 | tep_unload_plugins(plugins, tep); |
| 66 | -- |
| 67 | |
| 68 | FILES |
| 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 | |
| 78 | SEE ALSO |
| 79 | -------- |
| 80 | _libtraceevent(3)_, _trace-cmd(1)_, _tep_set_flag(3)_ |
| 81 | |
| 82 | AUTHOR |
| 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 | -- |
| 89 | REPORTING BUGS |
| 90 | -------------- |
| 91 | Report bugs to <linux-trace-devel@vger.kernel.org> |
| 92 | |
| 93 | LICENSE |
| 94 | ------- |
| 95 | libtraceevent is Free Software licensed under the GNU LGPL 2.1 |
| 96 | |
| 97 | RESOURCES |
| 98 | --------- |
| 99 | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |