[tip:perf/core] tools lib traceevent: Man page for get/set cpus APIs

From: tip-bot for Tzvetomir Stoyanov
Date: Sat May 18 2019 - 05:05:35 EST


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

tools lib traceevent: Man page for get/set cpus APIs

Create man pages for libtraceevent APIs:

tep_get_cpus(),
tep_set_cpus()

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: linux-trace-devel@xxxxxxxxxxxxxxx
Link: http://lore.kernel.org/linux-trace-devel/20190503091119.23399-6-tstoyanov@xxxxxxxxxx
Link: http://lkml.kernel.org/r/20190510200106.742948683@xxxxxxxxxxx
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
...eevent-long_size.txt => libtraceevent-cpus.txt} | 27 +++++++++++-----------
1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt b/tools/lib/traceevent/Documentation/libtraceevent-cpus.txt
similarity index 52%
copy from tools/lib/traceevent/Documentation/libtraceevent-long_size.txt
copy to tools/lib/traceevent/Documentation/libtraceevent-cpus.txt
index 01d78ea2519a..5ad70e43b752 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent-cpus.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_cpus, tep_set_cpus - Get / set the number of CPUs, which have a tracing
+buffer representing it. Note, the buffer may be empty.

SYNOPSIS
--------
@@ -12,23 +12,23 @@ 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_cpus*(struct tep_handle pass:[*]_tep_);
+void *tep_set_cpus*(struct tep_handle pass:[*]_tep_, int _cpus_);
--

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_cpus()_ function gets the number of CPUs, which have a tracing
+buffer representing it. 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_cpus()_ function sets the number of CPUs, which have a tracing
+buffer representing it. The _tep_ argument is trace event parser context.
+The _cpu_ argument is the number of CPUs with tracing data.

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_cpus()_ functions returns the number of CPUs, which have tracing
+data recorded.

EXAMPLE
-------
@@ -38,10 +38,9 @@ EXAMPLE
...
struct tep_handle *tep = tep_alloc();
...
-tep_set_long_size(tep, 4);
-...
-int long_size = tep_get_long_size(tep);
+ tep_set_cpus(tep, 5);
...
+ printf("We have tracing data for %d CPUs", tep_get_cpus(tep));
--

FILES