Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Tidy guest option documentation

Move common guest options into include files. Use attribute substitution to
customize an example, using "[verse]" to define the block instead of a
"literal" block which does not permit substitution.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220811170411.84154-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
53e76d35 d9ca43c0

+38 -57
+16
tools/perf/Documentation/guest-files.txt
··· 1 + include::guestmount.txt[] 2 + 3 + --guestkallsyms=<path>:: 4 + Guest OS /proc/kallsyms file copy. perf reads it to get guest 5 + kernel symbols. Users copy it out from guest OS. 6 + 7 + --guestmodules=<path>:: 8 + Guest OS /proc/modules file copy. perf reads it to get guest 9 + kernel module information. Users copy it out from guest OS. 10 + 11 + --guestvmlinux=<path>:: 12 + Guest OS kernel vmlinux. 13 + 14 + --guest-code:: 15 + Indicate that guest code can be found in the hypervisor process, 16 + which is a common case for KVM test programs.
+11
tools/perf/Documentation/guestmount.txt
··· 1 + --guestmount=<path>:: 2 + Guest OS root file system mount directory. Users mount guest OS 3 + root directories under <path> by a specific filesystem access method, 4 + typically, sshfs. 5 + For example, start 2 guest OS, one's pid is 8888 and the other's is 9999: 6 + [verse] 7 + $ mkdir \~/guestmount 8 + $ cd \~/guestmount 9 + $ sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/ 10 + $ sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/ 11 + $ perf {GMEXAMPLECMD} --guestmount=~/guestmount {GMEXAMPLESUBCMD}
+3 -11
tools/perf/Documentation/perf-inject.txt
··· 102 102 should be used, and also --buildid-all and --switch-events may be 103 103 useful. 104 104 105 - --guestmount=<path>:: 106 - Guest OS root file system mount directory. Users mount guest OS 107 - root directories under <path> by a specific filesystem access method, 108 - typically, sshfs. 109 - For example, start 2 guest OS, one's pid is 8888 and the other's is 9999: 110 - [verse] 111 - $ mkdir \~/guestmount 112 - $ cd \~/guestmount 113 - $ sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/ 114 - $ sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/ 115 - $ perf inject --guestmount=~/guestmount 105 + :GMEXAMPLECMD: inject 106 + :GMEXAMPLESUBCMD: 107 + include::guestmount.txt[] 116 108 117 109 SEE ALSO 118 110 --------
+5 -20
tools/perf/Documentation/perf-kvm.txt
··· 77 77 Collect host side performance profile. 78 78 --guest:: 79 79 Collect guest side performance profile. 80 - --guestmount=<path>:: 81 - Guest os root file system mount directory. Users mounts guest os 82 - root directories under <path> by a specific filesystem access method, 83 - typically, sshfs. For example, start 2 guest os. The one's pid is 8888 84 - and the other's is 9999. 85 - #mkdir ~/guestmount; cd ~/guestmount 86 - #sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/ 87 - #sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/ 88 - #perf kvm --host --guest --guestmount=~/guestmount top 89 - --guestkallsyms=<path>:: 90 - Guest os /proc/kallsyms file copy. 'perf' kvm' reads it to get guest 91 - kernel symbols. Users copy it out from guest os. 92 - --guestmodules=<path>:: 93 - Guest os /proc/modules file copy. 'perf' kvm' reads it to get guest 94 - kernel module information. Users copy it out from guest os. 95 - --guestvmlinux=<path>:: 96 - Guest os kernel vmlinux. 97 - --guest-code:: 98 - Indicate that guest code can be found in the hypervisor process, 99 - which is a common case for KVM test programs. 80 + 81 + :GMEXAMPLECMD: kvm --host --guest 82 + :GMEXAMPLESUBCMD: top 83 + include::guest-files.txt[] 84 + 100 85 -v:: 101 86 --verbose:: 102 87 Be more verbose (show counter open errors, etc).
+3 -26
tools/perf/Documentation/perf-script.txt
··· 487 487 For itrace only show specified functions and their callees for 488 488 itrace. Multiple functions can be separated by comma. 489 489 490 - --guestmount=<path>:: 491 - Guest OS root file system mount directory. Users mount guest OS 492 - root directories under <path> by a specific filesystem access method, 493 - typically, sshfs. 494 - For example, start 2 guest OS, one's pid is 8888 and the other's is 9999: 495 - [verse] 496 - $ mkdir \~/guestmount 497 - $ cd \~/guestmount 498 - $ sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/ 499 - $ sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/ 500 - $ perf script --guestmount=~/guestmount 501 - 502 - --guestkallsyms=<path>:: 503 - Guest OS /proc/kallsyms file copy. perf reads it to get guest 504 - kernel symbols. Users copy it out from guest OS. 505 - 506 - --guestmodules=<path>:: 507 - Guest OS /proc/modules file copy. perf reads it to get guest 508 - kernel module information. Users copy it out from guest OS. 509 - 510 - --guestvmlinux=<path>:: 511 - Guest OS kernel vmlinux. 512 - 513 490 --switch-on EVENT_NAME:: 514 491 Only consider events after this event is found. 515 492 ··· 507 530 The known limitations include exception handing such as 508 531 setjmp/longjmp will have calls/returns not match. 509 532 510 - --guest-code:: 511 - Indicate that guest code can be found in the hypervisor process, 512 - which is a common case for KVM test programs. 533 + :GMEXAMPLECMD: script 534 + :GMEXAMPLESUBCMD: 535 + include::guest-files.txt[] 513 536 514 537 SEE ALSO 515 538 --------