Commit-ID: 71ee989f94cf06ce73ec5bd8a9f28cca5d167499 Gitweb: https://git.kernel.org/tip/71ee989f94cf06ce73ec5bd8a9f28cca5d167499 Author: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> AuthorDate: Fri, 10 May 2019 15:56:15 -0400 Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> CommitDate: Wed, 15 May 2019 16:36:47 -0300 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@xxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Jiri Olsa <jolsa@xxxxxxxxxx> Cc: Namhyung Kim <namhyung@xxxxxxxxxx> Cc: linux-trace-devel@xxxxxxxxxxxxxxx Link: http://lore.kernel.org/linux-trace-devel/20190503091119.23399-9-tstoyanov@xxxxxxxxxx Link: http://lkml.kernel.org/r/20190510200107.218173559@xxxxxxxxxxx Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> --- ...t-long_size.txt => libtraceevent-page_size.txt} | 34 ++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt b/tools/lib/traceevent/Documentation/libtraceevent-page_size.txt similarity index 50% copy from tools/lib/traceevent/Documentation/libtraceevent-long_size.txt copy to tools/lib/traceevent/Documentation/libtraceevent-page_size.txt index 01d78ea2519a..452c0cfa1822 100644 --- a/tools/lib/traceevent/Documentation/libtraceevent-long_size.txt +++ b/tools/lib/traceevent/Documentation/libtraceevent-page_size.txt @@ -3,8 +3,8 @@ libtraceevent(3) NAME ---- -tep_get_long_size, tep_set_long_size - Get / set the size of a long integer on -the machine, where the trace is generated, in bytes +tep_get_page_size, tep_set_page_size - Get / set the size of a memory page on +the machine, where the trace is generated SYNOPSIS -------- @@ -12,36 +12,40 @@ SYNOPSIS -- *#include <event-parse.h>* -int *tep_get_long_size*(strucqt tep_handle pass:[*]_tep_); -void *tep_set_long_size*(struct tep_handle pass:[*]_tep_, int _long_size_); +int *tep_get_page_size*(struct tep_handle pass:[*]_tep_); +void *tep_set_page_size*(struct tep_handle pass:[*]_tep_, int _page_size_); -- DESCRIPTION ----------- -The _tep_get_long_size()_ function returns the size of a long integer on the machine, -where the trace is generated. The _tep_ argument is trace event parser context. +The _tep_get_page_size()_ function returns the size of a memory page on +the machine, where the trace is generated. The _tep_ argument is trace +event parser context. -The _tep_set_long_size()_ function sets the size of a long integer on the machine, -where the trace is generated. The _tep_ argument is trace event parser context. -The _long_size_ is the size of a long integer, in bytes. +The _tep_set_page_size()_ function stores in the _tep_ context the size of a +memory page on the machine, where the trace is generated. +The _tep_ argument is trace event parser context. +The _page_size_ argument is the size of a memory page, in bytes. RETURN VALUE ------------ -The _tep_get_long_size()_ function returns the size of a long integer on the machine, -where the trace is generated, in bytes. +The _tep_get_page_size()_ function returns size of the memory page, in bytes. EXAMPLE ------- [source,c] -- +#include <unistd.h> #include <event-parse.h> ... struct tep_handle *tep = tep_alloc(); ... -tep_set_long_size(tep, 4); -... -int long_size = tep_get_long_size(tep); -... + int page_size = getpagesize(); + + tep_set_page_size(tep, page_size); + + printf("The page size for this machine is %d\n", tep_get_page_size(tep)); + -- FILES
![]() |