|
LLVM
3.7.0
|
Representation of a single sample record. More...
#include <SampleProf.h>
Public Types | |
| typedef StringMap< unsigned > | CallTargetMap |
Public Member Functions | |
| SampleRecord () | |
| void | addSamples (unsigned S) |
Increment the number of samples for this record by S. More... | |
| void | addCalledTarget (StringRef F, unsigned S) |
Add called function F with samples S. More... | |
| bool | hasCalls () const |
| Return true if this sample record contains function calls. More... | |
| unsigned | getSamples () const |
| const CallTargetMap & | getCallTargets () const |
| void | merge (const SampleRecord &Other) |
Merge the samples in Other into this record. More... | |
Representation of a single sample record.
A sample record is represented by a positive integer value, which indicates how frequently was the associated line location executed.
Additionally, if the associated location contains a function call, the record will hold a list of all the possible called targets. For direct calls, this will be the exact function being invoked. For indirect calls (function pointers, virtual table dispatch), this will be a list of one or more functions.
Definition at line 113 of file SampleProf.h.
Definition at line 115 of file SampleProf.h.
|
inline |
Definition at line 117 of file SampleProf.h.
Add called function F with samples S.
Sample counts accumulate using saturating arithmetic, to avoid wrapping around unsigned integers.
Definition at line 134 of file SampleProf.h.
References F().
Referenced by merge().
|
inline |
Increment the number of samples for this record by S.
Sample counts accumulate using saturating arithmetic, to avoid wrapping around unsigned integers.
Definition at line 123 of file SampleProf.h.
Referenced by merge().
|
inline |
Definition at line 146 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::FunctionSamples::print(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Definition at line 145 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::FunctionSamples::print(), llvm::sampleprof::FunctionSamples::samplesAt(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Return true if this sample record contains function calls.
Definition at line 143 of file SampleProf.h.
References llvm::StringMapImpl::size().
Referenced by llvm::sampleprof::FunctionSamples::print().
|
inline |
Merge the samples in Other into this record.
Definition at line 149 of file SampleProf.h.
References addCalledTarget(), addSamples(), getCallTargets(), getSamples(), and I.
Referenced by llvm::sampleprof::FunctionSamples::merge().
1.8.6