LLVM 22.0.0git
|
The InstrumentationMap represents the computed function id's and indicated function addresses from an object file (or a YAML file). More...
#include "llvm/XRay/InstrumentationMap.h"
Public Types | |
using | FunctionAddressMap = std::unordered_map< int32_t, uint64_t > |
using | FunctionAddressReverseMap = std::unordered_map< uint64_t, int32_t > |
using | SledContainer = std::vector< SledEntry > |
Public Member Functions | |
const FunctionAddressMap & | getFunctionAddresses () |
Provides a raw accessor to the unordered map of function addresses. | |
LLVM_ABI std::optional< int32_t > | getFunctionId (uint64_t Addr) const |
Returns an XRay computed function id, provided a function address. | |
LLVM_ABI std::optional< uint64_t > | getFunctionAddr (int32_t FuncId) const |
Returns the function address for a function id. | |
const SledContainer & | sleds () const |
Provide read-only access to the entries of the instrumentation map. | |
Friends | |
LLVM_ABI friend Expected< InstrumentationMap > | loadInstrumentationMap (StringRef) |
Loads the instrumentation map from |Filename|. | |
The InstrumentationMap represents the computed function id's and indicated function addresses from an object file (or a YAML file).
This provides an interface to just the mapping between the function id, and the function address.
We also provide raw access to the actual instrumentation map entries we find associated with a particular object file.
Definition at line 77 of file InstrumentationMap.h.
using llvm::xray::InstrumentationMap::FunctionAddressMap = std::unordered_map<int32_t, uint64_t> |
Definition at line 79 of file InstrumentationMap.h.
using llvm::xray::InstrumentationMap::FunctionAddressReverseMap = std::unordered_map<uint64_t, int32_t> |
Definition at line 80 of file InstrumentationMap.h.
using llvm::xray::InstrumentationMap::SledContainer = std::vector<SledEntry> |
Definition at line 81 of file InstrumentationMap.h.
std::optional< uint64_t > InstrumentationMap::getFunctionAddr | ( | int32_t | FuncId | ) | const |
Returns the function address for a function id.
Definition at line 43 of file InstrumentationMap.cpp.
|
inline |
Provides a raw accessor to the unordered map of function addresses.
Definition at line 93 of file InstrumentationMap.h.
std::optional< int32_t > InstrumentationMap::getFunctionId | ( | uint64_t | Addr | ) | const |
Returns an XRay computed function id, provided a function address.
Definition at line 35 of file InstrumentationMap.cpp.
|
inline |
Provide read-only access to the entries of the instrumentation map.
Definition at line 102 of file InstrumentationMap.h.
|
friend |
Loads the instrumentation map from |Filename|.
This auto-deduces the type of the instrumentation map.