|
LLVM 22.0.0git
|
#include "llvm/ProfileData/InstrProfReader.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/StringExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/IR/ProfileSummary.h"#include "llvm/ProfileData/InstrProf.h"#include "llvm/ProfileData/MemProfRadixTree.h"#include "llvm/ProfileData/ProfileCommon.h"#include "llvm/ProfileData/SymbolRemappingReader.h"#include "llvm/Support/Endian.h"#include "llvm/Support/Error.h"#include "llvm/Support/ErrorOr.h"#include "llvm/Support/FormatVariadic.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/VirtualFileSystem.h"#include <algorithm>#include <cstddef>#include <cstdint>#include <limits>#include <memory>#include <optional>#include <system_error>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | llvm::InstrProfReaderItaniumRemapper< HashTableImpl > |
| A remapper that applies remappings based on a symbol remapping file. More... | |
Namespaces | |
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
| #define | CHECK_LINE_END(Line) |
| #define | READ_NUM(Str, Dst) |
| #define | VP_READ_ADVANCE(Val) |
Typedefs | |
| using | data_type = InstrProfLookupTrait::data_type |
| using | offset_type = InstrProfLookupTrait::offset_type |
Functions | |
| static InstrProfKind | getProfileKindFromVersion (uint64_t Version) |
| static Expected< std::unique_ptr< MemoryBuffer > > | setupMemoryBuffer (const Twine &Filename, vfs::FileSystem &FS) |
| static Error | initializeReader (InstrProfReader &Reader) |
| static Error | readBinaryIdsInternal (const MemoryBuffer &DataBuffer, ArrayRef< uint8_t > BinaryIdsBuffer, std::vector< llvm::object::BuildID > &BinaryIds, const llvm::endianness Endian) |
| Read a list of binary ids from a profile that consist of a. | |
| static void | printBinaryIdsInternal (raw_ostream &OS, ArrayRef< llvm::object::BuildID > BinaryIds) |
| static Expected< memprof::MemProfRecord > | getMemProfRecordV2 (const memprof::IndexedMemProfRecord &IndexedRecord, MemProfFrameHashTable &MemProfFrameTable, MemProfCallStackHashTable &MemProfCallStackTable) |
| #define CHECK_LINE_END | ( | Line | ) |
| #define READ_NUM | ( | Str, | |
| Dst ) |
| #define VP_READ_ADVANCE | ( | Val | ) |
Definition at line 920 of file InstrProfReader.cpp.
Definition at line 921 of file InstrProfReader.cpp.
|
static |
Definition at line 1431 of file InstrProfReader.cpp.
References llvm::hash_mismatch, llvm::memprof::CallStackIdConverter< MapTy >::LastUnmappedId, llvm::memprof::FrameIdConverter< MapTy >::LastUnmappedId, llvm::make_error(), and llvm::memprof::IndexedMemProfRecord::toMemProfRecord().
Referenced by llvm::IndexedMemProfReader::getMemProfRecord().
|
static |
Definition at line 45 of file InstrProfReader.cpp.
References llvm::ContextSensitive, llvm::FunctionEntryInstrumentation, llvm::FunctionEntryOnly, llvm::IRInstrumentation, llvm::LoopEntriesInstrumentation, llvm::MemProf, llvm::SingleByteCoverage, llvm::TemporalProfile, llvm::Unknown, VARIANT_MASK_BYTE_COVERAGE, VARIANT_MASK_CSIR_PROF, VARIANT_MASK_FUNCTION_ENTRY_ONLY, VARIANT_MASK_INSTR_ENTRY, VARIANT_MASK_INSTR_LOOP_ENTRIES, VARIANT_MASK_IR_PROF, VARIANT_MASK_MEMPROF, and VARIANT_MASK_TEMPORAL_PROF.
Referenced by llvm::InstrProfReaderIndex< HashTableImpl >::getProfileKind(), and llvm::RawInstrProfReader< IntPtrT >::getProfileKind().
|
static |
Definition at line 83 of file InstrProfReader.cpp.
References llvm::InstrProfReader::readHeader().
Referenced by llvm::IndexedInstrProfReader::create(), and llvm::InstrProfReader::create().
|
static |
Definition at line 146 of file InstrProfReader.cpp.
References llvm::format(), and I.
Referenced by llvm::IndexedInstrProfReader::printBinaryIds(), and llvm::RawInstrProfReader< IntPtrT >::printBinaryIds().
|
static |
Read a list of binary ids from a profile that consist of a.
uint64_t binary id length b. uint8_t binary id data c. uint8_t padding (if necessary) This function is shared between raw and indexed profiles. Raw profiles are in host-endian format, and indexed profiles are in little-endian format. So, this function takes an argument indicating the associated endian format to read the binary ids correctly.
Definition at line 96 of file InstrProfReader.cpp.
References llvm::alignToPowerOf2(), llvm::ArrayRef< T >::data(), llvm::MemoryBuffer::getBufferEnd(), llvm::make_error(), llvm::malformed, llvm::support::endian::readNext(), llvm::ArrayRef< T >::size(), and llvm::Error::success().
Referenced by llvm::IndexedInstrProfReader::readBinaryIds().
|
static |
Definition at line 75 of file InstrProfReader.cpp.
References llvm::errorCodeToError(), and llvm::MemoryBuffer::getSTDIN().