perf-stat.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. perf-stat(1)
  2. ============
  3. NAME
  4. ----
  5. perf-stat - Run a command and gather performance counter statistics
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf stat' [-e <EVENT> | --event=EVENT] [-S] [-a] <command>
  10. 'perf stat' [-e <EVENT> | --event=EVENT] [-S] [-a] -- <command> [<options>]
  11. DESCRIPTION
  12. -----------
  13. This command runs a command and gathers performance counter statistics
  14. from it.
  15. OPTIONS
  16. -------
  17. <command>...::
  18. Any command you can specify in a shell.
  19. -e::
  20. --event=::
  21. Select the PMU event. Selection can be a symbolic event name
  22. (use 'perf list' to list all events) or a raw PMU
  23. event (eventsel+umask) in the form of rNNN where NNN is a
  24. hexadecimal event descriptor.
  25. -i::
  26. --no-inherit::
  27. child tasks do not inherit counters
  28. -p::
  29. --pid=<pid>::
  30. stat events on existing pid
  31. -a::
  32. system-wide collection
  33. -c::
  34. scale counter values
  35. -B::
  36. print large numbers with thousands' separators according to locale
  37. EXAMPLES
  38. --------
  39. $ perf stat -- make -j
  40. Performance counter stats for 'make -j':
  41. 8117.370256 task clock ticks # 11.281 CPU utilization factor
  42. 678 context switches # 0.000 M/sec
  43. 133 CPU migrations # 0.000 M/sec
  44. 235724 pagefaults # 0.029 M/sec
  45. 24821162526 CPU cycles # 3057.784 M/sec
  46. 18687303457 instructions # 2302.138 M/sec
  47. 172158895 cache references # 21.209 M/sec
  48. 27075259 cache misses # 3.335 M/sec
  49. Wall-clock time elapsed: 719.554352 msecs
  50. SEE ALSO
  51. --------
  52. linkperf:perf-top[1], linkperf:perf-list[1]