Skip to contentSkip to conversation

perf docs: Refine the description for the buffer size

PATCH Superseded Leo Yan 2 participants 3 messages Aug 10, 2024 – Aug 12, 2024 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Leo Yan

author
#0 lore raw

PATCH 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.

---
 tools/perf/Documentation/perf-record.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
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
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 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.

---
  tools/perf/Documentation/perf-record.txt | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
tools/perf/Documentation/perf-record.txt +0 -2
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.

tools/perf/Documentation/perf-record.txt OPTIONS · line 283

Quoted 10 lines
tools/perf/Documentation/perf-record.txt +5 -2
-	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

The same text is repeated on a few tools, probably makes sense to update them all at the same time.

With that change:

author
#2 lore raw

On 8/12/24 10:11, James Clark wrote:

[...]

Quoted 37 lines · Leo Yan
Quoted 30 lines

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.

---
  tools/perf/Documentation/perf-record.txt | 9 +++++----

  1 file changed, 5 insertions(+), 4 deletions(-)
tools/perf/Documentation/perf-record.txt +0 -0
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.

Quoted 2 lines

  -g::
      Enables call-graph (stack chain/backtrace) recording for both

The same text is repeated on a few tools, probably makes sense to update them all at the same time.

Quoted 3 lines

With that change:

Thanks for review. Sent a new patch with suggestion.

Leo