6 perf-kvm - Tool to trace/measure kvm guest os
11 'perf kvm' [--host] [--guest] [--guestmount=<path>
12 [--guestkallsyms=<path> --guestmodules=<path> | --guestvmlinux=<path>]]
13 {top|record|report|diff|buildid-list}
14 'perf kvm' [--host] [--guest] [--guestkallsyms=<path> --guestmodules=<path>
15 | --guestvmlinux=<path>] {top|record|report|diff|buildid-list|stat}
16 'perf kvm stat [record|report|live] [<options>]
20 There are a couple of variants of perf kvm:
22 'perf kvm [options] top <command>' to generates and displays
23 a performance counter profile of guest os in realtime
24 of an arbitrary workload.
26 'perf kvm record <command>' to record the performance counter profile
27 of an arbitrary workload and save it into a perf data file. If both
28 --host and --guest are input, the perf data file name is perf.data.kvm.
29 If there is no --host but --guest, the file name is perf.data.guest.
30 If there is no --guest but --host, the file name is perf.data.host.
32 'perf kvm report' to display the performance counter profile information
33 recorded via perf kvm record.
35 'perf kvm diff' to displays the performance difference amongst two perf.data
36 files captured via perf record.
38 'perf kvm buildid-list' to display the buildids found in a perf data file,
39 so that other tools can be used to fetch packages with matching symbol tables
40 for use by perf report.
42 'perf kvm stat <command>' to run a command and gather performance counter
44 Especially, perf 'kvm stat record/report' generates a statistical analysis
45 of KVM events. Currently, vmexit, mmio and ioport events are supported.
46 'perf kvm stat record <command>' records kvm events and the events between
47 start and end <command>.
48 And this command produces a file which contains tracing results of kvm
51 'perf kvm stat report' reports statistical data which includes events
52 handled time, samples, and so on.
54 'perf kvm stat live' reports statistical data in a live mode (similar to
55 record + report but with statistical data updated live at a given display
67 Collect host side performance profile.
69 Collect guest side performance profile.
71 Guest os root file system mount directory. Users mounts guest os
72 root directories under <path> by a specific filesystem access method,
73 typically, sshfs. For example, start 2 guest os. The one's pid is 8888
74 and the other's is 9999.
75 #mkdir ~/guestmount; cd ~/guestmount
76 #sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/
77 #sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/
78 #perf kvm --host --guest --guestmount=~/guestmount top
79 --guestkallsyms=<path>::
80 Guest os /proc/kallsyms file copy. 'perf' kvm' reads it to get guest
81 kernel symbols. Users copy it out from guest os.
82 --guestmodules=<path>::
83 Guest os /proc/modules file copy. 'perf' kvm' reads it to get guest
84 kernel module information. Users copy it out from guest os.
85 --guestvmlinux=<path>::
86 Guest os kernel vmlinux.
91 analyze events which occures on this vcpu. (default: all vcpus)
94 event to be analyzed. Possible values: vmexit, mmio, ioport.
98 Sorting key. Possible values: sample (default, sort by samples
99 number), time (sort by average time).
102 Analyze events only for given process ID(s) (comma separated list).
108 Time in seconds between display updates
112 Number of mmap data pages. Must be a power of two.
116 System-wide collection from all CPUs.
120 Analyze events only for given process ID(s) (comma separated list).
123 analyze events which occures on this vcpu. (default: all vcpus)
127 event to be analyzed. Possible values: vmexit, mmio, ioport.
132 Sorting key. Possible values: sample (default, sort by samples
133 number), time (sort by average time).
136 Show events other than HLT that take longer than duration usecs.
140 linkperf:perf-top[1], linkperf:perf-record[1], linkperf:perf-report[1],
141 linkperf:perf-diff[1], linkperf:perf-buildid-list[1],
142 linkperf:perf-stat[1]