Back to home page

OSCL-LXR

 
 

    


0001 Intel Branch Trace Store
0002 ========================
0003 
0004 Overview
0005 ========
0006 
0007 Intel BTS could be regarded as a predecessor to Intel PT and has some
0008 similarities because it can also identify every branch a program takes.  A
0009 notable difference is that Intel BTS has no timing information and as a
0010 consequence the present implementation is limited to per-thread recording.
0011 
0012 While decoding Intel BTS does not require walking the object code, the object
0013 code is still needed to pair up calls and returns correctly, consequently much
0014 of the Intel PT documentation applies also to Intel BTS.  Refer to the Intel PT
0015 documentation and consider that the PMU 'intel_bts' can usually be used in
0016 place of 'intel_pt' in the examples provided, with the proviso that per-thread
0017 recording must also be stipulated i.e. the --per-thread option for
0018 'perf record'.
0019 
0020 
0021 perf record
0022 ===========
0023 
0024 new event
0025 ---------
0026 
0027 The Intel BTS kernel driver creates a new PMU for Intel BTS.  The perf record
0028 option is:
0029 
0030         -e intel_bts//
0031 
0032 Currently Intel BTS is limited to per-thread tracing so the --per-thread option
0033 is also needed.
0034 
0035 
0036 snapshot option
0037 ---------------
0038 
0039 The snapshot option is the same as Intel PT (refer Intel PT documentation).
0040 
0041 
0042 auxtrace mmap size option
0043 -----------------------
0044 
0045 The mmap size option is the same as Intel PT (refer Intel PT documentation).
0046 
0047 
0048 perf script
0049 ===========
0050 
0051 By default, perf script will decode trace data found in the perf.data file.
0052 This can be further controlled by option --itrace.  The --itrace option is
0053 the same as Intel PT (refer Intel PT documentation) except that neither
0054 "instructions" events nor "transactions" events (and consequently call
0055 chains) are supported.
0056 
0057 To disable trace decoding entirely, use the option --no-itrace.
0058 
0059 
0060 dump option
0061 -----------
0062 
0063 perf script has an option (-D) to "dump" the events i.e. display the binary
0064 data.
0065 
0066 When -D is used, Intel BTS packets are displayed.
0067 
0068 To disable the display of Intel BTS packets, combine the -D option with
0069 --no-itrace.
0070 
0071 
0072 perf report
0073 ===========
0074 
0075 By default, perf report will decode trace data found in the perf.data file.
0076 This can be further controlled by new option --itrace exactly the same as
0077 perf script.
0078 
0079 
0080 perf inject
0081 ===========
0082 
0083 perf inject also accepts the --itrace option in which case tracing data is
0084 removed and replaced with the synthesized events. e.g.
0085 
0086         perf inject --itrace -i perf.data -o perf.data.new