|
LLVM
3.7.0
|
Representation of the samples collected for a function. More...
#include <SampleProf.h>
Public Member Functions | |
| FunctionSamples () | |
| void | print (raw_ostream &OS=dbgs()) |
Print the samples collected for a function on stream OS. More... | |
| void | addTotalSamples (unsigned Num) |
| void | addHeadSamples (unsigned Num) |
| void | addBodySamples (int LineOffset, unsigned Discriminator, unsigned Num) |
| void | addCalledTargetSamples (int LineOffset, unsigned Discriminator, std::string FName, unsigned Num) |
| SampleRecord & | sampleRecordAt (const LineLocation &Loc) |
| Return the sample record at the given location. More... | |
| unsigned | samplesAt (int LineOffset, unsigned Discriminator) |
| Return the number of samples collected at the given location. More... | |
| bool | empty () const |
| unsigned | getTotalSamples () const |
| Return the total number of samples collected inside the function. More... | |
| unsigned | getHeadSamples () const |
| Return the total number of samples collected at the head of the function. More... | |
| const BodySampleMap & | getBodySamples () const |
| Return all the samples collected in the body of the function. More... | |
| void | merge (const FunctionSamples &Other) |
Merge the samples in Other into this one. More... | |
Representation of the samples collected for a function.
This data structure contains all the collected samples for the body of a function. Each sample corresponds to a LineLocation instance within the body of the function.
Definition at line 167 of file SampleProf.h.
|
inline |
Definition at line 169 of file SampleProf.h.
|
inline |
Definition at line 173 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileReaderText::read(), and llvm::sampleprof::SampleProfileReaderBinary::read().
|
inline |
Definition at line 183 of file SampleProf.h.
Referenced by llvm::sampleprof::SampleProfileReaderText::read(), and llvm::sampleprof::SampleProfileReaderBinary::read().
|
inline |
Definition at line 172 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::SampleProfileReaderText::read(), and llvm::sampleprof::SampleProfileReaderBinary::read().
|
inline |
Definition at line 171 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::SampleProfileReaderText::read(), and llvm::sampleprof::SampleProfileReaderBinary::read().
|
inline |
Definition at line 202 of file SampleProf.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty().
Referenced by llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Return all the samples collected in the body of the function.
Definition at line 212 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Return the total number of samples collected at the head of the function.
Definition at line 209 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Return the total number of samples collected inside the function.
Definition at line 205 of file SampleProf.h.
Referenced by merge(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Merge the samples in Other into this one.
Definition at line 215 of file SampleProf.h.
References addHeadSamples(), addTotalSamples(), getBodySamples(), getHeadSamples(), getTotalSamples(), I, llvm::sampleprof::SampleRecord::merge(), and sampleRecordAt().
| void FunctionSamples::print | ( | raw_ostream & | OS = dbgs() | ) |
Print the samples collected for a function on stream OS.
| OS | Stream to emit the output to. |
Definition at line 111 of file SampleProfReader.cpp.
References llvm::sampleprof::LineLocation::Discriminator, llvm::sampleprof::SampleRecord::getCallTargets(), llvm::sampleprof::SampleRecord::getSamples(), llvm::sampleprof::SampleRecord::hasCalls(), I, llvm::sampleprof::LineLocation::LineOffset, and SI.
|
inline |
Return the sample record at the given location.
Each location is specified by LineOffset and Discriminator.
Definition at line 192 of file SampleProf.h.
Referenced by merge(), and samplesAt().
|
inline |
Return the number of samples collected at the given location.
Each location is specified by LineOffset and Discriminator.
Definition at line 198 of file SampleProf.h.
References llvm::sampleprof::SampleRecord::getSamples(), and sampleRecordAt().
1.8.6