LLVM 19.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)
 
static uint64_t writeMemProfFrames (ProfOStream &OS, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData)
 
static uint64_t writeMemProfCallStacks (ProfOStream &OS, llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &MemProfCallStackData)
 
static Error writeMemProfV0 (ProfOStream &OS, llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &MemProfRecordData, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData)
 
static Error writeMemProfV1 (ProfOStream &OS, llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &MemProfRecordData, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData)
 
static Error writeMemProfV2 (ProfOStream &OS, llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &MemProfRecordData, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData, llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &MemProfCallStackData)
 
static Error writeMemProf (ProfOStream &OS, llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &MemProfRecordData, llvm::MapVector< memprof::FrameId, memprof::Frame > &MemProfFrameData, llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &MemProfCallStackData, memprof::IndexedVersion MemProfVersionRequested)
 

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,
llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &  MemProfRecordData,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData,
llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &  MemProfCallStackData,
memprof::IndexedVersion  MemProfVersionRequested 
)
static

◆ writeMemProfCallStacks()

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

Definition at line 486 of file InstrProfWriter.cpp.

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

Referenced by writeMemProfV2().

◆ 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 
)
static

◆ writeMemProfSchema()

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

◆ writeMemProfV0()

static Error writeMemProfV0 ( ProfOStream OS,
llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &  MemProfRecordData,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData 
)
static

◆ writeMemProfV1()

static Error writeMemProfV1 ( ProfOStream OS,
llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &  MemProfRecordData,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData 
)
static

◆ writeMemProfV2()

static Error writeMemProfV2 ( ProfOStream OS,
llvm::MapVector< GlobalValue::GUID, memprof::IndexedMemProfRecord > &  MemProfRecordData,
llvm::MapVector< memprof::FrameId, memprof::Frame > &  MemProfFrameData,
llvm::MapVector< memprof::CallStackId, llvm::SmallVector< memprof::FrameId > > &  MemProfCallStackData 
)
static

Variable Documentation

◆ ValueProfKindStr

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

Definition at line 911 of file InstrProfWriter.cpp.

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