Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@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-6-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190510200106.742948683@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Tzvetomir Stoyanov and committed by
Arnaldo Carvalho de Melo
ba28fabe 3d2626bd

+77
+77
tools/lib/traceevent/Documentation/libtraceevent-cpus.txt
··· 1 + libtraceevent(3) 2 + ================ 3 + 4 + NAME 5 + ---- 6 + tep_get_cpus, tep_set_cpus - Get / set the number of CPUs, which have a tracing 7 + buffer representing it. Note, the buffer may be empty. 8 + 9 + SYNOPSIS 10 + -------- 11 + [verse] 12 + -- 13 + *#include <event-parse.h>* 14 + 15 + int *tep_get_cpus*(struct tep_handle pass:[*]_tep_); 16 + void *tep_set_cpus*(struct tep_handle pass:[*]_tep_, int _cpus_); 17 + -- 18 + 19 + DESCRIPTION 20 + ----------- 21 + The _tep_get_cpus()_ function gets the number of CPUs, which have a tracing 22 + buffer representing it. The _tep_ argument is trace event parser context. 23 + 24 + The _tep_set_cpus()_ function sets the number of CPUs, which have a tracing 25 + buffer representing it. The _tep_ argument is trace event parser context. 26 + The _cpu_ argument is the number of CPUs with tracing data. 27 + 28 + RETURN VALUE 29 + ------------ 30 + The _tep_get_cpus()_ functions returns the number of CPUs, which have tracing 31 + data recorded. 32 + 33 + EXAMPLE 34 + ------- 35 + [source,c] 36 + -- 37 + #include <event-parse.h> 38 + ... 39 + struct tep_handle *tep = tep_alloc(); 40 + ... 41 + tep_set_cpus(tep, 5); 42 + ... 43 + printf("We have tracing data for %d CPUs", tep_get_cpus(tep)); 44 + -- 45 + 46 + FILES 47 + ----- 48 + [verse] 49 + -- 50 + *event-parse.h* 51 + Header file to include in order to have access to the library APIs. 52 + *-ltraceevent* 53 + Linker switch to add when building a program that uses the library. 54 + -- 55 + 56 + SEE ALSO 57 + -------- 58 + _libtraceevent(3)_, _trace-cmd(1)_ 59 + 60 + AUTHOR 61 + ------ 62 + [verse] 63 + -- 64 + *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*. 65 + *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page. 66 + -- 67 + REPORTING BUGS 68 + -------------- 69 + Report bugs to <linux-trace-devel@vger.kernel.org> 70 + 71 + LICENSE 72 + ------- 73 + libtraceevent is Free Software licensed under the GNU LGPL 2.1 74 + 75 + RESOURCES 76 + --------- 77 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git