linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Tzvetomir Stoyanov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tstoyanov@vmware.com, mingo@kernel.org, namhyung@kernel.org,
	rostedt@goodmis.org, akpm@linux-foundation.org, hpa@zytor.com,
	acme@redhat.com, jolsa@redhat.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de
Subject: [tip:perf/core] tools lib traceevent: Man page for page size APIs
Date: Sat, 18 May 2019 02:05:03 -0700	[thread overview]
Message-ID: <tip-71ee989f94cf06ce73ec5bd8a9f28cca5d167499@git.kernel.org> (raw)
In-Reply-To: <20190510200107.218173559@goodmis.org>

Commit-ID:  71ee989f94cf06ce73ec5bd8a9f28cca5d167499
Gitweb:     https://git.kernel.org/tip/71ee989f94cf06ce73ec5bd8a9f28cca5d167499
Author:     Tzvetomir Stoyanov <tstoyanov@vmware.com>
AuthorDate: Fri, 10 May 2019 15:56:15 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 15 May 2019 16:36:47 -0300

tools lib traceevent: Man page for page size APIs

Create man pages for libtraceevent APIs:

  tep_get_page_size()
  tep_set_page_size()

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/20190503091119.23399-9-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190510200107.218173559@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 ...t-long_size.txt => libtraceevent-page_size.txt} | 34 ++++++++++++----------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt b/tools/lib/traceevent/Documentation/libtraceevent-page_size.txt
similarity index 50%
copy from tools/lib/traceevent/Documentation/libtraceevent-long_size.txt
copy to tools/lib/traceevent/Documentation/libtraceevent-page_size.txt
index 01d78ea2519a..452c0cfa1822 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent-page_size.txt
@@ -3,8 +3,8 @@ libtraceevent(3)
 
 NAME
 ----
-tep_get_long_size, tep_set_long_size - Get / set the size of a long integer on
-the machine, where the trace is generated, in bytes
+tep_get_page_size, tep_set_page_size - Get / set the size of a memory page on
+the machine, where the trace is generated
 
 SYNOPSIS
 --------
@@ -12,36 +12,40 @@ SYNOPSIS
 --
 *#include <event-parse.h>*
 
-int *tep_get_long_size*(strucqt tep_handle pass:[*]_tep_);
-void *tep_set_long_size*(struct tep_handle pass:[*]_tep_, int _long_size_);
+int *tep_get_page_size*(struct tep_handle pass:[*]_tep_);
+void *tep_set_page_size*(struct tep_handle pass:[*]_tep_, int _page_size_);
 --
 
 DESCRIPTION
 -----------
-The _tep_get_long_size()_ function returns the size of a long integer on the machine,
-where the trace is generated. The _tep_ argument is trace event parser context.
+The _tep_get_page_size()_ function returns the size of a memory page on
+the machine, where the trace is generated. The _tep_ argument is trace
+event parser context.
 
-The _tep_set_long_size()_ function sets the size of a long integer on the machine,
-where the trace is generated. The _tep_ argument is trace event parser context.
-The _long_size_ is the size of a long integer, in bytes.
+The _tep_set_page_size()_ function stores in the _tep_ context the size of a
+memory page on the machine, where the trace is generated.
+The _tep_ argument is trace event parser context.
+The _page_size_ argument is the size of a memory page, in bytes.
 
 RETURN VALUE
 ------------
-The _tep_get_long_size()_ function returns the size of a long integer on the machine,
-where the trace is generated, in bytes.
+The _tep_get_page_size()_ function returns size of the memory page, in bytes.
 
 EXAMPLE
 -------
 [source,c]
 --
+#include <unistd.h>
 #include <event-parse.h>
 ...
 struct tep_handle *tep = tep_alloc();
 ...
-tep_set_long_size(tep, 4);
-...
-int long_size = tep_get_long_size(tep);
-...
+	int page_size = getpagesize();
+
+	tep_set_page_size(tep, page_size);
+
+	printf("The page size for this machine is %d\n", tep_get_page_size(tep));
+
 --
 
 FILES

  reply	other threads:[~2019-05-18  9:05 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 19:56 [PATCH 00/27] tools/lib/traceevent: Add man pages for most libtraceevent functions Steven Rostedt
2019-05-10 19:56 ` [PATCH 01/27] tools lib traceevent: Remove hard coded install paths from pkg-config file Steven Rostedt
2019-05-10 20:11   ` Steven Rostedt
2019-05-10 21:25     ` Arnaldo Carvalho de Melo
2019-05-14 15:05       ` Arnaldo Carvalho de Melo
2019-05-14 15:49         ` Steven Rostedt
2019-05-10 19:56 ` [PATCH 02/27] tools/lib/traceevent: Implement libtraceevent man pages Steven Rostedt
2019-05-18  9:00   ` [tip:perf/core] tools lib traceevent: Introduce " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 03/27] tools/lib/traceevent: Add support for man pages with multiple names Steven Rostedt
2019-05-18  9:00   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 04/27] tools/lib/traceevent: libtraceevent man pages for tep_handler related APIs Steven Rostedt
2019-05-18  9:01   ` [tip:perf/core] tools lib traceevent: Man " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 05/27] tools/lib/traceevent: Man page for header_page APIs Steven Rostedt
2019-05-18  9:02   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 06/27] tools/lib/traceevent: Man page for get/set cpus APIs Steven Rostedt
2019-05-18  9:02   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 07/27] tools/lib/traceevent: Man page for file endian APIs Steven Rostedt
2019-05-18  9:03   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 08/27] tools/lib/traceevent: Man page for host " Steven Rostedt
2019-05-18  9:04   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 09/27] tools/lib/traceevent: Man page for page size APIs Steven Rostedt
2019-05-18  9:05   ` tip-bot for Tzvetomir Stoyanov [this message]
2019-05-10 19:56 ` [PATCH 10/27] tools/lib/traceevent: Man page for tep_strerror() Steven Rostedt
2019-05-18  9:05   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 11/27] tools/lib/traceevent: Man pages for event handler APIs Steven Rostedt
2019-05-18  9:06   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 12/27] tools/lib/traceevent: Man pages for function related libtraceevent APIs Steven Rostedt
2019-05-18  9:07   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 13/27] tools/lib/traceevent: Man pages for registering print function Steven Rostedt
2019-05-18  9:08   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 14/27] tools/lib/traceevent: Man page for tep_read_number() Steven Rostedt
2019-05-18  9:08   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 15/27] tools/lib/traceevent: Man pages for event find APIs Steven Rostedt
2019-05-18  9:09   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 16/27] tools/lib/traceevent: Man page for list events APIs Steven Rostedt
2019-05-18  9:10   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 17/27] tools/lib/traceevent: Man pages for libtraceevent event get APIs Steven Rostedt
2019-05-18  9:10   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 18/27] tools/lib/traceevent: Man pages find field APIs Steven Rostedt
2019-05-18  9:11   ` [tip:perf/core] tools lib traceevent: Man pages for " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 19/27] tools/lib/traceevent: Man pages get field value APIs Steven Rostedt
2019-05-18  9:12   ` [tip:perf/core] tools lib traceevent: Man pages for " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 20/27] tools/lib/traceevent: Man pages for print field APIs Steven Rostedt
2019-05-18  9:13   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 21/27] tools/lib/traceevent: Man page for tep_read_number_field() Steven Rostedt
2019-05-18  9:13   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 22/27] tools/lib/traceevent: Man pages for event fields APIs Steven Rostedt
2019-05-18  9:14   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 23/27] tools/lib/traceevent: Man pages for event filter APIs Steven Rostedt
2019-05-18  9:15   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 24/27] tools/lib/traceevent: Man pages for parse event APIs Steven Rostedt
2019-05-18  9:16   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 25/27] tools/lib/traceevent: Man page for tep_parse_header_page() Steven Rostedt
2019-05-18  9:16   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 26/27] tools/lib/traceevent: Man pages for APIs, used to extract common fields from a record Steven Rostedt
2019-05-18  9:17   ` [tip:perf/core] tools lib traceevent: Man pages for APIs " tip-bot for Tzvetomir Stoyanov
2019-05-10 19:56 ` [PATCH 27/27] tools/lib/traceevent: Man pages for trace sequences APIs Steven Rostedt
2019-05-18  9:18   ` [tip:perf/core] tools lib traceevent: " tip-bot for Tzvetomir Stoyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-71ee989f94cf06ce73ec5bd8a9f28cca5d167499@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tstoyanov@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).