LLVM 24.0.0git
MemProfInstrumentation.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "memprof"

Functions

 STATISTIC (NumInstrumentedReads, "Number of instrumented reads")
 STATISTIC (NumInstrumentedWrites, "Number of instrumented writes")
 STATISTIC (NumSkippedStackReads, "Number of non-instrumented stack reads")
 STATISTIC (NumSkippedStackWrites, "Number of non-instrumented stack writes")
void createProfileFileNameVar (Module &M)
void createMemprofHistogramFlagVar (const InstrumentationOptions &Opts, Module &M)
void createMemprofDefaultOptionsVar (const InstrumentationOptions &Opts, Module &M)

Variables

constexpr int LLVM_MEM_PROFILER_VERSION = 1
constexpr uint64_t DefaultMemGranularity = 64
constexpr uint64_t HistogramGranularity = 8
constexpr char MemProfModuleCtorName [] = "memprof.module_ctor"
constexpr uint64_t MemProfCtorAndDtorPriority = 1
constexpr uint64_t MemProfEmscriptenCtorAndDtorPriority = 50
constexpr char MemProfInitName [] = "__memprof_init"
constexpr char MemProfVersionCheckNamePrefix []
constexpr char MemProfShadowMemoryDynamicAddress []
constexpr char MemProfFilenameVar [] = "__memprof_profile_filename"
constexpr char MemProfHistogramFlagVar [] = "__memprof_histogram"

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "memprof"

Definition at line 46 of file MemProfInstrumentation.cpp.

Function Documentation

◆ createMemprofDefaultOptionsVar()

◆ createMemprofHistogramFlagVar()

◆ createProfileFileNameVar()

◆ STATISTIC() [1/4]

STATISTIC ( NumInstrumentedReads ,
"Number of instrumented reads"  )

◆ STATISTIC() [2/4]

STATISTIC ( NumInstrumentedWrites ,
"Number of instrumented writes"  )

◆ STATISTIC() [3/4]

STATISTIC ( NumSkippedStackReads ,
"Number of non-instrumented stack reads"  )

◆ STATISTIC() [4/4]

STATISTIC ( NumSkippedStackWrites ,
"Number of non-instrumented stack writes"  )

References HistogramGranularity.

Variable Documentation

◆ DefaultMemGranularity

uint64_t DefaultMemGranularity = 64
constexpr

Definition at line 51 of file MemProfInstrumentation.cpp.

Referenced by llvm::MemProfilerPass::run().

◆ HistogramGranularity

uint64_t HistogramGranularity = 8
constexpr

Definition at line 54 of file MemProfInstrumentation.cpp.

Referenced by STATISTIC().

◆ LLVM_MEM_PROFILER_VERSION

int LLVM_MEM_PROFILER_VERSION = 1
constexpr

Definition at line 48 of file MemProfInstrumentation.cpp.

◆ MemProfCtorAndDtorPriority

uint64_t MemProfCtorAndDtorPriority = 1
constexpr

Definition at line 57 of file MemProfInstrumentation.cpp.

◆ MemProfEmscriptenCtorAndDtorPriority

uint64_t MemProfEmscriptenCtorAndDtorPriority = 50
constexpr

Definition at line 59 of file MemProfInstrumentation.cpp.

◆ MemProfFilenameVar

char MemProfFilenameVar[] = "__memprof_profile_filename"
constexpr

Definition at line 67 of file MemProfInstrumentation.cpp.

Referenced by createProfileFileNameVar().

◆ MemProfHistogramFlagVar

char MemProfHistogramFlagVar[] = "__memprof_histogram"
constexpr

Definition at line 69 of file MemProfInstrumentation.cpp.

Referenced by createMemprofHistogramFlagVar().

◆ MemProfInitName

char MemProfInitName[] = "__memprof_init"
constexpr

Definition at line 60 of file MemProfInstrumentation.cpp.

◆ MemProfModuleCtorName

char MemProfModuleCtorName[] = "memprof.module_ctor"
constexpr

Definition at line 56 of file MemProfInstrumentation.cpp.

◆ MemProfShadowMemoryDynamicAddress

char MemProfShadowMemoryDynamicAddress[]
constexpr
Initial value:
=
"__memprof_shadow_memory_dynamic_address"

Definition at line 64 of file MemProfInstrumentation.cpp.

◆ MemProfVersionCheckNamePrefix

char MemProfVersionCheckNamePrefix[]
constexpr
Initial value:
=
"__memprof_version_mismatch_check_v"

Definition at line 61 of file MemProfInstrumentation.cpp.