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 page size APIs

Create man pages for libtraceevent APIs:

tep_get_page_size()
tep_set_page_size()

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-9-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190510200107.218173559@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
71ee989f 802e985e

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