Namespaces | |
namespace | detail |
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 | CallEdgeTy = std::pair<LineLocation,uint64_t > |
using | CallStackMap =llvm::DenseMap<uint64_t,llvm::SmallVector<uint64_t > > |
using | LocToLocMap = std::unordered_map<LineLocation,LineLocation,LineLocationHash > |
Enumerations | |
enum | IndexedVersion : uint64_t {Version2 = 2,Version3 = 3 } |
enum class | Meta : uint64_t {Start = 0,MIBEntryDef,Size } |
Variables | |
constexpruint64_t | MinimumSupportedVersion =Version2 |
constexpruint64_t | MaximumSupportedVersion =Version3 |
usingllvm::memprof::CallEdgeTy = typedef std::pair<LineLocation,uint64_t> |
usingllvm::memprof::CallStackId = typedefuint64_t |
usingllvm::memprof::CallStackMap = typedefllvm::DenseMap<uint64_t,llvm::SmallVector<uint64_t> > |
Definition at line104 of fileMemProfReader.h.
usingllvm::memprof::FrameId = typedefuint64_t |
usingllvm::memprof::LinearCallStackId = typedefuint32_t |
usingllvm::memprof::LinearFrameId = typedefuint32_t |
usingllvm::memprof::LocToLocMap = typedef std::unordered_map<LineLocation,LineLocation,LineLocationHash> |
Definition at line81 of fileMemProfiler.h.
usingllvm::memprof::MemProfSchema = typedefllvm::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 line76 of fileMemoryProfileInfo.cpp.
Referencesllvm::MDNode::get(),llvm::ValueAsMetadata::get(),llvm::Type::getInt64Ty(),llvm::SmallVectorTemplateBase< T, bool >::push_back(), andllvm::SmallVectorImpl< T >::reserve().
Referenced byaddCallsiteMetadata(), andcreateMIBNode().
MDNode * llvm::memprof::buildContextSizeMetadata | ( | ArrayRef<ContextTotalSize > | ContextSizeInfo, |
LLVMContext & | Ctx | ||
) |
Build metadata from the provided list of full stack id and profiled size, to use when reporting of hinted sizes is enabled.
llvm::DenseMap< FrameIdTy,FrameStat > llvm::memprof::computeFrameHistogram | ( | llvm::MapVector<CallStackId,llvm::SmallVector< FrameIdTy > > & | MemProfCallStackData | ) |
templatellvm::DenseMap<FrameId,FrameStat >llvm::memprof::computeFrameHistogram<FrameId > | ( | llvm::MapVector<CallStackId,llvm::SmallVector<FrameId > > & | MemProfCallStackData | ) |
templatellvm::DenseMap<LinearFrameId,FrameStat >llvm::memprof::computeFrameHistogram<LinearFrameId > | ( | llvm::MapVector<CallStackId,llvm::SmallVector<LinearFrameId > > & | MemProfCallStackData | ) |
Referenced bywriteMemoryProfileRadixTree().
DenseMap<uint64_t,LocToLocMap > llvm::memprof::computeUndriftMap | ( | Module & | M, |
IndexedInstrProfReader * | MemProfReader, | ||
constTargetLibraryInfo & | TLI | ||
) |
Definition at line910 of fileMemProfiler.cpp.
ReferencesA,assert(),B,llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(),llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(),extractCallsFromIR(),llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), andllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace().
Referenced byllvm::MemProfUsePass::run().
| static |
Definition at line152 of fileMemProf.cpp.
ReferencesI,Ptr, andllvm::memprof::PortableMemInfoBlock::serializedSize().
Referenced byllvm::memprof::IndexedMemProfRecord::deserialize().
| static |
Definition at line183 of fileMemProf.cpp.
ReferencesI,Ptr, andllvm::memprof::PortableMemInfoBlock::serializedSize().
Referenced byllvm::memprof::IndexedMemProfRecord::deserialize().
DenseMap<uint64_t,SmallVector<CallEdgeTy, 0 > > llvm::memprof::extractCallsFromIR | ( | Module & | M, |
constTargetLibraryInfo & | TLI, | ||
function_ref<bool(uint64_t)> | IsPresentInProfile =[](uint64_t) { return true; } | ||
) |
Definition at line835 of fileMemProfiler.cpp.
Referencesassert(),llvm::StringRef::empty(),F,llvm::memprof::IndexedMemProfRecord::getGUID(),I,isAllocationWithHotColdVariant(),llvm::sort(), andllvm::unique().
Referenced bycomputeUndriftMap().
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 line54 of fileMemoryProfileInfo.cpp.
ReferencesMemProfAveLifetimeColdThreshold,MemProfLifetimeAccessDensityColdThreshold,MemProfMinAveLifetimeAccessDensityHotThreshold, andMemProfUseHotHints.
Referenced byaddCallStack().
std::string llvm::memprof::getAllocTypeAttributeString | ( | AllocationType | Type | ) |
Returns the string to use in attributes with the given type.
Definition at line109 of fileMemoryProfileInfo.cpp.
Referencesassert(), andllvm_unreachable.
Referenced byaddAllocTypeAttribute(),llvm::memprof::CallStackTrie::addSingleAllocTypeAttribute(),createMIBNode(), andllvm::MemProfUsePass::run().
MemProfSchema llvm::memprof::getFullSchema | ( | ) |
Definition at line13 of fileMemProf.cpp.
Referencesllvm::List.
Referenced byllvm::memprof::IndexedAllocationInfo::IndexedAllocationInfo(),writeMemProfV2(), andwriteMemProfV3().
MemProfSchema llvm::memprof::getHotColdSchema | ( | ) |
Definition at line21 of fileMemProf.cpp.
Referenced bywriteMemProfV2(), andwriteMemProfV3().
AllocationType llvm::memprof::getMIBAllocType | ( | constMDNode * | MIB | ) |
Returns the allocation type from an MIB metadata node.
Definition at line94 of fileMemoryProfileInfo.cpp.
Referencesassert(),llvm::MDNode::getNumOperands(), andllvm::MDNode::getOperand().
Referenced byllvm::memprof::CallStackTrie::addCallStack(), andcomputeFunctionSummary().
Returns the stack node from an MIB metadata node.
Definition at line88 of fileMemoryProfileInfo.cpp.
Referencesassert(),llvm::MDNode::getNumOperands(), andllvm::MDNode::getOperand().
Referenced byllvm::memprof::CallStackTrie::addCallStack(),computeFunctionSummary(), andpropagateMemProfHelper().
True if the AllocTypes bitmask contains just a single type.
Definition at line133 of fileMemoryProfileInfo.cpp.
Referencesassert(), andllvm::popcount().
Referenced byllvm::memprof::CallStackTrie::buildAndAttachMIBMetadata().
Expected<MemProfSchema > llvm::memprof::readMemProfSchema | ( | constunsignedchar *& | Buffer | ) |
Definition at line267 of fileMemProf.cpp.
ReferencesI,llvm::malformed,Ptr,Size, andllvm::Tag.
| static |
Definition at line26 of fileMemProf.cpp.
Referencesllvm::memprof::PortableMemInfoBlock::serializedSize(), andSize.
Referenced byllvm::memprof::IndexedAllocationInfo::serializedSize(), andllvm::memprof::IndexedMemProfRecord::serializedSize().
| static |
Definition at line57 of fileMemProf.cpp.
| static |
Definition at line36 of fileMemProf.cpp.
Referencesllvm::memprof::PortableMemInfoBlock::serializedSize(), andSize.
Referenced byllvm::memprof::IndexedAllocationInfo::serializedSize(), andllvm::memprof::IndexedMemProfRecord::serializedSize().
| static |
Definition at line71 of fileMemProf.cpp.
| static |
Definition at line96 of fileMemProf.cpp.
Referencesllvm::little,N, andOS.
Referenced byllvm::memprof::IndexedMemProfRecord::serialize().
| static |
Definition at line114 of fileMemProf.cpp.
Referencesassert(),llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(),llvm::little,N, andOS.
Referenced byllvm::memprof::IndexedMemProfRecord::serialize().
Definition at line40 of fileMemProf.h.
Referenced byllvm::IndexedMemProfReader::deserialize(),llvm::IndexedMemProfReader::getMemProfRecord(), andwriteMemProf().
Definition at line39 of fileMemProf.h.
Referenced byllvm::IndexedMemProfReader::deserialize(),llvm::IndexedMemProfReader::getMemProfRecord(), andwriteMemProf().