This is an archive of the discontinued LLVM Phabricator instance.

Tool for using Intel(R) Processor Trace hardware feature
AbandonedPublic

Authored by abhishek.aggarwal on May 10 2017, 5:35 AM.

Details

Summary

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.cpp
******************************
  - Provides 4 commands (syntax similar to LLDB's CLI commands):
      -- processor-trace start
      -- processor-trace stop
      -- processor-trace show-info
      -- 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>

Diff Detail

Event Timeline

#Updating D33034: Tool for using Intel(R) Processor Trace hardware feature

  1. Enter a brief description of the changes included in this update.
  2. The first line is used as subject, next lines as comment. Commit message formatting changes
abhishek.aggarwal edited the summary of this revision. (Show Details)May 10 2017, 5:57 AM
abhishek.aggarwal edited the summary of this revision. (Show Details)
abhishek.aggarwal edited the summary of this revision. (Show Details)May 10 2017, 6:00 AM
abhishek.aggarwal edited the summary of this revision. (Show Details)
abhishek.aggarwal edited the summary of this revision. (Show Details)
abhishek.aggarwal abandoned this revision.May 10 2017, 6:04 AM

Abandoning this change due to formatting problem with commit message.