From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBDEFC04AAF for ; Sat, 18 May 2019 09:17:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 903A320848 for ; Sat, 18 May 2019 09:17:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="tnR30kg3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729756AbfERJRS (ORCPT ); Sat, 18 May 2019 05:17:18 -0400 Received: from terminus.zytor.com ([198.137.202.136]:41579 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbfERJRS (ORCPT ); Sat, 18 May 2019 05:17:18 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x4I9GqRk1738189 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 18 May 2019 02:16:52 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x4I9GqRk1738189 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019041745; t=1558171013; bh=X3T+S5appoGgHpeNsyH3nRX7Sl+SK02lAbpgeubM8BI=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=tnR30kg3quv9Cu87B4fV6EjXVLMdheh4z62q3mFWzYWGoEaEiJfwWAa3G6zWZgnAL mjalZDkLppV4JGD4wZudyRGa2q9FVmyX2jbx1Th3QDS43h46l+edS4hs97T9Euk1ql BR6DmO0o60ew7pkhhequ0va+rutzyVoaYD44/3SUu8M/C4C4zj1Ul4IkD9hUASK4DP twmzV2HSpPH9r3ZqZgLvdxYWC76VqH/1EY2uV9Dnacnn5nNvzfcslA+/hzK7pnHAqb qmAD64FMUfnGmmrku+DqSkhOzOn/r1gXhz8pH7dygKRztgPrwuqi0mPJWE1WcGIkqB Sjxyd4iKC2BlQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x4I9GqWr1738186; Sat, 18 May 2019 02:16:52 -0700 Date: Sat, 18 May 2019 02:16:52 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tzvetomir Stoyanov Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, acme@redhat.com, namhyung@kernel.org, jolsa@redhat.com, akpm@linux-foundation.org, tstoyanov@vmware.com, hpa@zytor.com, rostedt@goodmis.org Reply-To: hpa@zytor.com, tstoyanov@vmware.com, jolsa@redhat.com, akpm@linux-foundation.org, rostedt@goodmis.org, tglx@linutronix.de, mingo@kernel.org, namhyung@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <20190510200110.093108279@goodmis.org> References: <20190510200110.093108279@goodmis.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib traceevent: Man page for tep_parse_header_page() Git-Commit-ID: 73b6b470f60641cf763eab60640b6dd9360297c7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 73b6b470f60641cf763eab60640b6dd9360297c7 Gitweb: https://git.kernel.org/tip/73b6b470f60641cf763eab60640b6dd9360297c7 Author: Tzvetomir Stoyanov AuthorDate: Fri, 10 May 2019 15:56:31 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 15 May 2019 16:36:48 -0300 tools lib traceevent: Man page for tep_parse_header_page() Create man page for tep_parse_header_page() libtraceevent API. Signed-off-by: Tzvetomir Stoyanov Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/linux-trace-devel/20190503091119.23399-25-tstoyanov@vmware.com Link: http://lkml.kernel.org/r/20190510200110.093108279@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo --- .../Documentation/libtraceevent-parse_head.txt | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/tools/lib/traceevent/Documentation/libtraceevent-parse_head.txt b/tools/lib/traceevent/Documentation/libtraceevent-parse_head.txt new file mode 100644 index 000000000000..c90f16c7d8e6 --- /dev/null +++ b/tools/lib/traceevent/Documentation/libtraceevent-parse_head.txt @@ -0,0 +1,82 @@ +libtraceevent(3) +================ + +NAME +---- +tep_parse_header_page - Parses the data stored in the header page. + +SYNOPSIS +-------- +[verse] +-- +*#include * + +int *tep_parse_header_page*(struct tep_handle pass:[*]_tep_, char pass:[*]_buf_, unsigned long _size_, int _long_size_); +-- + +DESCRIPTION +----------- +The _tep_parse_header_page()_ function parses the header page data from _buf_, +and initializes the _tep_, trace event parser context, with it. The buffer +_buf_ is with _size_, and is supposed to be copied from +tracefs/events/header_page. + +Some old kernels do not have header page info, in this case the +_tep_parse_header_page()_ function can be called with _size_ equal to 0. The +_tep_ context is initialized with default values. The _long_size_ can be used in +this use case, to set the size of a long integer to be used. + +RETURN VALUE +------------ +The _tep_parse_header_page()_ function returns 0 in case of success, or -1 +in case of an error. + +EXAMPLE +------- +[source,c] +-- +#include +... +struct tep_handle *tep = tep_alloc(); +... +char *buf; +int size; +buf = read_file("/sys/kernel/tracing/events/header_page", &size); +if (tep_parse_header_page(tep, buf, size, sizeof(unsigned long)) != 0) { + /* Failed to parse the header page */ +} +... +-- + +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)_ + +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