Path: blob/master/tools/perf/Documentation/perf-kvm.txt
10821 views
perf-kvm(1)1===========23NAME4----5perf-kvm - Tool to trace/measure kvm guest os67SYNOPSIS8--------9[verse]10'perf kvm' [--host] [--guest] [--guestmount=<path>11[--guestkallsyms=<path> --guestmodules=<path> | --guestvmlinux=<path>]]12{top|record|report|diff|buildid-list}13'perf kvm' [--host] [--guest] [--guestkallsyms=<path> --guestmodules=<path>14| --guestvmlinux=<path>] {top|record|report|diff|buildid-list}1516DESCRIPTION17-----------18There are a couple of variants of perf kvm:1920'perf kvm [options] top <command>' to generates and displays21a performance counter profile of guest os in realtime22of an arbitrary workload.2324'perf kvm record <command>' to record the performance counter profile25of an arbitrary workload and save it into a perf data file. If both26--host and --guest are input, the perf data file name is perf.data.kvm.27If there is no --host but --guest, the file name is perf.data.guest.28If there is no --guest but --host, the file name is perf.data.host.2930'perf kvm report' to display the performance counter profile information31recorded via perf kvm record.3233'perf kvm diff' to displays the performance difference amongst two perf.data34files captured via perf record.3536'perf kvm buildid-list' to display the buildids found in a perf data file,37so that other tools can be used to fetch packages with matching symbol tables38for use by perf report.3940OPTIONS41-------42-i::43--input=::44Input file name.45-o::46--output::47Output file name.48--host=::49Collect host side performance profile.50--guest=::51Collect guest side performance profile.52--guestmount=<path>::53Guest os root file system mount directory. Users mounts guest os54root directories under <path> by a specific filesystem access method,55typically, sshfs. For example, start 2 guest os. The one's pid is 888856and the other's is 9999.57#mkdir ~/guestmount; cd ~/guestmount58#sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/59#sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/60#perf kvm --host --guest --guestmount=~/guestmount top61--guestkallsyms=<path>::62Guest os /proc/kallsyms file copy. 'perf' kvm' reads it to get guest63kernel symbols. Users copy it out from guest os.64--guestmodules=<path>::65Guest os /proc/modules file copy. 'perf' kvm' reads it to get guest66kernel module information. Users copy it out from guest os.67--guestvmlinux=<path>::68Guest os kernel vmlinux.6970SEE ALSO71--------72linkperf:perf-top[1], linkperf:perf-record[1], linkperf:perf-report[1],73linkperf:perf-diff[1], linkperf:perf-buildid-list[1]747576