LLVM  16.0.0git
Macros | Functions | Variables
MemoryProfileInfo.cpp File Reference
#include "llvm/Analysis/MemoryProfileInfo.h"
#include "llvm/Support/CommandLine.h"
Include dependency graph for MemoryProfileInfo.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "memory-profile-info"
 

Functions

static std::string getAllocTypeAttributeString (AllocationType Type)
 
static void addAllocTypeAttribute (LLVMContext &Ctx, CallBase *CI, AllocationType AllocType)
 
static bool hasSingleAllocType (uint8_t AllocTypes)
 
static MDNodecreateMIBNode (LLVMContext &Ctx, std::vector< uint64_t > &MIBCallStack, AllocationType AllocType)
 

Variables

cl::opt< float > MemProfAccessesPerByteColdThreshold ("memprof-accesses-per-byte-cold-threshold", cl::init(10.0), cl::Hidden, cl::desc("The threshold the accesses per byte must be under to consider " "an allocation cold"))
 
cl::opt< unsigned > MemProfMinLifetimeColdThreshold ("memprof-min-lifetime-cold-threshold", cl::init(200), cl::Hidden, cl::desc("The minimum lifetime (s) for an allocation to be considered " "cold"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "memory-profile-info"

Definition at line 19 of file MemoryProfileInfo.cpp.

Function Documentation

◆ addAllocTypeAttribute()

static void addAllocTypeAttribute ( LLVMContext Ctx,
CallBase CI,
AllocationType  AllocType 
)
static

◆ createMIBNode()

static MDNode* createMIBNode ( LLVMContext Ctx,
std::vector< uint64_t > &  MIBCallStack,
AllocationType  AllocType 
)
static

◆ getAllocTypeAttributeString()

static std::string getAllocTypeAttributeString ( AllocationType  Type)
static

Definition at line 73 of file MemoryProfileInfo.cpp.

References assert(), llvm::Cold, llvm_unreachable, and llvm::NotCold.

Referenced by addAllocTypeAttribute(), and createMIBNode().

◆ hasSingleAllocType()

static bool hasSingleAllocType ( uint8_t  AllocTypes)
static

Variable Documentation

◆ MemProfAccessesPerByteColdThreshold

cl::opt<float> MemProfAccessesPerByteColdThreshold("memprof-accesses-per-byte-cold-threshold", cl::init(10.0), cl::Hidden, cl::desc("The threshold the accesses per byte must be under to consider " "an allocation cold"))

◆ MemProfMinLifetimeColdThreshold

cl::opt<unsigned> MemProfMinLifetimeColdThreshold("memprof-min-lifetime-cold-threshold", cl::init(200), cl::Hidden, cl::desc("The minimum lifetime (s) for an allocation to be considered " "cold"))