lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 18 May 2019 02:05:03 -0700
From:   tip-bot for Tzvetomir Stoyanov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tstoyanov@...are.com, mingo@...nel.org, namhyung@...nel.org,
        rostedt@...dmis.org, akpm@...ux-foundation.org, hpa@...or.com,
        acme@...hat.com, jolsa@...hat.com, linux-kernel@...r.kernel.org,
        tglx@...utronix.de
Subject: [tip:perf/core] tools lib traceevent: Man page for page size APIs

Commit-ID:  71ee989f94cf06ce73ec5bd8a9f28cca5d167499
Gitweb:     https://git.kernel.org/tip/71ee989f94cf06ce73ec5bd8a9f28cca5d167499
Author:     Tzvetomir Stoyanov <tstoyanov@...are.com>
AuthorDate: Fri, 10 May 2019 15:56:15 -0400
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
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@...are.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: linux-trace-devel@...r.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@...dmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 ...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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ