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