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
74 lines
2.8 KiB
Plaintext
74 lines
2.8 KiB
Plaintext
****************************************************************************
|
|
* README *
|
|
* *
|
|
* This file provides all the information regarding new CLI commands that *
|
|
* enable using various hardware features of Intel(R) architecture based *
|
|
* processors from LLDB's CLI. *
|
|
****************************************************************************
|
|
|
|
|
|
============
|
|
Introduction
|
|
============
|
|
A shared library has been developed to use various hardware features of
|
|
Intel(R) architecture based processors through LLDB's command line. The library
|
|
currently comprises of hardware features namely Intel(R) Processor Trace and
|
|
Intel(R) Memory Protection Extensions.
|
|
|
|
|
|
============
|
|
Details
|
|
============
|
|
A C++ based cli wrapper (cli-wrapper.cpp) has been developed here that
|
|
agglomerates all cli commands for various hardware features. This wrapper is
|
|
build to generate a shared library (lldbIntelFeatures) to provide all these
|
|
commands.
|
|
|
|
For each hardware feature, separate cli commands have been developed that are
|
|
provided by wrappers (cli-wrapper-pt.cpp and cli-wrapper-mpxtable.cpp) residing
|
|
in feature specific folders ("intel-pt" and "intel-mpx" respectively).
|
|
|
|
For details regarding cli commands of each feature, please refer to these
|
|
feature specific wrappers.
|
|
|
|
|
|
|
|
============
|
|
How to Build
|
|
============
|
|
The shared library (lldbIntelFeatures) has a cmake based build and can be built
|
|
while building LLDB with cmake. "cli-wrapper.cpp" file is compiled along with all
|
|
the feature specific source files (residing in feature specific folders).
|
|
|
|
Furthermore, flexibility is provided to the user to include/exclude a particular
|
|
feature while building lldbIntelFeatures library. This is done by flags described
|
|
below:
|
|
|
|
- LLDB_BUILD_INTEL_PT - The flag enables building of Intel(R) Processor Trace
|
|
feature (inside intel-pt folder). This flag defaults to "OFF" meaning the
|
|
feature is excluded while building lldbIntelFeatures library. Set it to "ON"
|
|
in order to include it.
|
|
|
|
- LLDB_BUILD_INTEL_MPX - Enables building Intel(R) Memory Protection Extensions
|
|
feature (inside intel-mpx folder). This flag defaults to "ON" meaning
|
|
the feature is excluded while building lldbIntelFeatures library.
|
|
|
|
Please refer to README files in feature specific folders to know about additional
|
|
flags that need to be set in order to build that feature successfully.
|
|
|
|
|
|
============
|
|
How to Use
|
|
============
|
|
All CLI commands provided by this shared library can be used through the LLDB's
|
|
CLI by executing "plugin load <shared_lib_name>" on LLDB CLI. shared_lib_name here
|
|
is lldbIntelFeatures
|
|
|
|
|
|
|
|
============
|
|
Description
|
|
============
|
|
Please refer to README_CLI file of each feature to know about details of CLI
|
|
commands.
|