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

#include <DecodedThread.h>

Collaboration diagram for lldb_private::trace_intel_pt::DecodedThread::TscRange:
Collaboration graph
[legend]

Public Member Functions

bool InRange (size_t insn_index) const
 Check if this TSC range includes the given instruction index. More...
 
llvm::Optional< TscRangeNext () const
 Get the next range chronologically. More...
 
llvm::Optional< TscRangePrev () const
 Get the previous range chronologically. More...
 
size_t GetTsc () const
 Get the TSC value. More...
 
size_t GetStartInstructionIndex () const
 Get the smallest instruction index that has this TSC. More...
 
size_t GetEndInstructionIndex () const
 Get the largest instruction index that has this TSC. More...
 

Private Member Functions

 TscRange (std::map< size_t, uint64_t >::const_iterator it, const DecodedThread &decoded_thread)
 

Private Attributes

std::map< size_t, uint64_t >::const_iterator m_it
 The iterator pointing to the beginning of the range. More...
 
size_t m_end_index
 The largest instruction index that has this TSC. More...
 
const DecodedThreadm_decoded_thread
 

Friends

class DecodedThread
 

Detailed Description

Class that represents the trace range associated with a given TSC. It provides efficient iteration to the previous or next TSC range in the decoded trace.

TSC timestamps are emitted by the decoder infrequently, which means that each TSC covers a range of instruction indices, which can be used to speed up TSC lookups.

Definition at line 82 of file DecodedThread.h.

Constructor & Destructor Documentation

◆ TscRange()

DecodedThread::TscRange::TscRange ( std::map< size_t, uint64_t >::const_iterator  it,
const DecodedThread decoded_thread 
)
private

Member Function Documentation

◆ GetEndInstructionIndex()

size_t DecodedThread::TscRange::GetEndInstructionIndex ( ) const

Get the largest instruction index that has this TSC.

Definition at line 200 of file DecodedThread.cpp.

◆ GetStartInstructionIndex()

size_t DecodedThread::TscRange::GetStartInstructionIndex ( ) const

Get the smallest instruction index that has this TSC.

Definition at line 196 of file DecodedThread.cpp.

◆ GetTsc()

size_t DecodedThread::TscRange::GetTsc ( ) const

Get the TSC value.

Definition at line 194 of file DecodedThread.cpp.

◆ InRange()

bool DecodedThread::TscRange::InRange ( size_t  insn_index) const

Check if this TSC range includes the given instruction index.

Definition at line 204 of file DecodedThread.cpp.

◆ Next()

Optional< DecodedThread::TscRange > DecodedThread::TscRange::Next ( ) const

Get the next range chronologically.

Definition at line 209 of file DecodedThread.cpp.

◆ Prev()

Optional< DecodedThread::TscRange > DecodedThread::TscRange::Prev ( ) const

Get the previous range chronologically.

Definition at line 217 of file DecodedThread.cpp.

Friends And Related Function Documentation

◆ DecodedThread

friend class DecodedThread
friend

Definition at line 101 of file DecodedThread.h.

Member Data Documentation

◆ m_decoded_thread

const DecodedThread* lldb_private::trace_intel_pt::DecodedThread::TscRange::m_decoded_thread
private

Definition at line 111 of file DecodedThread.h.

Referenced by TscRange().

◆ m_end_index

size_t lldb_private::trace_intel_pt::DecodedThread::TscRange::m_end_index
private

The largest instruction index that has this TSC.

Definition at line 109 of file DecodedThread.h.

Referenced by TscRange().

◆ m_it

std::map<size_t, uint64_t>::const_iterator lldb_private::trace_intel_pt::DecodedThread::TscRange::m_it
private

The iterator pointing to the beginning of the range.

Definition at line 107 of file DecodedThread.h.

Referenced by TscRange().


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