perf-timechart.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. -f::
  47. --force::
  48. Don't complain, do it.
  49. --symfs=<directory>::
  50. Look for files with symbols relative to this directory.
  51. -n::
  52. --proc-num::
  53. Print task info for at least given number of tasks.
  54. -t::
  55. --topology::
  56. Sort CPUs according to topology.
  57. --highlight=<duration_nsecs|task_name>::
  58. Highlight tasks (using different color) that run more than given
  59. duration or tasks with given name. If number is given it's interpreted
  60. as number of nanoseconds. If non-numeric string is given it's
  61. interpreted as task name.
  62. --io-skip-eagain::
  63. Don't draw EAGAIN IO events.
  64. --io-min-time=<nsecs>::
  65. Draw small events as if they lasted min-time. Useful when you need
  66. to see very small and fast IO. It's possible to specify ms or us
  67. suffix to specify time in milliseconds or microseconds.
  68. Default value is 1ms.
  69. --io-merge-dist=<nsecs>::
  70. Merge events that are merge-dist nanoseconds apart.
  71. Reduces number of figures on the SVG and makes it more render-friendly.
  72. It's possible to specify ms or us suffix to specify time in
  73. milliseconds or microseconds.
  74. Default value is 1us.
  75. RECORD OPTIONS
  76. --------------
  77. -P::
  78. --power-only::
  79. Record only power-related events
  80. -T::
  81. --tasks-only::
  82. Record only tasks-related events
  83. -I::
  84. --io-only::
  85. Record only io-related events
  86. -g::
  87. --callchain::
  88. Do call-graph (stack chain/backtrace) recording
  89. EXAMPLES
  90. --------
  91. $ perf timechart record git pull
  92. [ perf record: Woken up 13 times to write data ]
  93. [ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ]
  94. $ perf timechart
  95. Written 10.2 seconds of trace to output.svg.
  96. Record system-wide timechart:
  97. $ perf timechart record
  98. then generate timechart and highlight 'gcc' tasks:
  99. $ perf timechart --highlight gcc
  100. Record system-wide IO events:
  101. $ perf timechart record -I
  102. then generate timechart:
  103. $ perf timechart
  104. SEE ALSO
  105. --------
  106. linkperf:perf-record[1]