LLVM 22.0.0git
Macros | Functions | Variables
MemoryProfileInfo.cpp File Reference
#include "llvm/Analysis/MemoryProfileInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Constants.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Format.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "memory-profile-info"
 

Functions

LLVM_ABI cl::opt< boolMemProfKeepAllNotColdContexts ("memprof-keep-all-not-cold-contexts", cl::init(false), cl::Hidden, cl::desc("Keep all non-cold contexts (increases cloning overheads)"))
 
static MDNodecreateMIBNode (LLVMContext &Ctx, ArrayRef< uint64_t > MIBCallStack, AllocationType AllocType, ArrayRef< ContextTotalSize > ContextSizeInfo, const uint64_t MaxColdSize, bool BuiltFromExistingMetadata, uint64_t &TotalBytes, uint64_t &ColdBytes)
 
static void saveFilteredNewMIBNodes (std::vector< Metadata * > &NewMIBNodes, std::vector< Metadata * > &SavedMIBNodes, unsigned CallerContextLength, uint64_t TotalBytes, uint64_t ColdBytes, bool BuiltFromExistingMetadata)
 

Variables

cl::opt< boolMemProfReportHintedSizes ("memprof-report-hinted-sizes", cl::init(false), cl::Hidden, cl::desc("Report total allocation sizes of hinted allocations"))
 
cl::opt< unsignedMinClonedColdBytePercent ("memprof-cloning-cold-threshold", cl::init(100), cl::Hidden, cl::desc("Min percent of cold bytes to hint alloc cold during cloning"))
 
cl::opt< unsignedMinCallsiteColdBytePercent ("memprof-callsite-cold-threshold", cl::init(100), cl::Hidden, cl::desc("Min percent of cold bytes at a callsite to discard non-cold " "contexts"))
 
cl::opt< unsignedMinPercentMaxColdSize ("memprof-min-percent-max-cold-size", cl::init(100), cl::Hidden, cl::desc("Min percent of max cold bytes for critical cold context"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "memory-profile-info"

Definition at line 23 of file MemoryProfileInfo.cpp.

Function Documentation

◆ createMIBNode()

static MDNode * createMIBNode ( LLVMContext Ctx,
ArrayRef< uint64_t MIBCallStack,
AllocationType  AllocType,
ArrayRef< ContextTotalSize ContextSizeInfo,
const uint64_t  MaxColdSize,
bool  BuiltFromExistingMetadata,
uint64_t TotalBytes,
uint64_t ColdBytes 
)
static

◆ MemProfKeepAllNotColdContexts()

LLVM_ABI cl::opt< bool > MemProfKeepAllNotColdContexts ( "memprof-keep-all-not-cold-contexts"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Keep all non-cold contexts (increases cloning overheads)")   
)

Referenced by saveFilteredNewMIBNodes().

◆ saveFilteredNewMIBNodes()

static void saveFilteredNewMIBNodes ( std::vector< Metadata * > &  NewMIBNodes,
std::vector< Metadata * > &  SavedMIBNodes,
unsigned  CallerContextLength,
uint64_t  TotalBytes,
uint64_t  ColdBytes,
bool  BuiltFromExistingMetadata 
)
static

Variable Documentation

◆ MemProfReportHintedSizes

cl::opt< bool > MemProfReportHintedSizes("memprof-report-hinted-sizes", cl::init(false), cl::Hidden, cl::desc("Report total allocation sizes of hinted allocations")) ( "memprof-report-hinted-sizes"  ,
cl::init(false)  ,
cl::Hidden  ,
cl::desc("Report total allocation sizes of hinted allocations")   
)

◆ MinCallsiteColdBytePercent

cl::opt< unsigned > MinCallsiteColdBytePercent("memprof-callsite-cold-threshold", cl::init(100), cl::Hidden, cl::desc("Min percent of cold bytes at a callsite to discard non-cold " "contexts")) ( "memprof-callsite-cold-threshold"  ,
cl::init(100)  ,
cl::Hidden  ,
cl::desc("Min percent of cold bytes at a callsite to discard non-cold " "contexts")   
)

◆ MinClonedColdBytePercent

cl::opt< unsigned > MinClonedColdBytePercent("memprof-cloning-cold-threshold", cl::init(100), cl::Hidden, cl::desc("Min percent of cold bytes to hint alloc cold during cloning")) ( "memprof-cloning-cold-threshold"  ,
cl::init(100)  ,
cl::Hidden  ,
cl::desc("Min percent of cold bytes to hint alloc cold during cloning")   
)

◆ MinPercentMaxColdSize

cl::opt< unsigned > MinPercentMaxColdSize("memprof-min-percent-max-cold-size", cl::init(100), cl::Hidden, cl::desc("Min percent of max cold bytes for critical cold context")) ( "memprof-min-percent-max-cold-size"  ,
cl::init(100)  ,
cl::Hidden  ,
cl::desc("Min percent of max cold bytes for critical cold context")   
)