LLDB  mainline
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::process_linux::IntelPTPerThreadProcessTrace Class Reference

Manages a "process trace" instance by tracing each thread individually. More...

#include <IntelPTPerThreadProcessTrace.h>

Inheritance diagram for lldb_private::process_linux::IntelPTPerThreadProcessTrace:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::process_linux::IntelPTPerThreadProcessTrace:
Collaboration graph
[legend]

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. More...
 
llvm::Error TraceStop (lldb::tid_t tid) override
 Stop tracing the thread given by its tid. More...
 
TraceIntelPTGetStateResponse GetState () override
 Construct a minimal jLLDBTraceGetState response for this process trace. More...
 
llvm::Expected< llvm::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 ()
 

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. More...
 

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". More...
 

Detailed Description

Manages a "process trace" instance by tracing each thread individually.

Definition at line 20 of file IntelPTPerThreadProcessTrace.h.

Constructor & Destructor Documentation

◆ IntelPTPerThreadProcessTrace()

lldb_private::process_linux::IntelPTPerThreadProcessTrace::IntelPTPerThreadProcessTrace ( const TraceIntelPTStartRequest request)
inlineprivate

Definition at line 51 of file IntelPTPerThreadProcessTrace.h.

Member Function Documentation

◆ GetState()

TraceIntelPTGetStateResponse IntelPTPerThreadProcessTrace::GetState ( )
overridevirtual

◆ Start()

Expected< std::unique_ptr< IntelPTPerThreadProcessTrace > > IntelPTPerThreadProcessTrace::Start ( const TraceIntelPTStartRequest request,
llvm::ArrayRef< lldb::tid_t current_tids 
)
static

Start tracing the current process by tracing each of its tids individually.

Parameters
[in]requestIntel PT configuration parameters.
[in]current_tidsList of tids currently alive. In the future, whenever a new thread is spawned, they should be traced by calling the TraceStart(tid) method.
Returns
An IntelPTMultiCoreTrace instance if tracing was successful, or an llvm::Error otherwise.

Definition at line 55 of file IntelPTPerThreadProcessTrace.cpp.

References error().

Referenced by lldb_private::process_linux::IntelPTCollector::TraceStart().

◆ TraceStart()

Error IntelPTPerThreadProcessTrace::TraceStart ( lldb::tid_t  tid)
overridevirtual

Start tracing the thread given by its tid.

Returns
An error if the operation failed.

Implements lldb_private::process_linux::IntelPTProcessTrace.

Definition at line 24 of file IntelPTPerThreadProcessTrace.cpp.

◆ TracesThread()

bool IntelPTPerThreadProcessTrace::TracesThread ( lldb::tid_t  tid) const
overridevirtual

◆ TraceStop()

Error IntelPTPerThreadProcessTrace::TraceStop ( lldb::tid_t  tid)
overridevirtual

Stop tracing the thread given by its tid.

Returns
An error if the given thread is not being traced or tracing couldn't be stopped.

Implements lldb_private::process_linux::IntelPTProcessTrace.

Definition at line 20 of file IntelPTPerThreadProcessTrace.cpp.

◆ TryGetBinaryData()

Expected< llvm::Optional< std::vector< uint8_t > > > IntelPTPerThreadProcessTrace::TryGetBinaryData ( const TraceGetBinaryDataRequest request)
overridevirtual
Returns
None if this instance doesn't support the requested data, an llvm::Error if this isntance supports it but fails at fetching it, and Error::success() otherwise.

Implements lldb_private::process_linux::IntelPTProcessTrace.

Definition at line 49 of file IntelPTPerThreadProcessTrace.cpp.

Member Data Documentation

◆ m_thread_traces

IntelPTThreadTraceCollection lldb_private::process_linux::IntelPTPerThreadProcessTrace::m_thread_traces
private

Definition at line 54 of file IntelPTPerThreadProcessTrace.h.

◆ m_tracing_params

TraceIntelPTStartRequest lldb_private::process_linux::IntelPTPerThreadProcessTrace::m_tracing_params
private

Params used to trace threads when the user started "process tracing".

Definition at line 56 of file IntelPTPerThreadProcessTrace.h.


The documentation for this class was generated from the following files: