LLVM 20.0.0git
Classes | Namespaces | Macros | Functions | Variables
InstrProfWriter.cpp File Reference
#include "llvm/ProfileData/InstrProfWriter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/ProfileSummary.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/ProfileData/MemProf.h"
#include "llvm/ProfileData/ProfileCommon.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/OnDiskHashTable.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "llvm/ProfileData/InstrProfData.inc"

Go to the source code of this file.

Classes

struct  PatchItem
 
class  llvm::ProfOStream
 
class  llvm::InstrProfRecordWriterTrait
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define VALUE_PROF_KIND(Enumerator, Value, Descr)   #Enumerator,
 

Functions

static void setSummary (IndexedInstrProf::Summary *TheSummary, ProfileSummary &PS)
 
static void writeMemProfSchema (ProfOStream &OS, const memprof::MemProfSchema &Schema)
 
static uint64_t writeMemProfRecords (ProfOStream &OS, llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &MemProfRecordData, memprof::MemProfSchema *Schema, memprof::IndexedVersion Version, llvm::DenseMap< memprof::CallStackId, memprof::LinearCallStackId > *MemProfCallStackIndexes=nullptr)
 
static uint64_t writeMemProfFrames (ProfOStream &OS, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData)
 
static llvm::DenseMap< memprof::FrameId, memprof::LinearFrameIdwriteMemProfFrameArray (ProfOStream &OS, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData, llvm::DenseMap< memprof::FrameId, memprof::FrameStat > &FrameHistogram)
 
static uint64_t writeMemProfCallStacks (ProfOStream &OS, llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &MemProfCallStackData)
 
static llvm::DenseMap< memprof::CallStackId, memprof::LinearCallStackIdwriteMemProfCallStackArray (ProfOStream &OS, llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &MemProfCallStackData, llvm::DenseMap< memprof::FrameId, memprof::LinearFrameId > &MemProfFrameIndexes, llvm::DenseMap< memprof::FrameId, memprof::FrameStat > &FrameHistogram)
 
static Error writeMemProfV0 (ProfOStream &OS, memprof::IndexedMemProfData &MemProfData)
 
static Error writeMemProfV1 (ProfOStream &OS, memprof::IndexedMemProfData &MemProfData)
 
static Error writeMemProfV2 (ProfOStream &OS, memprof::IndexedMemProfData &MemProfData, bool MemProfFullSchema)
 
static Error writeMemProfV3 (ProfOStream &OS, memprof::IndexedMemProfData &MemProfData, bool MemProfFullSchema)
 
static Error writeMemProf (ProfOStream &OS, memprof::IndexedMemProfData &MemProfData, memprof::IndexedVersion MemProfVersionRequested, bool MemProfFullSchema)
 

Variables

static const charValueProfKindStr []
 

Macro Definition Documentation

◆ VALUE_PROF_KIND

#define VALUE_PROF_KIND (   Enumerator,
  Value,
  Descr 
)    #Enumerator,

Function Documentation

◆ setSummary()

static void setSummary ( IndexedInstrProf::Summary TheSummary,
ProfileSummary PS 
)
static

◆ writeMemProf()

static Error writeMemProf ( ProfOStream OS,
memprof::IndexedMemProfData MemProfData,
memprof::IndexedVersion  MemProfVersionRequested,
bool  MemProfFullSchema 
)
static

◆ writeMemProfCallStackArray()

◆ writeMemProfCallStacks()

static uint64_t writeMemProfCallStacks ( ProfOStream OS,
llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &  MemProfCallStackData 
)
static

Definition at line 548 of file InstrProfWriter.cpp.

References llvm::OnDiskChainedHashTableGenerator< Info >::Emit(), and OS.

Referenced by writeMemProfV2().

◆ writeMemProfFrameArray()

static llvm::DenseMap< memprof::FrameId, memprof::LinearFrameId > writeMemProfFrameArray ( ProfOStream OS,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData,
llvm::DenseMap< memprof::FrameId, memprof::FrameStat > &  FrameHistogram 
)
static

◆ writeMemProfFrames()

static uint64_t writeMemProfFrames ( ProfOStream OS,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData 
)
static

◆ writeMemProfRecords()

static uint64_t writeMemProfRecords ( ProfOStream OS,
llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &  MemProfRecordData,
memprof::MemProfSchema Schema,
memprof::IndexedVersion  Version,
llvm::DenseMap< memprof::CallStackId, memprof::LinearCallStackId > *  MemProfCallStackIndexes = nullptr 
)
static

◆ writeMemProfSchema()

static void writeMemProfSchema ( ProfOStream OS,
const memprof::MemProfSchema Schema 
)
static

◆ writeMemProfV0()

static Error writeMemProfV0 ( ProfOStream OS,
memprof::IndexedMemProfData MemProfData 
)
static

◆ writeMemProfV1()

static Error writeMemProfV1 ( ProfOStream OS,
memprof::IndexedMemProfData MemProfData 
)
static

◆ writeMemProfV2()

static Error writeMemProfV2 ( ProfOStream OS,
memprof::IndexedMemProfData MemProfData,
bool  MemProfFullSchema 
)
static

◆ writeMemProfV3()

static Error writeMemProfV3 ( ProfOStream OS,
memprof::IndexedMemProfData MemProfData,
bool  MemProfFullSchema 
)
static

Variable Documentation

◆ ValueProfKindStr

const char* ValueProfKindStr[]
static
Initial value:
= {
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
}

Definition at line 1031 of file InstrProfWriter.cpp.

Referenced by llvm::InstrProfWriter::writeRecordInText().