LLVM  6.0.0svn
Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::sampleprof::SampleProfileWriterText Class Reference

Sample-based profile writer (text format). More...

#include "llvm/ProfileData/SampleProfWriter.h"

Inheritance diagram for llvm::sampleprof::SampleProfileWriterText:
Inheritance graph
[legend]
Collaboration diagram for llvm::sampleprof::SampleProfileWriterText:
Collaboration graph
[legend]

Public Member Functions

std::error_code write (const FunctionSamples &S) override
 Write samples to a text file. More...
 
- Public Member Functions inherited from llvm::sampleprof::SampleProfileWriter
virtual ~SampleProfileWriter ()=default
 
std::error_code write (const StringMap< FunctionSamples > &ProfileMap)
 Write all the sample profiles in the given map of samples. More...
 
raw_ostreamgetOutputStream ()
 

Protected Member Functions

 SampleProfileWriterText (std::unique_ptr< raw_ostream > &OS)
 
std::error_code writeHeader (const StringMap< FunctionSamples > &ProfileMap) override
 Write a file header for the profile file. More...
 
- 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_ostreamOutputStream
 Output stream where to emit the profile to. More...
 
std::unique_ptr< ProfileSummarySummary
 Profile summary. More...
 

Detailed Description

Sample-based profile writer (text format).

Definition at line 80 of file SampleProfWriter.h.

Constructor & Destructor Documentation

◆ SampleProfileWriterText()

llvm::sampleprof::SampleProfileWriterText::SampleProfileWriterText ( std::unique_ptr< raw_ostream > &  OS)
inlineprotected

Definition at line 85 of file SampleProfWriter.h.

Member Function Documentation

◆ write()

std::error_code SampleProfileWriterText::write ( const FunctionSamples S)
overridevirtual

◆ writeHeader()

std::error_code llvm::sampleprof::SampleProfileWriterText::writeHeader ( const StringMap< FunctionSamples > &  ProfileMap)
inlineoverrideprotectedvirtual

Write a file header for the profile file.

Implements llvm::sampleprof::SampleProfileWriter.

Definition at line 89 of file SampleProfWriter.h.

References llvm::sampleprof::SampleProfileWriter::create(), llvm::Format, and llvm::success.

Friends And Related Function Documentation

◆ SampleProfileWriter::create

ErrorOr<std::unique_ptr<SampleProfileWriter> > SampleProfileWriter::create ( std::unique_ptr< raw_ostream > &  OS,
SampleProfileFormat  Format 
)
friend

The documentation for this class was generated from the following files: