LLDB mainline
|
Manages a "process trace" instance by tracing each thread individually. More...
#include <IntelPTPerThreadProcessTrace.h>
Public Member Functions | |
bool | TracesThread (lldb::tid_t tid) const override |
llvm::Error | TraceStart (lldb::tid_t tid) override |
Start tracing the thread given by its tid . | |
llvm::Error | TraceStop (lldb::tid_t tid) override |
Stop tracing the thread given by its tid . | |
TraceIntelPTGetStateResponse | GetState () override |
Construct a minimal jLLDBTraceGetState response for this process trace. | |
llvm::Expected< std::optional< std::vector< uint8_t > > > | TryGetBinaryData (const TraceGetBinaryDataRequest &request) override |
Public Member Functions inherited from lldb_private::process_linux::IntelPTProcessTrace | |
virtual | ~IntelPTProcessTrace ()=default |
virtual void | ProcessDidStop () |
virtual void | ProcessWillResume () |
virtual TraceIntelPTGetStateResponse | GetState ()=0 |
Construct a minimal jLLDBTraceGetState response for this process trace. | |
virtual bool | TracesThread (lldb::tid_t tid) const =0 |
virtual llvm::Error | TraceStart (lldb::tid_t tid)=0 |
Start tracing the thread given by its tid . | |
virtual llvm::Error | TraceStop (lldb::tid_t tid)=0 |
Stop tracing the thread given by its tid . | |
virtual llvm::Expected< std::optional< std::vector< uint8_t > > > | TryGetBinaryData (const TraceGetBinaryDataRequest &request)=0 |
Static Public Member Functions | |
static llvm::Expected< std::unique_ptr< IntelPTPerThreadProcessTrace > > | Start (const TraceIntelPTStartRequest &request, llvm::ArrayRef< lldb::tid_t > current_tids) |
Start tracing the current process by tracing each of its tids individually. | |
Private Member Functions | |
IntelPTPerThreadProcessTrace (const TraceIntelPTStartRequest &request) | |
Private Attributes | |
IntelPTThreadTraceCollection | m_thread_traces |
TraceIntelPTStartRequest | m_tracing_params |
Params used to trace threads when the user started "process tracing". | |
Manages a "process trace" instance by tracing each thread individually.
Definition at line 21 of file IntelPTPerThreadProcessTrace.h.
|
inlineprivate |
Definition at line 52 of file IntelPTPerThreadProcessTrace.h.
|
overridevirtual |
Construct a minimal jLLDBTraceGetState response for this process trace.
Implements lldb_private::process_linux::IntelPTProcessTrace.
Definition at line 38 of file IntelPTPerThreadProcessTrace.cpp.
References lldb_private::process_linux::IntelPTThreadTraceCollection::ForEachThread(), lldb_private::process_linux::IntelPTSingleBufferTrace::GetIptTraceSize(), lldb_private::IntelPTDataKinds::kIptTrace, m_thread_traces, and lldb_private::TraceGetStateResponse::traced_threads.
|
static |
Start tracing the current process by tracing each of its tids individually.
[in] | request | Intel PT configuration parameters. |
[in] | current_tids | List of tids currently alive. In the future, whenever a new thread is spawned, they should be traced by calling the TraceStart(tid) method. |
Definition at line 56 of file IntelPTPerThreadProcessTrace.cpp.
References error().
Referenced by lldb_private::process_linux::IntelPTCollector::TraceStart().
|
overridevirtual |
Start tracing the thread given by its tid
.
Implements lldb_private::process_linux::IntelPTProcessTrace.
Definition at line 25 of file IntelPTPerThreadProcessTrace.cpp.
References lldb_private::process_linux::IntelPTThreadTraceCollection::GetTotalBufferSize(), lldb_private::TraceIntelPTStartRequest::ipt_trace_size, m_thread_traces, m_tracing_params, lldb_private::TraceIntelPTStartRequest::process_buffer_size_limit, and lldb_private::process_linux::IntelPTThreadTraceCollection::TraceStart().
|
overridevirtual |
Implements lldb_private::process_linux::IntelPTProcessTrace.
Definition at line 17 of file IntelPTPerThreadProcessTrace.cpp.
References m_thread_traces, and lldb_private::process_linux::IntelPTThreadTraceCollection::TracesThread().
|
overridevirtual |
Stop tracing the thread given by its tid
.
Implements lldb_private::process_linux::IntelPTProcessTrace.
Definition at line 21 of file IntelPTPerThreadProcessTrace.cpp.
References m_thread_traces, and lldb_private::process_linux::IntelPTThreadTraceCollection::TraceStop().
|
overridevirtual |
Implements lldb_private::process_linux::IntelPTProcessTrace.
Definition at line 50 of file IntelPTPerThreadProcessTrace.cpp.
References m_thread_traces, and lldb_private::process_linux::IntelPTThreadTraceCollection::TryGetBinaryData().
|
private |
Definition at line 55 of file IntelPTPerThreadProcessTrace.h.
Referenced by GetState(), TraceStart(), TracesThread(), TraceStop(), and TryGetBinaryData().
|
private |
Params used to trace threads when the user started "process tracing".
Definition at line 57 of file IntelPTPerThreadProcessTrace.h.
Referenced by TraceStart().