diff options
author | Tzvetomir Stoyanov <tstoyanov@vmware.com> | 2019-09-19 17:23:40 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-25 08:51:43 -0400 |
commit | 33c96400dcd34d572299b8106e1b0460a1b8bae9 (patch) | |
tree | cf321262c48a17d808a8429f239328d02781a91e | |
parent | 077faf3dc7cc13c3bd784613304bf38696b591da (diff) |
libtraceevent: Man pages for tep plugins APIs
Create man pages for libtraceevent APIs:
tep_load_plugins(),
tep_unload_plugin()
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/linux-trace-devel/20190903133434.30417-1-tz.stoyanov@gmail.com
Link: http://lore.kernel.org/lkml/20190919212542.216189588@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/lib/traceevent/Documentation/libtraceevent-plugins.txt | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt new file mode 100644 index 000000000000..596032ade31f --- /dev/null +++ b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt | |||
@@ -0,0 +1,99 @@ | |||
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 | ||