perf-timechart.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. perf-timechart(1)
  2. =================
  3. NAME
  4. ----
  5. perf-timechart - Tool to visualize total system behavior during a workload
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf timechart' [<timechart options>] {record} [<record options>]
  10. DESCRIPTION
  11. -----------
  12. There are two variants of perf timechart:
  13. 'perf timechart record <command>' to record the system level events
  14. of an arbitrary workload. By default timechart records only scheduler
  15. and CPU events (task switches, running times, CPU power states, etc),
  16. but it's possible to record IO (disk, network) activity using -I argument.
  17. 'perf timechart' to turn a trace into a Scalable Vector Graphics file,
  18. that can be viewed with popular SVG viewers such as 'Inkscape'. Depending
  19. on the events in the perf.data file, timechart will contain scheduler/cpu
  20. events or IO events.
  21. In IO mode, every bar has two charts: upper and lower.
  22. Upper bar shows incoming events (disk reads, ingress network packets).
  23. Lower bar shows outgoing events (disk writes, egress network packets).
  24. There are also poll bars which show how much time application spent
  25. in poll/epoll/select syscalls.
  26. TIMECHART OPTIONS
  27. -----------------
  28. -o::
  29. --output=::
  30. Select the output file (default: output.svg)
  31. -i::
  32. --input=::
  33. Select the input file (default: perf.data unless stdin is a fifo)
  34. -w::
  35. --width=::
  36. Select the width of the SVG file (default: 1000)
  37. -P::
  38. --power-only::
  39. Only output the CPU power section of the diagram
  40. -T::
  41. --tasks-only::
  42. Don't output processor state transitions
  43. -p::
  44. --process::
  45. Select the processes to display, by name or PID
  46. --symfs=<directory>::
  47. Look for files with symbols relative to this directory.
  48. -n::
  49. --proc-num::
  50. Print task info for at least given number of tasks.
  51. -t::
  52. --topology::
  53. Sort CPUs according to topology.
  54. --highlight=<duration_nsecs|task_name>::
  55. Highlight tasks (using different color) that run more than given
  56. duration or tasks with given name. If number is given it's interpreted
  57. as number of nanoseconds. If non-numeric string is given it's
  58. interpreted as task name.
  59. --io-skip-eagain::
  60. Don't draw EAGAIN IO events.
  61. --io-min-time=<nsecs>::
  62. Draw small events as if they lasted min-time. Useful when you need
  63. to see very small and fast IO. It's possible to specify ms or us
  64. suffix to specify time in milliseconds or microseconds.
  65. Default value is 1ms.
  66. --io-merge-dist=<nsecs>::
  67. Merge events that are merge-dist nanoseconds apart.
  68. Reduces number of figures on the SVG and makes it more render-friendly.
  69. It's possible to specify ms or us suffix to specify time in
  70. milliseconds or microseconds.
  71. Default value is 1us.
  72. RECORD OPTIONS
  73. --------------
  74. -P::
  75. --power-only::
  76. Record only power-related events
  77. -T::
  78. --tasks-only::
  79. Record only tasks-related events
  80. -I::
  81. --io-only::
  82. Record only io-related events
  83. -g::
  84. --callchain::
  85. Do call-graph (stack chain/backtrace) recording
  86. EXAMPLES
  87. --------
  88. $ perf timechart record git pull
  89. [ perf record: Woken up 13 times to write data ]
  90. [ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ]
  91. $ perf timechart
  92. Written 10.2 seconds of trace to output.svg.
  93. Record system-wide timechart:
  94. $ perf timechart record
  95. then generate timechart and highlight 'gcc' tasks:
  96. $ perf timechart --highlight gcc
  97. Record system-wide IO events:
  98. $ perf timechart record -I
  99. then generate timechart:
  100. $ perf timechart
  101. SEE ALSO
  102. --------
  103. linkperf:perf-record[1]