• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1****************************************************************************
2*                            README                                        *
3*                                                                          *
4* This file provides all the information regarding 4 new CLI commands that *
5* enable using Intel(R) Processor Trace Tool from LLDB's CLI.              *
6****************************************************************************
7
8
9============
10Introduction
11============
12A C++ based cli wrapper has been developed to use Intel(R) Processor Trace Tool
13through LLDB's command line. This also provides an idea to all developers on how
14to integrate the Tool into various IDEs providing LLDB as a debugger.
15
16
17
18============
19How to Build
20============
21The wrapper cli-wrapper-pt.cpp needs to be compiled and linked with the shared
22library of the Intel(R) Processor Trace Tool in order to be used through LLDB's
23CLI. The procedure to build shared library of the Intel(R) Processor Trace Tool
24is given in README_TOOL.txt file.
25
26
27
28============
29How to Use
30============
31All these commands are available via shared library (lldbIntelFeatures)
32obtained after building intel-features folder from top. Please refer to
33cli-wrapper.cpp and README files of "intel-features" folder for this purpose.
34
35
36
37============
38Description
39============
404 CLI commands have been designed keeping the LLDB's existing CLI command syntax
41in mind.
42
43   1) processor-trace start [-b <buffer-size>] [<thread-index>]
44
45      Start Intel(R) Processor Trace on a specific thread or on the whole process
46
47      Syntax: processor-trace start  <cmd-options>
48
49      cmd-options Usage:
50        processor-trace start [-b <buffer-size>] [<thread-index>]
51
52          -b <buffer-size>
53             size of the trace buffer to store the trace data. If not specified
54             then a default value (=4KB) will be taken
55
56          <thread-index>
57             thread index of the thread. If no threads are specified, currently
58             selected thread is taken. Use the thread-index 'all' to start
59             tracing the whole process
60
61
62
63   2) processor-trace stop [<thread-index>]
64
65      Stop Intel(R) Processor Trace on a specific thread or on the whole process
66
67      Syntax: processor-trace stop  <cmd-options>
68
69      cmd-options Usage:
70      processor-trace stop [<thread-index>]
71
72          <thread-index>
73             thread index of the thread. If no threads are specified, currently
74             selected thread is taken. Use the thread-index 'all' to stop
75             tracing the whole process
76
77
78
79   3) processor-trace show-trace-options [<thread-index>]
80
81      Display all the information regarding Intel(R) Processor Trace for a specific
82      thread or for the whole process. The information contains trace buffer
83      size and configuration options of Intel(R) Processor Trace.
84
85      Syntax: processor-trace show-trace-options <cmd-options>
86
87      cmd-options Usage:
88        processor-trace show-trace-options [<thread-index>]
89
90          <thread-index>
91             thread index of the thread. If no threads are specified, currently
92             selected thread is taken. Use the thread-index 'all' to display
93             information for all threads of the process
94
95
96
97   4) processor-trace show-instr-log [-o <offset>] [-c <count>] [<thread-index>]
98
99      Display a log of assembly instructions executed for a specific thread or
100      for the whole process. The length of the log to be displayed and the
101      offset in the whole instruction log from where the log needs to be
102      displayed can also be provided. The offset is counted from the end of this
103      whole instruction log which means the last executed instruction is at
104      offset 0 (zero).
105
106      Syntax: processor-trace show-instr-log  <cmd-options>
107
108      cmd-options Usage:
109        processor-trace show-instr-log [-o <offset>] [-c <count>] [<thread-index>]
110
111          -c <count>
112             number of instructions to be displayed. If not specified then a
113             default value (=10) will be taken
114
115          -o <offset>
116             offset in the whole instruction log from where the log will be
117             displayed. If not specified then default value is calculated as
118             offset = count -1
119
120          <thread-index>
121             thread index of the thread. If no threads are specified, currently
122             selected thread is taken. Use the thread-index 'all' to show
123             instruction log for all the threads of the process
124