Skip to contentSkip to conversation

perf tools: Improve hybrid description in perf record manpage

PATCH In review Andi Kleen 2 participants 2 messages Aug 18, 2022 – Aug 23, 2022 perf events

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 perf tools: Improve hybrid description in perf record manpage

The Intel hybrid description is written in a different style than the rest of the perf record man page. There were some new command line options added after it which resulted in very strange section ordering. Move the hybrid include last.

Also the sub sections in the hybrid document don't fit the record manpage well (especially since it talks about all kinds of unrelated commands). I left this for now, but would be better to separate this properly in the different man pages.

It would be better to use sub sections for the other sections, but these don't seem to be supported in AsciiDoc?

Some of the examples are still misrendered in the manpage with an indented troff command, but I don't know how to fix that.

In any case it's now better than before.

---
 tools/perf/Documentation/intel-hybrid.txt | 10 ----------
 tools/perf/Documentation/perf-record.txt  |  4 ++--
 2 files changed, 2 insertions(+), 12 deletions(-)
tools/perf/Documentation/intel-hybrid.txt +0 -10
index c9302096dc46..e7a776ad25d7 100644
@@ -21,11 +21,6 @@ cat /sys/devices/cpu_atom/cpus
 
 It indicates cpu0-cpu15 are core cpus and cpu16-cpu23 are atom cpus.
 
-Quickstart
-
-List hybrid event
------------------
-
 As before, use perf-list to list the symbolic event.
 
 perf list
@@ -40,7 +35,6 @@ the event is belong to. Same event name but with different pmu can
 be supported.
 
 Enable hybrid event with a specific pmu
----------------------------------------
 
 To enable a core only event or atom only event, following syntax is supported:
 
@@ -53,7 +47,6 @@ For example, count the 'cycles' event on core cpus.
 	perf stat -e cpu_core/cycles/
 
 Create two events for one hardware event automatically
-------------------------------------------------------
 
 When creating one event and the event is available on both atom and core,
 two events are created automatically. One is for atom, the other is for
@@ -132,7 +125,6 @@ For perf-stat result, it displays two events:
 The first 'cycles' is core event, the second 'cycles' is atom event.
 
 Thread mode example:
---------------------
 
 perf-stat reports the scaled counts for hybrid event and with a percentage
 displayed. The percentage is the event's running time/enabling time.
@@ -176,14 +168,12 @@ perf_event_attr:
        604,097,080      cpu_atom/cycles/                                              (99.57%)
 
 perf-record:
-------------
 
 If there is no '-e' specified in perf record, on hybrid platform,
 it creates two default 'cycles' and adds them to event list. One
 is for core, the other is for atom.
 
 perf-stat:
-----------
 
 If there is no '-e' specified in perf stat, on hybrid platform,
 besides of software events, following events are created and
tools/perf/Documentation/perf-record.txt +2 -2
index cf8ad50f3de1..0aaaaa7aee68 100644
@@ -747,8 +747,6 @@ events in data directory files. Option specified with no or empty value
 defaults to CPU layout. Masks defined or provided by the option value are
 filtered through the mask provided by -C option.
 
-include::intel-hybrid.txt[]
-
 --debuginfod[=URLs]::
 	Specify debuginfod URL to be used when cacheing perf.data binaries,
 	it follows the same syntax as the DEBUGINFOD_URLS variable, like:
@@ -768,6 +766,8 @@ include::intel-hybrid.txt[]
 	only, as of now.  So the applications built without the frame
 	pointer might see bogus addresses.
 
+include::intel-hybrid.txt[]
+
 SEE ALSO
 --------
 linkperf:perf-stat[1], linkperf:perf-list[1], linkperf:perf-intel-pt[1]
Signature · 1 line
2.35.3
#1 lore raw

Em Thu, Aug 18, 2022 at 03:01:27AM -0700, Andi Kleen escreveu:

Quoted 10 lines

The Intel hybrid description is written in a different style than the rest of the perf record man page. There were some new command line options added after it which resulted in very strange section ordering. Move the hybrid include last.

Also the sub sections in the hybrid document don't fit the record manpage well (especially since it talks about all kinds of unrelated commands). I left this for now, but would be better to separate this properly in the different man pages.

Quoted 7 lines

It would be better to use sub sections for the other sections, but these don't seem to be supported in AsciiDoc?

Some of the examples are still misrendered in the manpage with an indented troff command, but I don't know how to fix that.

In any case it's now better than before.

Thanks, tested and applied.

- Arnaldo