|
LLVM
3.7.0
|
#include <SampleProfReader.h>
Public Member Functions | |
| SampleProfileReaderText (std::unique_ptr< MemoryBuffer > B, LLVMContext &C) | |
| std::error_code | readHeader () override |
| Read and validate the file header. More... | |
| std::error_code | read () override |
| Read sample profiles from the associated file. More... | |
Public Member Functions inherited from llvm::sampleprof::SampleProfileReader | |
| SampleProfileReader (std::unique_ptr< MemoryBuffer > B, LLVMContext &C) | |
| virtual | ~SampleProfileReader () |
| void | dumpFunctionProfile (StringRef FName, raw_ostream &OS=dbgs()) |
Print the profile for FName on stream OS. More... | |
| void | dump (raw_ostream &OS=dbgs()) |
Print all the profiles on stream OS. More... | |
| FunctionSamples * | getSamplesFor (const Function &F) |
Return the samples collected for function F. More... | |
| StringMap< FunctionSamples > & | getProfiles () |
| Return all the profiles. More... | |
| void | reportParseError (int64_t LineNumber, Twine Msg) const |
| Report a parse error message. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::sampleprof::SampleProfileReader | |
| static ErrorOr < std::unique_ptr < SampleProfileReader > > | create (StringRef Filename, LLVMContext &C) |
| Create a sample profile reader appropriate to the file format. More... | |
Protected Attributes inherited from llvm::sampleprof::SampleProfileReader | |
| StringMap< FunctionSamples > | Profiles |
| Map every function to its associated profile. More... | |
| LLVMContext & | Ctx |
| LLVM context used to emit diagnostics. More... | |
| std::unique_ptr< MemoryBuffer > | Buffer |
| Memory buffer holding the profile file. More... | |
Definition at line 113 of file SampleProfReader.h.
|
inline |
Definition at line 115 of file SampleProfReader.h.
|
overridevirtual |
Read sample profiles from the associated file.
Load samples from a text file.
See the documentation at the top of the file for an explanation of the expected format.
Implements llvm::sampleprof::SampleProfileReader.
Definition at line 152 of file SampleProfReader.cpp.
References llvm::sampleprof::FunctionSamples::addBodySamples(), llvm::sampleprof::FunctionSamples::addCalledTargetSamples(), llvm::sampleprof::FunctionSamples::addHeadSamples(), llvm::sampleprof::FunctionSamples::addTotalSamples(), llvm::line_iterator::is_at_eof(), llvm::line_iterator::line_number(), llvm::malformed, llvm::Regex::match(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::Regex::sub(), and llvm::success.
|
inlineoverridevirtual |
Read and validate the file header.
Implements llvm::sampleprof::SampleProfileReader.
Definition at line 119 of file SampleProfReader.h.
References llvm::success.
1.8.6