26 "memprof-lifetime-access-density-cold-threshold",
cl::init(0.05),
28 cl::desc(
"The threshold the lifetime access density (accesses per byte per "
29 "lifetime sec) must be under to consider an allocation cold"));
35 cl::desc(
"The average lifetime (s) for an allocation to be considered "
41 "memprof-min-ave-lifetime-access-density-hot-threshold",
cl::init(1000),
43 cl::desc(
"The minimum TotalLifetimeAccessDensity / AllocCount for an "
44 "allocation to be considered hot"));
48 cl::desc(
"Enable use of hot hints (only supported for "
49 "unambigously hot allocations)"));
56 if (((
float)TotalLifetimeAccessDensity) / AllocCount / 100 <
59 && ((
float)TotalLifetime) / AllocCount >=
66 ((
float)TotalLifetimeAccessDensity) / AllocCount / 100 >
80 std::memcpy(&Id, Hash.data(),
sizeof(Hash));
LLVM_ABI cl::opt< unsigned > MemProfAveLifetimeColdThreshold("memprof-ave-lifetime-cold-threshold", cl::init(200), cl::Hidden, cl::desc("The average lifetime (s) for an allocation to be considered " "cold"))
LLVM_ABI cl::opt< unsigned > MemProfMinAveLifetimeAccessDensityHotThreshold("memprof-min-ave-lifetime-access-density-hot-threshold", cl::init(1000), cl::Hidden, cl::desc("The minimum TotalLifetimeAccessDensity / AllocCount for an " "allocation to be considered hot"))
LLVM_ABI cl::opt< float > MemProfLifetimeAccessDensityColdThreshold("memprof-lifetime-access-density-cold-threshold", cl::init(0.05), cl::Hidden, cl::desc("The threshold the lifetime access density (accesses per byte per " "lifetime sec) must be under to consider an allocation cold"))
LLVM_ABI cl::opt< bool > MemProfUseHotHints("memprof-use-hot-hints", cl::init(false), cl::Hidden, cl::desc("Enable use of hot hints (only supported for " "unambigously hot allocations)"))
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
HashResultTy< HasherT_ > final()
Forward to HasherT::final() if available.
Interface to help hash various types through a hasher type.
std::enable_if_t< hashbuilder_detail::IsHashableData< T >::value, HashBuilder & > add(T Value)
Implement hashing for hashable data types, e.g. integral or enum values.
Helper class to iterate through stack ids in both metadata (memprof MIB and callsite) and the corresp...
initializer< Ty > init(const Ty &Val)
LLVM_ABI AllocationType getAllocType(uint64_t TotalLifetimeAccessDensity, uint64_t AllocCount, uint64_t TotalLifetime)
Return the allocation type for a given set of memory profile values.
LLVM_ABI uint64_t computeFullStackId(ArrayRef< Frame > CallStack)
Helper to generate a single hash id for a given callstack, used for emitting matching statistics and ...
This is an optimization pass for GlobalISel generic memory operations.
std::array< uint8_t, NumBytes > BLAKE3Result
The constant LLVM_BLAKE3_OUT_LEN provides the default output length, 32 bytes, which is recommended f...