Initial implementation of SB APIs for Tracing support.
authorRavitheja Addepally <ravitheja.addepally@intel.com>
Wed, 26 Apr 2017 08:48:50 +0000 (08:48 +0000)
committerRavitheja Addepally <ravitheja.addepally@intel.com>
Wed, 26 Apr 2017 08:48:50 +0000 (08:48 +0000)
commitd5d8d91c1db18b984adb43632a1832202a0ecf1b
tree7391e1acfc7b953e755552c21ed20778ade191f1
parent2bcd94f8d8959a523adf8211c57a94782d561ca5
Initial implementation of SB APIs for Tracing support.

Summary:
This patch introduces new SB APIs for tracing support
inside LLDB. The idea is to gather trace data from
LLDB and provide it through this APIs to external
tools integrating with LLDB. These tools will be
responsible for interpreting and presenting the
trace data to their users.

The patch implements the following new SB APIs ->
-> StartTrace - starts tracing with given parameters
-> StopTrace - stops tracing.
-> GetTraceData - read the trace data .
-> GetMetaData - read the meta data assosciated with the trace.
-> GetTraceConfig - read the trace configuration

Tracing is associated with a user_id that is returned
by the StartTrace API and this id needs to be used
for accessing the trace data and also Stopping
the trace. The user_id itself may map to tracing
the complete process or just an individual thread.
The APIs require an additional thread parameter
when the user of these APIs wishes to perform
thread specific manipulations on the tracing instances.
The patch also includes the corresponding
python wrappers for the C++ based APIs.

Reviewers: k8stone, lldb-commits, clayborg

Reviewed By: clayborg

Subscribers: jingham, mgorny

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

llvm-svn: 301389
22 files changed:
lldb/include/lldb/API/LLDB.h
lldb/include/lldb/API/SBDefines.h
lldb/include/lldb/API/SBError.h
lldb/include/lldb/API/SBProcess.h
lldb/include/lldb/API/SBStructuredData.h
lldb/include/lldb/API/SBTrace.h [new file with mode: 0644]
lldb/include/lldb/API/SBTraceOptions.h [new file with mode: 0644]
lldb/include/lldb/Core/StructuredDataImpl.h [new file with mode: 0644]
lldb/include/lldb/Core/TraceOptions.h [new file with mode: 0644]
lldb/include/lldb/Target/Process.h
lldb/include/lldb/lldb-enumerations.h
lldb/include/lldb/lldb-forward.h
lldb/scripts/interface/SBProcess.i
lldb/scripts/interface/SBStructuredData.i
lldb/scripts/interface/SBTrace.i [new file with mode: 0644]
lldb/scripts/interface/SBTraceOptions.i [new file with mode: 0644]
lldb/scripts/lldb.swig
lldb/source/API/CMakeLists.txt
lldb/source/API/SBProcess.cpp
lldb/source/API/SBStructuredData.cpp
lldb/source/API/SBTrace.cpp [new file with mode: 0644]
lldb/source/API/SBTraceOptions.cpp [new file with mode: 0644]