Skip to contentSkip to conversation

perf docs: Refine the description for the buffer size

PATCH Applied Leo Yan 2 participants 2 messages Aug 12, 2024 perf events

lore
Share & tools
lore

Leo Yan

author
#0 lore raw

PATCH v2 1/1 perf docs: Refine the description for the buffer size

Current description for the AUX trace buffer size is misleading. When a user specifies the option '-m,512M', it represents a size value in bytes (512MiB) but not 512M pages (512M x 4KiB regard to a page of 4KiB).

Make the document clear that the normal buffer and the AUX tracing buffer share the same semantics. Syncs the documents for consistent text.

---

Changes from v1:
Synced for all documents for consistent description (James)

 tools/perf/Documentation/perf-kvm.txt    | 6 +++---
 tools/perf/Documentation/perf-record.txt | 9 +++++----
 tools/perf/Documentation/perf-top.txt    | 4 ++--
 tools/perf/Documentation/perf-trace.txt  | 4 ++--
 4 files changed, 12 insertions(+), 11 deletions(-)
tools/perf/Documentation/perf-kvm.txt +3 -3
index b66be66fe836..c26524d38f47 100644
@@ -115,9 +115,9 @@ STAT LIVE OPTIONS
 
 -m::
 --mmap-pages=::
-    Number of mmap data pages (must be a power of two) or size
-    specification with appended unit character - B/K/M/G. The
-    size is rounded up to have nearest pages power of two value.
+        Number of mmap data pages (must be a power of two) or size
+        specification in bytes with appended unit character - B/K/M/G.
+        The size is rounded up to the nearest power-of-two page value.
 
 -a::
 --all-cpus::
tools/perf/Documentation/perf-record.txt +5 -4
index 41e36b4dc765..242223240a08 100644
@@ -273,10 +273,11 @@ OPTIONS
 -m::
 --mmap-pages=::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
-	Also, by adding a comma, the number of mmap pages for AUX
-	area tracing can be specified.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
+	By adding a comma, an additional parameter with the same
+	semantics used for the normal mmap areas can be specified for
+	AUX tracing area.
 
 -g::
 	Enables call-graph (stack chain/backtrace) recording for both
tools/perf/Documentation/perf-top.txt +2 -2
index 667e5102075e..af3e4230c72f 100644
@@ -83,8 +83,8 @@ Default is to monitor all CPUS.
 -m <pages>::
 --mmap-pages=<pages>::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
 
 -p <pid>::
 --pid=<pid>::
tools/perf/Documentation/perf-trace.txt +2 -2
index f0da8cf63e9a..6e0cc50bbc13 100644
@@ -106,8 +106,8 @@ filter out the startup phase of the program, which is often very different.
 -m::
 --mmap-pages=::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
 
 -C::
 --cpu::
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Leo Yan

Current description for the AUX trace buffer size is misleading. When a user specifies the option '-m,512M', it represents a size value in bytes (512MiB) but not 512M pages (512M x 4KiB regard to a page of 4KiB).

Make the document clear that the normal buffer and the AUX tracing buffer share the same semantics. Syncs the documents for consistent text.

Quoted 6 lines

---

Changes from v1:
Synced for all documents for consistent description (James)

Thanks, applied to tmp.perf-tools-next,

- Arnaldo

Quoted 75 lines
 tools/perf/Documentation/perf-kvm.txt    | 6 +++---
 tools/perf/Documentation/perf-record.txt | 9 +++++----
 tools/perf/Documentation/perf-top.txt    | 4 ++--
 tools/perf/Documentation/perf-trace.txt  | 4 ++--
 4 files changed, 12 insertions(+), 11 deletions(-)
tools/perf/Documentation/perf-kvm.txt +3 -3
index b66be66fe836..c26524d38f47 100644
@@ -115,9 +115,9 @@ STAT LIVE OPTIONS
 
 -m::
 --mmap-pages=::
-    Number of mmap data pages (must be a power of two) or size
-    specification with appended unit character - B/K/M/G. The
-    size is rounded up to have nearest pages power of two value.
+        Number of mmap data pages (must be a power of two) or size
+        specification in bytes with appended unit character - B/K/M/G.
+        The size is rounded up to the nearest power-of-two page value.
 
 -a::
 --all-cpus::
tools/perf/Documentation/perf-record.txt +5 -4
index 41e36b4dc765..242223240a08 100644
@@ -273,10 +273,11 @@ OPTIONS
 -m::
 --mmap-pages=::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
-	Also, by adding a comma, the number of mmap pages for AUX
-	area tracing can be specified.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
+	By adding a comma, an additional parameter with the same
+	semantics used for the normal mmap areas can be specified for
+	AUX tracing area.
 
 -g::
 	Enables call-graph (stack chain/backtrace) recording for both
tools/perf/Documentation/perf-top.txt +2 -2
index 667e5102075e..af3e4230c72f 100644
@@ -83,8 +83,8 @@ Default is to monitor all CPUS.
 -m <pages>::
 --mmap-pages=<pages>::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
 
 -p <pid>::
 --pid=<pid>::
tools/perf/Documentation/perf-trace.txt +2 -2
index f0da8cf63e9a..6e0cc50bbc13 100644
@@ -106,8 +106,8 @@ filter out the startup phase of the program, which is often very different.
 -m::
 --mmap-pages=::
 	Number of mmap data pages (must be a power of two) or size
-	specification with appended unit character - B/K/M/G. The
-	size is rounded up to have nearest pages power of two value.
+	specification in bytes with appended unit character - B/K/M/G.
+	The size is rounded up to the nearest power-of-two page value.
 
 -C::
 --cpu::
Signature · 1 line
2.34.1