perf-diff.txt 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. perf-diff(1)
  2. ============
  3. NAME
  4. ----
  5. perf-diff - Read perf.data files and display the differential profile
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf diff' [baseline file] [data file1] [[data file2] ... ]
  10. DESCRIPTION
  11. -----------
  12. This command displays the performance difference amongst two or more perf.data
  13. files captured via perf record.
  14. If no parameters are passed it will assume perf.data.old and perf.data.
  15. The differential profile is displayed only for events matching both
  16. specified perf.data files.
  17. OPTIONS
  18. -------
  19. -D::
  20. --dump-raw-trace::
  21. Dump raw trace in ASCII.
  22. -m::
  23. --modules::
  24. Load module symbols. WARNING: use only with -k and LIVE kernel
  25. -d::
  26. --dsos=::
  27. Only consider symbols in these dsos. CSV that understands
  28. file://filename entries.
  29. -C::
  30. --comms=::
  31. Only consider symbols in these comms. CSV that understands
  32. file://filename entries.
  33. -S::
  34. --symbols=::
  35. Only consider these symbols. CSV that understands
  36. file://filename entries.
  37. -s::
  38. --sort=::
  39. Sort by key(s): pid, comm, dso, symbol.
  40. -t::
  41. --field-separator=::
  42. Use a special separator character and don't pad with spaces, replacing
  43. all occurrences of this separator in symbol names (and other output)
  44. with a '.' character, that thus it's the only non valid separator.
  45. -v::
  46. --verbose::
  47. Be verbose, for instance, show the raw counts in addition to the
  48. diff.
  49. -f::
  50. --force::
  51. Don't complain, do it.
  52. --symfs=<directory>::
  53. Look for files with symbols relative to this directory.
  54. -b::
  55. --baseline-only::
  56. Show only items with match in baseline.
  57. -c::
  58. --compute::
  59. Differential computation selection - delta,ratio,wdiff (default is delta).
  60. See COMPARISON METHODS section for more info.
  61. -p::
  62. --period::
  63. Show period values for both compared hist entries.
  64. -F::
  65. --formula::
  66. Show formula for given computation.
  67. -o::
  68. --order::
  69. Specify compute sorting column number.
  70. COMPARISON
  71. ----------
  72. The comparison is governed by the baseline file. The baseline perf.data
  73. file is iterated for samples. All other perf.data files specified on
  74. the command line are searched for the baseline sample pair. If the pair
  75. is found, specified computation is made and result is displayed.
  76. All samples from non-baseline perf.data files, that do not match any
  77. baseline entry, are displayed with empty space within baseline column
  78. and possible computation results (delta) in their related column.
  79. Example files samples:
  80. - file A with samples f1, f2, f3, f4, f6
  81. - file B with samples f2, f4, f5
  82. - file C with samples f1, f2, f5
  83. Example output:
  84. x - computation takes place for pair
  85. b - baseline sample percentage
  86. - perf diff A B C
  87. baseline/A compute/B compute/C samples
  88. ---------------------------------------
  89. b x f1
  90. b x x f2
  91. b f3
  92. b x f4
  93. b f6
  94. x x f5
  95. - perf diff B A C
  96. baseline/B compute/A compute/C samples
  97. ---------------------------------------
  98. b x x f2
  99. b x f4
  100. b x f5
  101. x x f1
  102. x f3
  103. x f6
  104. - perf diff C B A
  105. baseline/C compute/B compute/A samples
  106. ---------------------------------------
  107. b x f1
  108. b x x f2
  109. b x f5
  110. x f3
  111. x x f4
  112. x f6
  113. COMPARISON METHODS
  114. ------------------
  115. delta
  116. ~~~~~
  117. If specified the 'Delta' column is displayed with value 'd' computed as:
  118. d = A->period_percent - B->period_percent
  119. with:
  120. - A/B being matching hist entry from data/baseline file specified
  121. (or perf.data/perf.data.old) respectively.
  122. - period_percent being the % of the hist entry period value within
  123. single data file
  124. ratio
  125. ~~~~~
  126. If specified the 'Ratio' column is displayed with value 'r' computed as:
  127. r = A->period / B->period
  128. with:
  129. - A/B being matching hist entry from data/baseline file specified
  130. (or perf.data/perf.data.old) respectively.
  131. - period being the hist entry period value
  132. wdiff:WEIGHT-B,WEIGHT-A
  133. ~~~~~~~~~~~~~~~~~~~~~~~
  134. If specified the 'Weighted diff' column is displayed with value 'd' computed as:
  135. d = B->period * WEIGHT-A - A->period * WEIGHT-B
  136. - A/B being matching hist entry from data/baseline file specified
  137. (or perf.data/perf.data.old) respectively.
  138. - period being the hist entry period value
  139. - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
  140. behind ':' separator like '-c wdiff:1,2'.
  141. - WIEGHT-A being the weight of the data file
  142. - WIEGHT-B being the weight of the baseline data file
  143. SEE ALSO
  144. --------
  145. linkperf:perf-record[1]