From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr700081.outbound.protection.outlook.com ([40.107.70.81]:24265 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726381AbeK1Clt (ORCPT ); Tue, 27 Nov 2018 21:41:49 -0500 From: Tzvetomir Stoyanov To: "rostedt@goodmis.org" CC: "linux-trace-devel@vger.kernel.org" Subject: [PATCH v3 39/46] tools/lib/traceevent: Man pages for tep_load_plugins() and tep_unload_plugin() Date: Tue, 27 Nov 2018 15:42:57 +0000 Message-ID: <20181127154153.11315-40-tstoyanov@vmware.com> References: <20181127154153.11315-1-tstoyanov@vmware.com> In-Reply-To: <20181127154153.11315-1-tstoyanov@vmware.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Create man pages for tep_load_plugins() and tep_unload_plugin() as part of the libtraceevent APIs. Signed-off-by: Tzvetomir Stoyanov --- .../Documentation/libtraceevent-plugins.txt | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugin= s.txt diff --git a/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt b= /tools/lib/traceevent/Documentation/libtraceevent-plugins.txt new file mode 100644 index 000000000000..7b3acdab3133 --- /dev/null +++ b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt @@ -0,0 +1,98 @@ +libtraceevent(3) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +NAME +---- +tep_load_plugins,tep_unload_plugins - Load / unload traceevent plugins + +SYNOPSIS +-------- +[verse] +-- +*#include * + +struct tep_plugin_list pass:[*]*tep_load_plugins*(struct tep_handle pass:[= *]_tep_); +void *tep_unload_plugins*(struct tep_plugin_list pass:[*]_plugin_list_, st= ruct tep_handle pass:[*]_tep_); +-- + +DESCRIPTION +----------- +The _tep_load_plugins()_ function loads all plugins, located in the plugin= =20 +directories. The _tep_ argument is trace event parser context.=20 +The plugin directories are : +[verse] +-- + - System's plugin directory, defined at the library compile time. It=20 + depends on the library installation prefix and usually is=20 + _(install_preffix)/lib/traceevent/plugins_ + - Directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_ + - User's plugin directory, located at _~/.traceevent/plugins_=20 +--=20 +Loading of plugins can be controlled by the _tep_flags_, using the=20 +_tep_set_flag()_ API: +[verse] +-- + _TEP_DISABLE_SYS_PLUGINS_ - do not load plugins, located in=20 + the system's plugin directory. + _TEP_DISABLE_PLUGINS_ - do not load any plugins. +-- +The _tep_set_flag()_ API must be called before _tep_load_plugins()_. + +The _tep_unload_plugins()_ function unloads the plugins, previously loaded= by +_tep_load_plugins()_. The _tep_ argument is trace event parser context. Th= e=20 +_plugin_list_ is the list of loaded plugins, returned by the _tep_load_plu= gins()_ +function. + +RETURN VALUE +------------ +The _tep_load_plugins()_ function returns a list of successfully loaded pl= ugins,=20 +or NULL in case no plugins are loaded. =20 + +EXAMPLE +------- +[source,c] +-- +#include +... +struct tep_handle *tep =3D tep_alloc(); +... +struct tep_plugin_list *plugins =3D tep_load_plugins(tep); +if (plugins =3D=3D NULL) { + /* no plugins are loaded */ +} +... +tep_unload_plugins(plugins, tep); +-- + +FILES +----- +[verse] +-- +*event-parse.h* + Header file to include in order to have access to the library APIs. +*-ltraceevent* + Linker switch to add when building a program that uses the library. +-- + +SEE ALSO +-------- +_libtraceevent(3)_, _trace-cmd(1)_, _tep_set_flag(3)_ + +AUTHOR +------ +[verse] +-- +*Steven Rostedt* , author of *libtraceevent*. +*Tzvetomir Stoyanov* , author of this man page. +-- +REPORTING BUGS +-------------- +Report bugs to + +LICENSE +------- +libtraceevent is Free Software licensed under the GNU LGPL 2.1 + +RESOURCES +--------- +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --=20 2.19.1