LLDB mainline
|
"Base" layer of HTR representing the dynamic instructions of the trace. More...
#include <TraceHTR.h>
Public Member Functions | |
HTRInstructionLayer (size_t id) | |
Construct new instruction layer. | |
size_t | GetNumUnits () const override |
Get the total number of units (instruction or block) in this layer. | |
HTRBlockMetadata | GetMetadataByIndex (size_t index) const override |
Get the metadata of a unit (instruction or block) in the layer. | |
llvm::ArrayRef< lldb::addr_t > | GetInstructionTrace () const |
Get the dynamic instruction trace. | |
void | AddCallInstructionMetadata (lldb::addr_t load_addr, std::optional< ConstString > func_name) |
Add metadata for a 'call' instruction of the trace. | |
void | AppendInstruction (lldb::addr_t load_addr) |
Append the load address of an instruction to the dynamic instruction trace. | |
Public Member Functions inherited from lldb_private::IHTRLayer | |
IHTRLayer (size_t id) | |
Construct new HTR layer. | |
size_t | GetLayerId () const |
Get the ID of the layer. | |
virtual HTRBlockMetadata | GetMetadataByIndex (size_t index) const =0 |
Get the metadata of a unit (instruction or block) in the layer. | |
virtual size_t | GetNumUnits () const =0 |
Get the total number of units (instruction or block) in this layer. | |
HTRBlock | MergeUnits (size_t start_unit_index, size_t num_units) |
Creates a new block from the result of merging a contiguous sequence of "units" (instructions or blocks depending on layer type) in this layer This allows the implementation class to decide how to store/generate this metadata. | |
virtual | ~IHTRLayer ()=default |
Private Attributes | |
std::vector< lldb::addr_t > | m_instruction_trace |
std::unordered_map< lldb::addr_t, std::optional< ConstString > > | m_call_isns |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::IHTRLayer | |
size_t | m_layer_id |
ID of the layer. | |
"Base" layer of HTR representing the dynamic instructions of the trace.
See lldb/docs/htr.rst for comprehensive HTR documentation
Definition at line 193 of file TraceHTR.h.
|
inline |
Construct new instruction layer.
[in] | id | The layer's id. |
Definition at line 199 of file TraceHTR.h.
void HTRInstructionLayer::AddCallInstructionMetadata | ( | lldb::addr_t | load_addr, |
std::optional< ConstString > | func_name | ||
) |
Add metadata for a 'call' instruction of the trace.
[in] | load_addr | The load address of the 'call' instruction. |
[in] | func_name | The name of the function the 'call' instruction is calling if it can be determined, std::nullopt otherwise. |
Definition at line 83 of file TraceHTR.cpp.
References m_call_isns.
void HTRInstructionLayer::AppendInstruction | ( | lldb::addr_t | load_addr | ) |
Append the load address of an instruction to the dynamic instruction trace.
[in] | load_addr | The load address of the instruction. |
Definition at line 88 of file TraceHTR.cpp.
References m_instruction_trace.
llvm::ArrayRef< lldb::addr_t > HTRInstructionLayer::GetInstructionTrace | ( | ) | const |
Get the dynamic instruction trace.
Definition at line 79 of file TraceHTR.cpp.
References m_instruction_trace.
|
overridevirtual |
Get the metadata of a unit (instruction or block) in the layer.
[in] | index | The position of the unit in the layer. |
Implements lldb_private::IHTRLayer.
Definition at line 106 of file TraceHTR.cpp.
References m_call_isns, and m_instruction_trace.
Referenced by lldb_private::toJSON().
|
overridevirtual |
Get the total number of units (instruction or block) in this layer.
Implements lldb_private::IHTRLayer.
Definition at line 119 of file TraceHTR.cpp.
References m_instruction_trace.
|
private |
Definition at line 239 of file TraceHTR.h.
Referenced by AddCallInstructionMetadata(), and GetMetadataByIndex().
|
private |
Definition at line 231 of file TraceHTR.h.
Referenced by AppendInstruction(), GetInstructionTrace(), GetMetadataByIndex(), and GetNumUnits().