perf-stat.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. --inherit::
  27. child tasks 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. EXAMPLES
  36. --------
  37. $ perf stat -- make -j
  38. Performance counter stats for 'make -j':
  39. 8117.370256 task clock ticks # 11.281 CPU utilization factor
  40. 678 context switches # 0.000 M/sec
  41. 133 CPU migrations # 0.000 M/sec
  42. 235724 pagefaults # 0.029 M/sec
  43. 24821162526 CPU cycles # 3057.784 M/sec
  44. 18687303457 instructions # 2302.138 M/sec
  45. 172158895 cache references # 21.209 M/sec
  46. 27075259 cache misses # 3.335 M/sec
  47. Wall-clock time elapsed: 719.554352 msecs
  48. SEE ALSO
  49. --------
  50. linkperf:perf-top[1], linkperf:perf-list[1]