LLVM 20.0.0git
|
SampleContextTrimmer impelements helper functions to trim, merge cold context profiles. More...
#include "llvm/ProfileData/SampleProf.h"
Public Member Functions | |
SampleContextTrimmer (SampleProfileMap &Profiles) | |
void | trimAndMergeColdContextProfiles (uint64_t ColdCountThreshold, bool TrimColdContext, bool MergeColdContext, uint32_t ColdContextFrameLength, bool TrimBaseProfileOnly) |
SampleContextTrimmer impelements helper functions to trim, merge cold context profiles.
It also supports context profile canonicalization to make sure ProfileMap's key is consistent with FunctionSample's name/context.
Definition at line 1375 of file SampleProf.h.
|
inline |
Definition at line 1377 of file SampleProf.h.
void SampleContextTrimmer::trimAndMergeColdContextProfiles | ( | uint64_t | ColdCountThreshold, |
bool | TrimColdContext, | ||
bool | MergeColdContext, | ||
uint32_t | ColdContextFrameLength, | ||
bool | TrimBaseProfileOnly | ||
) |
Definition at line 347 of file SampleProf.cpp.
References ColdCountThreshold, llvm::sampleprof::SampleProfileMap::create(), llvm::sampleprof::FunctionSamples::getTotalSamples(), I, llvm::sampleprof::SampleContext::isBaseContext(), llvm::sampleprof::FunctionSamples::merge(), and llvm::sampleprof::MergedContext.