|
LLVM
4.0.0
|
Sample-based profile writer (binary format). More...
#include <SampleProfWriter.h>
Public Member Functions | |
| std::error_code | write (const FunctionSamples &S) override |
| Write samples of a top-level function to a binary file. More... | |
Public Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| virtual | ~SampleProfileWriter () |
| std::error_code | write (const StringMap< FunctionSamples > &ProfileMap) |
| Write all the sample profiles in the given map of samples. More... | |
| raw_ostream & | getOutputStream () |
Protected Member Functions | |
| SampleProfileWriterBinary (std::unique_ptr< raw_ostream > &OS) | |
| std::error_code | writeHeader (const StringMap< FunctionSamples > &ProfileMap) override |
| Write a file header for the profile file. More... | |
| std::error_code | writeSummary () |
| std::error_code | writeNameIdx (StringRef FName) |
| std::error_code | writeBody (const FunctionSamples &S) |
Protected Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| SampleProfileWriter (std::unique_ptr< raw_ostream > &OS) | |
| void | computeSummary (const StringMap< FunctionSamples > &ProfileMap) |
| Compute summary for this profile. More... | |
Friends | |
| ErrorOr< std::unique_ptr < SampleProfileWriter > > | SampleProfileWriter::create (std::unique_ptr< raw_ostream > &OS, SampleProfileFormat Format) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::sampleprof::SampleProfileWriter | |
| static ErrorOr < std::unique_ptr < SampleProfileWriter > > | create (StringRef Filename, SampleProfileFormat Format) |
| Profile writer factory. More... | |
| static ErrorOr < std::unique_ptr < SampleProfileWriter > > | create (std::unique_ptr< raw_ostream > &OS, SampleProfileFormat Format) |
Create a new stream writer based on the value of Format. More... | |
Protected Attributes inherited from llvm::sampleprof::SampleProfileWriter | |
| std::unique_ptr< raw_ostream > | OutputStream |
| Output stream where to emit the profile to. More... | |
| std::unique_ptr< ProfileSummary > | Summary |
| Profile summary. More... | |
Sample-based profile writer (binary format).
Definition at line 111 of file SampleProfWriter.h.
|
inlineprotected |
Definition at line 116 of file SampleProfWriter.h.
|
overridevirtual |
Write samples of a top-level function to a binary file.
Implements llvm::sampleprof::SampleProfileWriter.
Definition at line 198 of file SampleProfWriter.cpp.
References llvm::encodeULEB128(), and llvm::sampleprof::FunctionSamples::getHeadSamples().
|
protected |
Definition at line 155 of file SampleProfWriter.cpp.
References llvm::sampleprof::LineLocation::Discriminator, llvm::encodeULEB128(), llvm::sampleprof::FunctionSamples::getBodySamples(), llvm::sampleprof::FunctionSamples::getCallsiteSamples(), llvm::sampleprof::SampleRecord::getCallTargets(), llvm::sampleprof::FunctionSamples::getName(), llvm::sampleprof::SampleRecord::getSamples(), llvm::sampleprof::FunctionSamples::getTotalSamples(), I, llvm::sampleprof::LineLocation::LineOffset, llvm::StringMapImpl::size(), and llvm::success.
|
overrideprotectedvirtual |
Write a file header for the profile file.
Implements llvm::sampleprof::SampleProfileWriter.
Definition at line 112 of file SampleProfWriter.cpp.
References llvm::encodeULEB128(), I, N, llvm::sampleprof::SPMagic(), llvm::sampleprof::SPVersion(), and llvm::success.
|
protected |
Definition at line 83 of file SampleProfWriter.cpp.
References llvm::encodeULEB128(), llvm::success, and llvm::truncated_name_table.
|
protected |
Definition at line 139 of file SampleProfWriter.cpp.
References llvm::encodeULEB128(), and llvm::success.
|
friend |
1.8.6