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