|
LLVM
3.7.0
|
Sample-based profile writer. Base class. More...
#include <SampleProfWriter.h>
Public Member Functions | |
| SampleProfileWriter (StringRef Filename, std::error_code &EC, sys::fs::OpenFlags Flags) | |
| virtual | ~SampleProfileWriter () |
| virtual bool | write (StringRef FName, const FunctionSamples &S)=0 |
Write sample profiles in S for function FName. More... | |
| bool | write (const Function &F, const FunctionSamples &S) |
Write sample profiles in S for function F. More... | |
| bool | write (const Module &M, StringMap< FunctionSamples > &P) |
Write all the sample profiles for all the functions in M. More... | |
| bool | write (StringMap< FunctionSamples > &ProfileMap) |
| Write all the sample profiles in the given map of samples. More... | |
Static Public Member Functions | |
| static ErrorOr < std::unique_ptr < SampleProfileWriter > > | create (StringRef Filename, SampleProfileFormat Format) |
| Profile writer factory. More... | |
Protected Attributes | |
| raw_fd_ostream | OS |
| Output stream where to emit the profile to. More... | |
Sample-based profile writer. Base class.
Definition at line 31 of file SampleProfWriter.h.
|
inline |
Definition at line 33 of file SampleProfWriter.h.
|
inlinevirtual |
Definition at line 36 of file SampleProfWriter.h.
|
static |
Profile writer factory.
Create a sample profile writer based on the specified format.
Create a new writer based on the value of Format.
| Filename | The file to create. |
| Writer | The writer to instantiate according to the specified format. |
| Format | Encoding format for the profile file. |
Definition at line 111 of file SampleProfWriter.cpp.
References llvm::sampleprof::SPF_Binary, llvm::sampleprof::SPF_Text, and llvm::unrecognized_format.
|
pure virtual |
Write sample profiles in S for function FName.
Implemented in llvm::sampleprof::SampleProfileWriterBinary, and llvm::sampleprof::SampleProfileWriterText.
Referenced by write(), llvm::sampleprof::SampleProfileWriterText::write(), and llvm::sampleprof::SampleProfileWriterBinary::write().
|
inline |
Write sample profiles in S for function F.
Definition at line 44 of file SampleProfWriter.h.
References llvm::Value::getName(), and write().
|
inline |
Write all the sample profiles for all the functions in M.
Definition at line 51 of file SampleProfWriter.h.
|
inline |
Write all the sample profiles in the given map of samples.
Definition at line 63 of file SampleProfWriter.h.
|
protected |
Output stream where to emit the profile to.
Definition at line 80 of file SampleProfWriter.h.
Referenced by llvm::sampleprof::SampleProfileWriterBinary::SampleProfileWriterBinary(), and llvm::sampleprof::SampleProfileWriterBinary::write().
1.8.6