LLVM 20.0.0git
|
Namespaces | |
namespace | detail |
Classes | |
struct | AllocationInfo |
class | CallStack |
Helper class to iterate through stack ids in both metadata (memprof MIB and callsite) and the corresponding ThinLTO summary data structures (CallsiteInfo and MIBInfo). More... | |
struct | CallStackIdConverter |
class | CallStackLookupTrait |
class | CallStackRadixTreeBuilder |
class | CallStackTrie |
Class to build a trie of call stack contexts for a particular profiled allocation call, along with their associated allocation types. More... | |
class | CallStackWriterTrait |
struct | Frame |
struct | FrameIdConverter |
class | FrameLookupTrait |
struct | FrameStat |
class | FrameWriterTrait |
struct | IndexedAllocationInfo |
struct | IndexedMemProfData |
struct | IndexedMemProfRecord |
struct | LinearCallStackIdConverter |
struct | LinearFrameIdConverter |
class | MemProfReader |
struct | MemProfRecord |
struct | PortableMemInfoBlock |
class | RawMemProfReader |
class | RecordLookupTrait |
class | RecordWriterTrait |
Typedefs | |
using | MemProfSchema = llvm::SmallVector< Meta, static_cast< int >(Meta::Size)> |
using | FrameId = uint64_t |
using | LinearFrameId = uint32_t |
using | CallStackId = uint64_t |
using | LinearCallStackId = uint32_t |
using | CallStackMap = llvm::DenseMap< uint64_t, llvm::SmallVector< uint64_t > > |
Enumerations | |
enum | IndexedVersion : uint64_t { Version0 = 0 , Version1 = 1 , Version2 = 2 , Version3 = 3 } |
enum class | Meta : uint64_t { Start = 0 , MIBEntryDef , Size } |
Variables | |
constexpr uint64_t | MinimumSupportedVersion = Version0 |
constexpr uint64_t | MaximumSupportedVersion = Version3 |
using llvm::memprof::CallStackId = typedef uint64_t |
using llvm::memprof::CallStackMap = typedef llvm::DenseMap<uint64_t, llvm::SmallVector<uint64_t> > |
Definition at line 132 of file MemProfReader.h.
using llvm::memprof::FrameId = typedef uint64_t |
using llvm::memprof::LinearCallStackId = typedef uint32_t |
using llvm::memprof::LinearFrameId = typedef uint32_t |
using llvm::memprof::MemProfSchema = typedef llvm::SmallVector<Meta, static_cast<int>(Meta::Size)> |
|
strong |
MDNode * llvm::memprof::buildCallstackMetadata | ( | ArrayRef< uint64_t > | CallStack, |
LLVMContext & | Ctx | ||
) |
Build callstack metadata from the provided list of call stack ids.
Returns the resulting metadata node.
Definition at line 69 of file MemoryProfileInfo.cpp.
References llvm::MDNode::get(), llvm::ValueAsMetadata::get(), and llvm::Type::getInt64Ty().
Referenced by addCallsiteMetadata(), and createMIBNode().
llvm::DenseMap< FrameId, FrameStat > llvm::memprof::computeFrameHistogram | ( | llvm::MapVector< CallStackId, llvm::SmallVector< FrameId > > & | MemProfCallStackData | ) |
|
static |
Definition at line 214 of file MemProf.cpp.
References hashCallStack(), I, Ptr, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::memprof::PortableMemInfoBlock::serializedSize().
Referenced by llvm::memprof::IndexedMemProfRecord::deserialize().
|
static |
Definition at line 258 of file MemProf.cpp.
References I, Ptr, and llvm::memprof::PortableMemInfoBlock::serializedSize().
Referenced by llvm::memprof::IndexedMemProfRecord::deserialize().
|
static |
Definition at line 289 of file MemProf.cpp.
References I, Ptr, and llvm::memprof::PortableMemInfoBlock::serializedSize().
Referenced by llvm::memprof::IndexedMemProfRecord::deserialize().
AllocationType llvm::memprof::getAllocType | ( | uint64_t | TotalLifetimeAccessDensity, |
uint64_t | AllocCount, | ||
uint64_t | TotalLifetime | ||
) |
Return the allocation type for a given set of memory profile values.
Definition at line 48 of file MemoryProfileInfo.cpp.
References MemProfAveLifetimeColdThreshold, MemProfLifetimeAccessDensityColdThreshold, and MemProfMinAveLifetimeAccessDensityHotThreshold.
Referenced by addCallStack().
std::string llvm::memprof::getAllocTypeAttributeString | ( | AllocationType | Type | ) |
Returns the string to use in attributes with the given type.
Definition at line 107 of file MemoryProfileInfo.cpp.
References assert(), and llvm_unreachable.
Referenced by addAllocTypeAttribute(), llvm::memprof::CallStackTrie::buildAndAttachMIBMetadata(), createMIBNode(), and llvm::MemProfUsePass::run().
MemProfSchema llvm::memprof::getFullSchema | ( | ) |
Definition at line 13 of file MemProf.cpp.
References llvm::List.
Referenced by writeMemProfV0(), writeMemProfV1(), writeMemProfV2(), and writeMemProfV3().
MemProfSchema llvm::memprof::getHotColdSchema | ( | ) |
Definition at line 21 of file MemProf.cpp.
Referenced by writeMemProfV2(), and writeMemProfV3().
AllocationType llvm::memprof::getMIBAllocType | ( | const MDNode * | MIB | ) |
Returns the allocation type from an MIB metadata node.
Definition at line 86 of file MemoryProfileInfo.cpp.
References assert(), llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().
Referenced by llvm::memprof::CallStackTrie::addCallStack(), and computeFunctionSummary().
Returns the stack node from an MIB metadata node.
Definition at line 80 of file MemoryProfileInfo.cpp.
References assert(), llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().
Referenced by llvm::memprof::CallStackTrie::addCallStack(), computeFunctionSummary(), and propagateMemProfHelper().
Returns the total size from an MIB metadata node, or 0 if it was not recorded.
Definition at line 101 of file MemoryProfileInfo.cpp.
References llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().
Referenced by llvm::memprof::CallStackTrie::addCallStack(), and computeFunctionSummary().
CallStackId llvm::memprof::hashCallStack | ( | ArrayRef< FrameId > | CS | ) |
Definition at line 402 of file MemProf.cpp.
References llvm::HashBuilder< HasherT, Endianness >::add(), F, llvm::HashBuilderBase< HasherT >::final(), and llvm::little.
Referenced by deserializeV0(), llvm::memprof::MemProfReader::MemProfReader(), and verifyIndexedMemProfRecord().
bool llvm::memprof::hasSingleAllocType | ( | uint8_t | AllocTypes | ) |
True if the AllocTypes bitmask contains just a single type.
Definition at line 131 of file MemoryProfileInfo.cpp.
References assert(), and llvm::popcount().
Referenced by llvm::memprof::CallStackTrie::buildAndAttachMIBMetadata().
Expected< MemProfSchema > llvm::memprof::readMemProfSchema | ( | const unsigned char *& | Buffer | ) |
Definition at line 376 of file MemProf.cpp.
References I, llvm::malformed, Ptr, and Size.
|
static |
Definition at line 26 of file MemProf.cpp.
References llvm::memprof::IndexedAllocationInfo::CallStack, llvm::memprof::PortableMemInfoBlock::serializedSize(), and Size.
Referenced by llvm::memprof::IndexedAllocationInfo::serializedSize(), and llvm::memprof::IndexedMemProfRecord::serializedSize().
|
static |
Definition at line 72 of file MemProf.cpp.
|
static |
Definition at line 38 of file MemProf.cpp.
References llvm::memprof::PortableMemInfoBlock::serializedSize(), and Size.
Referenced by llvm::memprof::IndexedAllocationInfo::serializedSize(), and llvm::memprof::IndexedMemProfRecord::serializedSize().
|
static |
Definition at line 89 of file MemProf.cpp.
|
static |
Definition at line 48 of file MemProf.cpp.
References llvm::memprof::PortableMemInfoBlock::serializedSize(), and Size.
Referenced by llvm::memprof::IndexedAllocationInfo::serializedSize(), and llvm::memprof::IndexedMemProfRecord::serializedSize().
|
static |
Definition at line 103 of file MemProf.cpp.
|
static |
Definition at line 131 of file MemProf.cpp.
References llvm::little, N, and OS.
Referenced by llvm::memprof::IndexedMemProfRecord::serialize().
|
static |
Definition at line 154 of file MemProf.cpp.
References llvm::little, N, and OS.
Referenced by llvm::memprof::IndexedMemProfRecord::serialize().
|
static |
Definition at line 172 of file MemProf.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(), llvm::little, N, and OS.
Referenced by llvm::memprof::IndexedMemProfRecord::serialize().
void llvm::memprof::verifyFunctionProfileData | ( | const llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > & | FunctionProfileData | ) |
Definition at line 638 of file MemProf.cpp.
References verifyIndexedMemProfRecord().
void llvm::memprof::verifyIndexedMemProfRecord | ( | const IndexedMemProfRecord & | Record | ) |
Definition at line 631 of file MemProf.cpp.
References assert(), and hashCallStack().
Referenced by verifyFunctionProfileData().
Definition at line 37 of file MemProf.h.
Referenced by llvm::IndexedMemProfReader::deserialize(), llvm::IndexedMemProfReader::getMemProfRecord(), and writeMemProf().
Definition at line 36 of file MemProf.h.
Referenced by llvm::IndexedMemProfReader::deserialize(), llvm::IndexedMemProfReader::getMemProfRecord(), and writeMemProf().