|
LLVM
3.7.0
|
Writer for instrumentation based profile data. More...
#include <InstrProfWriter.h>
Public Types | |
| typedef SmallDenseMap < uint64_t, std::vector < uint64_t >, 1 > | CounterData |
Public Member Functions | |
| InstrProfWriter () | |
| std::error_code | addFunctionCounts (StringRef FunctionName, uint64_t FunctionHash, ArrayRef< uint64_t > Counters) |
| Add function counts for the given function. More... | |
| void | write (raw_fd_ostream &OS) |
Write the profile to OS. More... | |
| std::unique_ptr< MemoryBuffer > | writeBuffer () |
| Write the profile, returning the raw data. For testing. More... | |
Writer for instrumentation based profile data.
Definition at line 30 of file InstrProfWriter.h.
| typedef SmallDenseMap<uint64_t, std::vector<uint64_t>, 1> llvm::InstrProfWriter::CounterData |
Definition at line 32 of file InstrProfWriter.h.
|
inline |
Definition at line 37 of file InstrProfWriter.h.
| std::error_code InstrProfWriter::addFunctionCounts | ( | StringRef | FunctionName, |
| uint64_t | FunctionHash, | ||
| ArrayRef< uint64_t > | Counters | ||
| ) |
Add function counts for the given function.
If there are already counts for this function and the hash and number of counts match, each counter is summed.
Definition at line 75 of file InstrProfWriter.cpp.
References llvm::count_mismatch, llvm::counter_overflow, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), I, llvm::ArrayRef< T >::size(), and llvm::success.
| void InstrProfWriter::write | ( | raw_fd_ostream & | OS | ) |
Write the profile to OS.
Definition at line 134 of file InstrProfWriter.cpp.
References llvm::raw_fd_ostream::seek().
| std::unique_ptr< MemoryBuffer > InstrProfWriter::writeBuffer | ( | ) |
Write the profile, returning the raw data. For testing.
Definition at line 144 of file InstrProfWriter.cpp.
References llvm::Data, llvm::raw_ostream::flush(), and llvm::MemoryBuffer::getMemBufferCopy().
1.8.6