1LIBTRACEEVENT(3) libtraceevent Manual LIBTRACEEVENT(3)
2
3
4
6 tep_get_page_size, tep_set_page_size, tep_get_sub_buffer_size - Get /
7 set the size of a memory page on the machine, where the trace is
8 generated
9
11 #include <event-parse.h>
12
13 int tep_get_page_size(struct tep_handle *tep);
14 void tep_set_page_size(struct tep_handle *tep, int page_size);
15 int tep_get_sub_buffer_size(struct tep_handle *tep);
16
18 The tep_get_page_size() function returns the size of a memory page on
19 the machine, where the trace is generated. The tep argument is trace
20 event parser context.
21
22 The tep_set_page_size() function stores in the tep context the size of
23 a memory page on the machine, where the trace is generated. The tep
24 argument is trace event parser context. The page_size argument is the
25 size of a memory page, in bytes.
26
27 The tep_get_sub_buffer_size() returns the size of each "sub buffer" of
28 the ring buffer. The Linux kernel ring buffer is broken up into
29 sections called sub buffers. This returns the size of those buffers.
30
32 The tep_get_page_size() function returns size of the memory page, in
33 bytes.
34
35 The tep_get_sub_buffer_size() function returns the number of bytes each
36 sub buffer is made up of.
37
39 #include <unistd.h>
40 #include <event-parse.h>
41 ...
42 struct tep_handle *tep = tep_alloc();
43 ...
44 int page_size = getpagesize();
45
46 tep_set_page_size(tep, page_size);
47
48 printf("The page size for this machine is %d\n", tep_get_page_size(tep));
49
51 event-parse.h
52 Header file to include in order to have access to the library APIs.
53 -ltraceevent
54 Linker switch to add when building a program that uses the library.
55
57 libtraceevent(3), trace-cmd(1)
58
60 Steven Rostedt <rostedt@goodmis.org[1]>, author of libtraceevent.
61 Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>, author of this man page.
62
64 Report bugs to <linux-trace-devel@vger.kernel.org[3]>
65
67 libtraceevent is Free Software licensed under the GNU LGPL 2.1
68
70 https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
71
73 1. rostedt@goodmis.org
74 mailto:rostedt@goodmis.org
75
76 2. tz.stoyanov@gmail.com
77 mailto:tz.stoyanov@gmail.com
78
79 3. linux-trace-devel@vger.kernel.org
80 mailto:linux-trace-devel@vger.kernel.org
81
82
83
84libtraceevent 1.7.2 04/05/2023 LIBTRACEEVENT(3)