perf-kvm.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. perf-kvm(1)
  2. ===========
  3. NAME
  4. ----
  5. perf-kvm - Tool to trace/measure kvm guest os
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf kvm' [--host] [--guest] [--guestmount=<path>
  10. [--guestkallsyms=<path> --guestmodules=<path> | --guestvmlinux=<path>]]
  11. {top|record|report|diff|buildid-list}
  12. 'perf kvm' [--host] [--guest] [--guestkallsyms=<path> --guestmodules=<path>
  13. | --guestvmlinux=<path>] {top|record|report|diff|buildid-list|stat}
  14. DESCRIPTION
  15. -----------
  16. There are a couple of variants of perf kvm:
  17. 'perf kvm [options] top <command>' to generates and displays
  18. a performance counter profile of guest os in realtime
  19. of an arbitrary workload.
  20. 'perf kvm record <command>' to record the performance counter profile
  21. of an arbitrary workload and save it into a perf data file. If both
  22. --host and --guest are input, the perf data file name is perf.data.kvm.
  23. If there is no --host but --guest, the file name is perf.data.guest.
  24. If there is no --guest but --host, the file name is perf.data.host.
  25. 'perf kvm report' to display the performance counter profile information
  26. recorded via perf kvm record.
  27. 'perf kvm diff' to displays the performance difference amongst two perf.data
  28. files captured via perf record.
  29. 'perf kvm buildid-list' to display the buildids found in a perf data file,
  30. so that other tools can be used to fetch packages with matching symbol tables
  31. for use by perf report.
  32. 'perf kvm stat <command>' to run a command and gather performance counter
  33. statistics.
  34. Especially, perf 'kvm stat record/report' generates a statistical analysis
  35. of KVM events. Currently, vmexit, mmio and ioport events are supported.
  36. 'perf kvm stat record <command>' records kvm events and the events between
  37. start and end <command>.
  38. And this command produces a file which contains tracing results of kvm
  39. events.
  40. 'perf kvm stat report' reports statistical data which includes events
  41. handled time, samples, and so on.
  42. OPTIONS
  43. -------
  44. -i::
  45. --input=::
  46. Input file name.
  47. -o::
  48. --output::
  49. Output file name.
  50. --host=::
  51. Collect host side performance profile.
  52. --guest=::
  53. Collect guest side performance profile.
  54. --guestmount=<path>::
  55. Guest os root file system mount directory. Users mounts guest os
  56. root directories under <path> by a specific filesystem access method,
  57. typically, sshfs. For example, start 2 guest os. The one's pid is 8888
  58. and the other's is 9999.
  59. #mkdir ~/guestmount; cd ~/guestmount
  60. #sshfs -o allow_other,direct_io -p 5551 localhost:/ 8888/
  61. #sshfs -o allow_other,direct_io -p 5552 localhost:/ 9999/
  62. #perf kvm --host --guest --guestmount=~/guestmount top
  63. --guestkallsyms=<path>::
  64. Guest os /proc/kallsyms file copy. 'perf' kvm' reads it to get guest
  65. kernel symbols. Users copy it out from guest os.
  66. --guestmodules=<path>::
  67. Guest os /proc/modules file copy. 'perf' kvm' reads it to get guest
  68. kernel module information. Users copy it out from guest os.
  69. --guestvmlinux=<path>::
  70. Guest os kernel vmlinux.
  71. STAT REPORT OPTIONS
  72. -------------------
  73. --vcpu=<value>::
  74. analyze events which occures on this vcpu. (default: all vcpus)
  75. --events=<value>::
  76. events to be analyzed. Possible values: vmexit, mmio, ioport.
  77. (default: vmexit)
  78. -k::
  79. --key=<value>::
  80. Sorting key. Possible values: sample (default, sort by samples
  81. number), time (sort by average time).
  82. SEE ALSO
  83. --------
  84. linkperf:perf-top[1], linkperf:perf-record[1], linkperf:perf-report[1],
  85. linkperf:perf-diff[1], linkperf:perf-buildid-list[1],
  86. linkperf:perf-stat[1]