Tool for using Intel(R) Processor Trace hardware feature
authorAbhishek Aggarwal <abhishek.a.aggarwal@intel.com>
Mon, 7 Aug 2017 15:26:11 +0000 (15:26 +0000)
committerAbhishek Aggarwal <abhishek.a.aggarwal@intel.com>
Mon, 7 Aug 2017 15:26:11 +0000 (15:26 +0000)
commit307db0f8974d1b28d7b237cb0d50895efc7f6e6b
tree33e703e75ec17b74787dc273146ccf3a3e1810db
parent9581b42589d72d1c931c4bcbc0101df7c507e27e
Tool for using Intel(R) Processor Trace hardware feature

Summary:
1. Provide single library for all Intel specific hardware features instead
    of individual libraries for each feature
2. Added Intel(R) Processor Trace hardware feature in this single library.
    Details about the tool implementing this feature is as follows:

     Tool developed on top of LLDB to provide its users the execution
     trace of the debugged inferiors. Tool's API are exposed as C++ object
     oriented interface in a shared library. API are designed especially to be
     easily integrable with IDEs providing LLDB as an application debugger.
     Entire API is also available as Python functions through a script bridging
     interface allowing development of python modules.

     This patch also provides a CLI wrapper to use the Tool through LLDB's command
     line. Highlights of the Tool and the wrapper are given below:

  ******************************
  Intel(R) Processor Trace Tool:
  ******************************
       - Provides execution trace of the debugged application
       - Uses Intel(R) Processor Trace hardware feature (already implemented inside LLDB)
         for this purpose
           -- Collects trace packets generated by this feature from LLDB, decodes and
              post-processes them
           -- Constructs the execution trace of the application
           -- Presents execution trace as a list of assembly instructions
       - Provides 4 APIs (exposed as C++ object oriented interface)
           -- start trace with configuration options for a thread/process,
           -- stop trace for a thread/process,
           -- get the execution flow (assembly instructions) for a thread,
           -- get trace specific information for a thread
       - Easily integrable into IDEs providing LLDB as application debugger
       - Entire API available as Python functions through script bridging interface
           -- Allows developing python apps on top of Tool
       - README_TOOL.txt provides more details about the Tool, its dependencies, building
         steps and API usage
       - Tool ready to use through LLDB's command line
           -- CLI wrapper has been developed on top of the Tool for this purpose

  *********************************
  CLI wrapper: cli-wrapper-pt.cpp
  *********************************
       - Provides 4 commands (syntax similar to LLDB's CLI commands):
           -- processor-trace start
           -- processor-trace stop
           -- processor-trace show-trace-options
           -- processor-trace show-instr-log
       - README_CLI.txt provides more details about commands and their options

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>
Reviewers: clayborg, jingham, lldb-commits, labath

Reviewed By: clayborg

Subscribers: ravitheja, emaste, krytarowski, mgorny

Differential Revision: https://reviews.llvm.org/D33035

llvm-svn: 310261
23 files changed:
lldb/tools/CMakeLists.txt
lldb/tools/intel-features/CMakeLists.txt [new file with mode: 0644]
lldb/tools/intel-features/README.txt [new file with mode: 0644]
lldb/tools/intel-features/cli-wrapper.cpp [new file with mode: 0644]
lldb/tools/intel-features/intel-mpx/CMakeLists.txt [new file with mode: 0644]
lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp [moved from lldb/tools/intel-mpx/IntelMPXTablePlugin.cpp with 95% similarity]
lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.h [new file with mode: 0644]
lldb/tools/intel-features/intel-mpx/test/Makefile [moved from lldb/tools/intel-mpx/test/Makefile with 100% similarity]
lldb/tools/intel-features/intel-mpx/test/README.txt [moved from lldb/tools/intel-mpx/test/README.txt with 74% similarity]
lldb/tools/intel-features/intel-mpx/test/TestMPXTable.py [moved from lldb/tools/intel-mpx/test/TestMPXTable.py with 94% similarity]
lldb/tools/intel-features/intel-mpx/test/main.cpp [moved from lldb/tools/intel-mpx/test/main.cpp with 90% similarity]
lldb/tools/intel-features/intel-pt/CMakeLists.txt [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/Decoder.cpp [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/Decoder.h [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/PTDecoder.cpp [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/PTDecoder.h [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/README_CLI.txt [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/README_TOOL.txt [new file with mode: 0644]
lldb/tools/intel-features/intel-pt/interface/PTDecoder.i [new file with mode: 0644]
lldb/tools/intel-features/scripts/CMakeLists.txt [new file with mode: 0644]
lldb/tools/intel-features/scripts/lldb-intel-features.swig [new file with mode: 0644]
lldb/tools/intel-features/scripts/python-typemaps.txt [new file with mode: 0644]
lldb/tools/intel-mpx/CMakeLists.txt [deleted file]