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

Top-level HTR class See lldb/docs/htr.rst for comprehensive HTR documentation. More...

#include <TraceHTR.h>

Public Member Functions

 TraceHTR (Thread &thread, TraceCursor &cursor)
 Constructor for a trace's HTR.
 
void ExecutePasses ()
 Executes passes on the HTR layers until no further summarization/compression is achieved.
 
llvm::Error Export (std::string outfile)
 Export HTR layers to the specified format and outfile.
 
llvm::ArrayRef< HTRBlockLayerUPGetBlockLayers () const
 Get the block layers of this HTR.
 
HTRInstructionLayer const & GetInstructionLayer () const
 Get the instruction layer of this HTR.
 
void AddNewBlockLayer (HTRBlockLayerUP &&block_layer)
 Add a new block layer to this HTR.
 

Private Attributes

HTRInstructionLayerUP m_instruction_layer_up
 
std::vector< HTRBlockLayerUPm_block_layer_ups
 

Detailed Description

Top-level HTR class See lldb/docs/htr.rst for comprehensive HTR documentation.

Definition at line 305 of file TraceHTR.h.

Constructor & Destructor Documentation

◆ TraceHTR()

TraceHTR::TraceHTR ( Thread thread,
TraceCursor cursor 
)

Constructor for a trace's HTR.

Parameters
[in]threadThe thread the trace belongs to.
[in]cursorThe trace cursor that gives access to the trace's contents.

Definition at line 129 of file TraceHTR.cpp.

References lldb::eTraceCursorSeekTypeBeginning, lldb_private::TraceCursor::Seek(), and lldb_private::TraceCursor::SetForwards().

Member Function Documentation

◆ AddNewBlockLayer()

void TraceHTR::AddNewBlockLayer ( HTRBlockLayerUP &&  block_layer)

Add a new block layer to this HTR.

Parameters
[in]Thenew block layer to be added.

Definition at line 64 of file TraceHTR.cpp.

References m_block_layer_ups.

Referenced by ExecutePasses().

◆ ExecutePasses()

void TraceHTR::ExecutePasses ( )

Executes passes on the HTR layers until no further summarization/compression is achieved.

Definition at line 211 of file TraceHTR.cpp.

References AddNewBlockLayer(), lldb_private::BasicSuperBlockMerge(), lldb_private::IHTRLayer::GetNumUnits(), and m_instruction_layer_up.

Referenced by lldb_private::ctf::CommandObjectThreadTraceExportCTF::DoExecute().

◆ Export()

llvm::Error TraceHTR::Export ( std::string  outfile)

Export HTR layers to the specified format and outfile.

Parameters
[in]outfileThe file that the exported HTR data will be written to.
Returns
Success if the export is successful, Error otherwise.

Definition at line 233 of file TraceHTR.cpp.

References lldb_private::toJSON().

Referenced by lldb_private::ctf::CommandObjectThreadTraceExportCTF::DoExecute().

◆ GetBlockLayers()

llvm::ArrayRef< HTRBlockLayerUP > TraceHTR::GetBlockLayers ( ) const

Get the block layers of this HTR.

Returns
The block layers of this HTR.

Definition at line 56 of file TraceHTR.cpp.

References m_block_layer_ups.

Referenced by lldb_private::toJSON().

◆ GetInstructionLayer()

HTRInstructionLayer const & TraceHTR::GetInstructionLayer ( ) const

Get the instruction layer of this HTR.

Returns
The instruction layer of this HTR.

Definition at line 60 of file TraceHTR.cpp.

References m_instruction_layer_up.

Referenced by lldb_private::toJSON().

Member Data Documentation

◆ m_block_layer_ups

std::vector<HTRBlockLayerUP> lldb_private::TraceHTR::m_block_layer_ups
private

Definition at line 352 of file TraceHTR.h.

Referenced by AddNewBlockLayer(), and GetBlockLayers().

◆ m_instruction_layer_up

HTRInstructionLayerUP lldb_private::TraceHTR::m_instruction_layer_up
private

Definition at line 350 of file TraceHTR.h.

Referenced by ExecutePasses(), and GetInstructionLayer().


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