intel-bts.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Intel Branch Trace Store
  2. ========================
  3. Overview
  4. ========
  5. Intel BTS could be regarded as a predecessor to Intel PT and has some
  6. similarities because it can also identify every branch a program takes. A
  7. notable difference is that Intel BTS has no timing information and as a
  8. consequence the present implementation is limited to per-thread recording.
  9. While decoding Intel BTS does not require walking the object code, the object
  10. code is still needed to pair up calls and returns correctly, consequently much
  11. of the Intel PT documentation applies also to Intel BTS. Refer to the Intel PT
  12. documentation and consider that the PMU 'intel_bts' can usually be used in
  13. place of 'intel_pt' in the examples provided, with the proviso that per-thread
  14. recording must also be stipulated i.e. the --per-thread option for
  15. 'perf record'.
  16. perf record
  17. ===========
  18. new event
  19. ---------
  20. The Intel BTS kernel driver creates a new PMU for Intel BTS. The perf record
  21. option is:
  22. -e intel_bts//
  23. Currently Intel BTS is limited to per-thread tracing so the --per-thread option
  24. is also needed.
  25. snapshot option
  26. ---------------
  27. The snapshot option is the same as Intel PT (refer Intel PT documentation).
  28. auxtrace mmap size option
  29. -----------------------
  30. The mmap size option is the same as Intel PT (refer Intel PT documentation).
  31. perf script
  32. ===========
  33. By default, perf script will decode trace data found in the perf.data file.
  34. This can be further controlled by option --itrace. The --itrace option is
  35. the same as Intel PT (refer Intel PT documentation) except that neither
  36. "instructions" events nor "transactions" events (and consequently call
  37. chains) are supported.
  38. To disable trace decoding entirely, use the option --no-itrace.
  39. dump option
  40. -----------
  41. perf script has an option (-D) to "dump" the events i.e. display the binary
  42. data.
  43. When -D is used, Intel BTS packets are displayed.
  44. To disable the display of Intel BTS packets, combine the -D option with
  45. --no-itrace.
  46. perf report
  47. ===========
  48. By default, perf report will decode trace data found in the perf.data file.
  49. This can be further controlled by new option --itrace exactly the same as
  50. perf script.
  51. perf inject
  52. ===========
  53. perf inject also accepts the --itrace option in which case tracing data is
  54. removed and replaced with the synthesized events. e.g.
  55. perf inject --itrace -i perf.data -o perf.data.new