LLVM 20.0.0git
|
#include "llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h"
Public Member Functions | |
bool | markSamplesUsed (const FunctionSamples *FS, uint32_t LineOffset, uint32_t Discriminator, uint64_t Samples) |
Mark as used the sample record for the given function samples at (LineOffset, Discriminator). | |
unsigned | computeCoverage (unsigned Used, unsigned Total) const |
Return the fraction of sample records used in this profile. | |
unsigned | countUsedRecords (const FunctionSamples *FS, ProfileSummaryInfo *PSI) const |
Return the number of sample records that were applied from this profile. | |
unsigned | countBodyRecords (const FunctionSamples *FS, ProfileSummaryInfo *PSI) const |
Return the number of sample records in the body of this profile. | |
uint64_t | getTotalUsedSamples () const |
uint64_t | countBodySamples (const FunctionSamples *FS, ProfileSummaryInfo *PSI) const |
Return the number of samples collected in the body of this profile. | |
void | clear () |
void | setProfAccForSymsInList (bool V) |
Definition at line 35 of file SampleProfileLoaderBaseUtil.h.
|
inline |
Definition at line 48 of file SampleProfileLoaderBaseUtil.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear().
unsigned llvm::sampleprofutil::SampleCoverageTracker::computeCoverage | ( | unsigned | Used, |
unsigned | Total | ||
) | const |
Return the fraction of sample records used in this profile.
The returned value is an unsigned integer in the range 0-100 indicating the percentage of sample records that were used while applying this profile to the associated function.
Definition at line 163 of file SampleProfileLoaderBaseUtil.cpp.
References assert(), and llvm::Total.
unsigned llvm::sampleprofutil::SampleCoverageTracker::countBodyRecords | ( | const FunctionSamples * | FS, |
ProfileSummaryInfo * | PSI | ||
) | const |
Return the number of sample records in the body of this profile.
This count does not include records from cold inlined callsites.
Definition at line 122 of file SampleProfileLoaderBaseUtil.cpp.
References llvm::sampleprofutil::callsiteIsHot(), countBodyRecords(), and I.
Referenced by countBodyRecords().
uint64_t llvm::sampleprofutil::SampleCoverageTracker::countBodySamples | ( | const FunctionSamples * | FS, |
ProfileSummaryInfo * | PSI | ||
) | const |
Return the number of samples collected in the body of this profile.
This count does not include samples from cold inlined callsites.
Definition at line 141 of file SampleProfileLoaderBaseUtil.cpp.
References llvm::sampleprofutil::callsiteIsHot(), countBodySamples(), I, and llvm::Total.
Referenced by countBodySamples().
unsigned llvm::sampleprofutil::SampleCoverageTracker::countUsedRecords | ( | const FunctionSamples * | FS, |
ProfileSummaryInfo * | PSI | ||
) | const |
Return the number of sample records that were applied from this profile.
This count does not include records from cold inlined callsites.
Definition at line 97 of file SampleProfileLoaderBaseUtil.cpp.
References llvm::sampleprofutil::callsiteIsHot(), countUsedRecords(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and I.
Referenced by countUsedRecords().
|
inline |
Definition at line 44 of file SampleProfileLoaderBaseUtil.h.
bool llvm::sampleprofutil::SampleCoverageTracker::markSamplesUsed | ( | const FunctionSamples * | FS, |
uint32_t | LineOffset, | ||
uint32_t | Discriminator, | ||
uint64_t | Samples | ||
) |
Mark as used the sample record for the given function samples at (LineOffset, Discriminator).
Definition at line 81 of file SampleProfileLoaderBaseUtil.cpp.
|
inline |
Definition at line 52 of file SampleProfileLoaderBaseUtil.h.