perf kvm: Update documentation with live command
[deliverable/linux.git] / tools / perf / Documentation / perf-kvm.txt
1 perf-kvm(1)
2 ===========
3
4 NAME
5 ----
6 perf-kvm - Tool to trace/measure kvm guest os
7
8 SYNOPSIS
9 --------
10 [verse]
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>]
17
18 DESCRIPTION
19 -----------
20 There are a couple of variants of perf kvm:
21
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.
25
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.
31
32 'perf kvm report' to display the performance counter profile information
33 recorded via perf kvm record.
34
35 'perf kvm diff' to displays the performance difference amongst two perf.data
36 files captured via perf record.
37
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.
41
42 'perf kvm stat <command>' to run a command and gather performance counter
43 statistics.
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
49 events.
50
51 'perf kvm stat report' reports statistical data which includes events
52 handled time, samples, and so on.
53
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
56 rate).
57
58 OPTIONS
59 -------
60 -i::
61 --input=::
62 Input file name.
63 -o::
64 --output::
65 Output file name.
66 --host=::
67 Collect host side performance profile.
68 --guest=::
69 Collect guest side performance profile.
70 --guestmount=<path>::
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.
87
88 STAT REPORT OPTIONS
89 -------------------
90 --vcpu=<value>::
91 analyze events which occures on this vcpu. (default: all vcpus)
92
93 --event=<value>::
94 event to be analyzed. Possible values: vmexit, mmio, ioport.
95 (default: vmexit)
96 -k::
97 --key=<value>::
98 Sorting key. Possible values: sample (default, sort by samples
99 number), time (sort by average time).
100 -p::
101 --pid=::
102 Analyze events only for given process ID(s) (comma separated list).
103
104 STAT LIVE OPTIONS
105 -----------------
106 -d::
107 --display::
108 Time in seconds between display updates
109
110 -m::
111 --mmap-pages=::
112 Number of mmap data pages. Must be a power of two.
113
114 -a::
115 --all-cpus::
116 System-wide collection from all CPUs.
117
118 -p::
119 --pid=::
120 Analyze events only for given process ID(s) (comma separated list).
121
122 --vcpu=<value>::
123 analyze events which occures on this vcpu. (default: all vcpus)
124
125
126 --event=<value>::
127 event to be analyzed. Possible values: vmexit, mmio, ioport.
128 (default: vmexit)
129
130 -k::
131 --key=<value>::
132 Sorting key. Possible values: sample (default, sort by samples
133 number), time (sort by average time).
134
135 --duration=<value>::
136 Show events other than HLT that take longer than duration usecs.
137
138 SEE ALSO
139 --------
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]
This page took 0.037811 seconds and 5 git commands to generate.