From patchwork Thu Jun 13 13:26:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzvetomir Stoyanov X-Patchwork-Id: 10992183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D8FD1398 for ; Thu, 13 Jun 2019 15:15:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2867120CCF for ; Thu, 13 Jun 2019 15:15:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18171212BE; Thu, 13 Jun 2019 15:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CDED20572 for ; Thu, 13 Jun 2019 15:15:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732241AbfFMPPH (ORCPT ); Thu, 13 Jun 2019 11:15:07 -0400 Received: from mail-eopbgr740042.outbound.protection.outlook.com ([40.107.74.42]:46048 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732238AbfFMN0T (ORCPT ); Thu, 13 Jun 2019 09:26:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mDOLgw7VyMnDy+6CQb70rmGb1+NQTjtBCMdBWZMLpSk=; b=Iz3VRf6bqLrxyDCfhFv7medZO+gNp1UB95eTTdcHRoNT+BqUBZXUSfDNg/s3Nfr+xybTkIgxUAh9ZkFcnshEQ5XFBfAN63FwAF06D24q5SPzyWt59S++dNaTHbV1/7JBzM4VgTV5a+EFQSiaAlEFmWszUi0WFLEPpve2Ytkh6Rw= Received: from DM6PR05MB4044.namprd05.prod.outlook.com (20.176.71.154) by DM6PR05MB4956.namprd05.prod.outlook.com (20.177.221.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.11; Thu, 13 Jun 2019 13:26:12 +0000 Received: from DM6PR05MB4044.namprd05.prod.outlook.com ([fe80::c5ce:1ccd:9894:2181]) by DM6PR05MB4044.namprd05.prod.outlook.com ([fe80::c5ce:1ccd:9894:2181%7]) with mapi id 15.20.1987.010; Thu, 13 Jun 2019 13:26:12 +0000 From: Tzvetomir Stoyanov To: "rostedt@goodmis.org" CC: "linux-trace-devel@vger.kernel.org" Subject: [PATCH v6 2/2] tools/lib/traceevent: Man pages for tep plugins APIs Thread-Topic: [PATCH v6 2/2] tools/lib/traceevent: Man pages for tep plugins APIs Thread-Index: AQHVIeuRvG5chiAIhUu2X2fiqEUWqA== Date: Thu, 13 Jun 2019 13:26:12 +0000 Message-ID: <20190613132559.24704-2-tstoyanov@vmware.com> References: <20190613132559.24704-1-tstoyanov@vmware.com> In-Reply-To: <20190613132559.24704-1-tstoyanov@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR09CA0111.eurprd09.prod.outlook.com (2603:10a6:803:78::34) To DM6PR05MB4044.namprd05.prod.outlook.com (2603:10b6:5:8f::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=tstoyanov@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [146.247.46.5] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 452b0bcf-9682-4229-8bda-08d6f002b41f x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:DM6PR05MB4956; x-ms-traffictypediagnostic: DM6PR05MB4956: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0067A8BA2A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(376002)(136003)(39860400002)(346002)(396003)(199004)(189003)(1730700003)(66476007)(2351001)(2501003)(5640700003)(2906002)(73956011)(7736002)(446003)(66946007)(52116002)(66066001)(26005)(81156014)(81166006)(86362001)(11346002)(71190400001)(71200400001)(66556008)(486006)(8676002)(6486002)(305945005)(64756008)(476003)(66446008)(6436002)(316002)(2616005)(8936002)(6306002)(1076003)(4326008)(14444005)(50226002)(6506007)(6916009)(76176011)(256004)(186003)(5660300002)(6512007)(99286004)(68736007)(386003)(6116002)(102836004)(36756003)(3846002)(53936002)(25786009)(478600001)(14454004)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR05MB4956;H:DM6PR05MB4044.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: zIz0YNjJ/mcpMKEiIeD2FzmirvhJcd4GLQrk0GxlpIT0AOAQl6lrVkItlO8gE4PeowzuMQZb/C/PStwPNqpvQ0DDd2xj3+TPR7rc3pjyCCK02Mms8agpLzEnFDnYGMX6qTW9kzLLpRnuQFhpj838Y9+YkzN2e2F9lNNWy2My0/BdyFaJafs+U9hkG7/sWh3BdFf+GNz8534BEtN55Q3kfZc3KQRg10y7On4SNMr/23Ksyqr6EIEvYmLu9mv3PJEEr2vkRRxmbdxkXeYKoJC/Tkz03C6Vm3GYIaODbzlVKIBT0MTqfxVfoUcqm4xhDvcXqvsFE6uZ6mdIrXIwPGTl/7qjQ4ValGmBMIa1WjFnOfquMAtpklF1WbTKtZQXbPdHUaE/hGanBy7kiO1mNQT+KvI459TjiF8/Qbvs5e5GhDQ= MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 452b0bcf-9682-4229-8bda-08d6f002b41f X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jun 2019 13:26:12.5718 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tstoyanov@vmware.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4956 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Create man pages for libtraceevent APIs: tep_load_plugins(), tep_unload_plugin() Signed-off-by: Tzvetomir Stoyanov --- .../Documentation/libtraceevent-plugins.txt | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugins.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..b8c0525c7312 --- /dev/null +++ b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt @@ -0,0 +1,98 @@ +libtraceevent(3) +================ + +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_, struct tep_handle pass:[*]_tep_); +-- + +DESCRIPTION +----------- +The _tep_load_plugins()_ function loads all plugins, located in the plugin +directories. The _tep_ argument is trace event parser context. +The plugin directories are : +[verse] +-- + - System's plugin directory, defined at the library compile time. It + depends on the library installation prefix and usually is + _(install_preffix)/lib/traceevent/plugins_ + - Directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_ + - User's plugin directory, located at _~/.config/traceevent/plugins_ +-- +Loading of plugins can be controlled by the _tep_flags_, using the +_tep_set_flag()_ API: +[verse] +-- + _TEP_DISABLE_SYS_PLUGINS_ - do not load plugins, located in + 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. The +_plugin_list_ is the list of loaded plugins, returned by +the _tep_load_plugins()_ function. + +RETURN VALUE +------------ +The _tep_load_plugins()_ function returns a list of successfully loaded plugins, +or NULL in case no plugins are loaded. + +EXAMPLE +------- +[source,c] +-- +#include +... +struct tep_handle *tep = tep_alloc(); +... +struct tep_plugin_list *plugins = tep_load_plugins(tep); +if (plugins == 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