LLDB mainline
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::trace_intel_pt::ThreadDecoder Class Reference

Class that handles the decoding of a thread and caches the result. More...

#include <ThreadDecoder.h>

Public Member Functions

 ThreadDecoder (const lldb::ThreadSP &thread_sp, TraceIntelPT &trace)
 
llvm::Expected< DecodedThreadSPDecode ()
 Decode the thread and store the result internally, to avoid recomputations.
 
llvm::Expected< std::optional< uint64_t > > FindLowestTSC ()
 
 ThreadDecoder (const ThreadDecoder &other)=delete
 
ThreadDecoderoperator= (const ThreadDecoder &other)=delete
 

Private Member Functions

llvm::Expected< DecodedThreadSPDoDecode ()
 

Private Attributes

lldb::ThreadSP m_thread_sp
 
TraceIntelPTm_trace
 
std::optional< DecodedThreadSPm_decoded_thread
 

Detailed Description

Class that handles the decoding of a thread and caches the result.

Definition at line 23 of file ThreadDecoder.h.

Constructor & Destructor Documentation

◆ ThreadDecoder() [1/2]

ThreadDecoder::ThreadDecoder ( const lldb::ThreadSP thread_sp,
TraceIntelPT trace 
)
Parameters
[in]thread_spThe thread whose intel pt trace buffer will be decoded.
[in]traceThe main Trace object who owns this decoder and its data.

Definition at line 21 of file ThreadDecoder.cpp.

◆ ThreadDecoder() [2/2]

lldb_private::trace_intel_pt::ThreadDecoder::ThreadDecoder ( const ThreadDecoder other)
delete

Member Function Documentation

◆ Decode()

Expected< DecodedThreadSP > ThreadDecoder::Decode ( )

Decode the thread and store the result internally, to avoid recomputations.

Returns
A DecodedThread instance.

Definition at line 40 of file ThreadDecoder.cpp.

References DoDecode(), and m_decoded_thread.

◆ DoDecode()

llvm::Expected< DecodedThreadSP > ThreadDecoder::DoDecode ( )
private

◆ FindLowestTSC()

Expected< std::optional< uint64_t > > ThreadDecoder::FindLowestTSC ( )
Returns
The lowest TSC value in this trace if available, std::nullopt if the trace is empty or the trace contains no timing information, or an llvm::Error if it was not possible to set up the decoder.

Definition at line 24 of file ThreadDecoder.cpp.

References m_thread_sp, m_trace, and lldb_private::trace_intel_pt::TraceIntelPT::OnThreadBufferRead().

◆ operator=()

ThreadDecoder & lldb_private::trace_intel_pt::ThreadDecoder::operator= ( const ThreadDecoder other)
delete

Member Data Documentation

◆ m_decoded_thread

std::optional<DecodedThreadSP> lldb_private::trace_intel_pt::ThreadDecoder::m_decoded_thread
private

Definition at line 53 of file ThreadDecoder.h.

Referenced by Decode().

◆ m_thread_sp

lldb::ThreadSP lldb_private::trace_intel_pt::ThreadDecoder::m_thread_sp
private

Definition at line 51 of file ThreadDecoder.h.

Referenced by DoDecode(), and FindLowestTSC().

◆ m_trace

TraceIntelPT& lldb_private::trace_intel_pt::ThreadDecoder::m_trace
private

Definition at line 52 of file ThreadDecoder.h.

Referenced by DoDecode(), and FindLowestTSC().


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