|
LLVM
10.0.0
|
SampleProfileReaderItaniumRemapper remaps the profile data from a sample profile data reader, by applying a provided set of equivalences between components of the symbol names in the profile. More...
#include "llvm/ProfileData/SampleProfReader.h"
Public Member Functions | |
| SampleProfileReaderItaniumRemapper (std::unique_ptr< MemoryBuffer > B, std::unique_ptr< SymbolRemappingReader > SRR, SampleProfileReader &R) | |
| void | applyRemapping (LLVMContext &Ctx) |
| Apply remappings to the profile read by Reader. More... | |
| bool | hasApplied () |
| void | insert (StringRef FunctionName) |
| Insert function name into remapper. More... | |
| bool | exist (StringRef FunctionName) |
| Query whether there is equivalent in the remapper which has been inserted. More... | |
| FunctionSamples * | getSamplesFor (StringRef FunctionName) |
Return the samples collected for function F if remapper knows it is present in SampleMap. More... | |
Static Public Member Functions | |
| static ErrorOr< std::unique_ptr< SampleProfileReaderItaniumRemapper > > | create (const std::string Filename, SampleProfileReader &Reader, LLVMContext &C) |
| Create a remapper from the given remapping file. More... | |
| static ErrorOr< std::unique_ptr< SampleProfileReaderItaniumRemapper > > | create (std::unique_ptr< MemoryBuffer > &B, SampleProfileReader &Reader, LLVMContext &C) |
| Create a remapper from the given Buffer. More... | |
SampleProfileReaderItaniumRemapper remaps the profile data from a sample profile data reader, by applying a provided set of equivalences between components of the symbol names in the profile.
Definition at line 243 of file SampleProfReader.h.
|
inline |
Definition at line 245 of file SampleProfReader.h.
References applyRemapping(), assert(), B, C, and create().
| void SampleProfileReaderItaniumRemapper::applyRemapping | ( | LLVMContext & | Ctx | ) |
Apply remappings to the profile read by Reader.
Definition at line 1212 of file SampleProfReader.cpp.
References assert(), llvm::LLVMContext::diagnose(), llvm::DS_Warning, and llvm::sampleprof::SPF_Compact_Binary.
Referenced by SampleProfileReaderItaniumRemapper().
|
static |
Create a remapper from the given remapping file.
Create a sample profile remapper from the given input, to remap the function names in the given profile data.
The remapper will be used for profile read in by Reader.
| Filename | The file to open. |
| Reader | The profile reader the remapper is going to be applied to. |
| C | The LLVM context to use to emit diagnostics. |
Definition at line 1285 of file SampleProfReader.cpp.
References C, llvm::sampleprof::SampleProfileReader::create(), and setupMemoryBuffer().
Referenced by llvm::sampleprof::SampleProfileReader::create(), llvm::sampleprof::SampleProfileReader::reportError(), and SampleProfileReaderItaniumRemapper().
|
static |
Create a remapper from the given Buffer.
Create a sample profile remapper from the given input, to remap the function names in the given profile data.
The remapper will be used for profile read in by Reader.
| B | The memory buffer to create the reader from (assumes ownership). |
| C | The LLVM context to use to emit diagnostics. |
| Reader | The profile reader the remapper is going to be applied to. |
Definition at line 1305 of file SampleProfReader.cpp.
References llvm::LLVMContext::diagnose(), E, llvm::SymbolRemappingParseError::getLineNum(), llvm::SymbolRemappingParseError::getMessage(), llvm::handleAllErrors(), and llvm::malformed.
Query whether there is equivalent in the remapper which has been inserted.
Definition at line 274 of file SampleProfReader.h.
References getSamplesFor().
| FunctionSamples * SampleProfileReaderItaniumRemapper::getSamplesFor | ( | StringRef | FunctionName | ) |
Return the samples collected for function F if remapper knows it is present in SampleMap.
Definition at line 1233 of file SampleProfReader.cpp.
Referenced by exist(), and llvm::sampleprof::SampleProfileReader::getSamplesFor().
|
inline |
Definition at line 267 of file SampleProfReader.h.
|
inline |
Insert function name into remapper.
Definition at line 270 of file SampleProfReader.h.
1.8.13