LLVM 19.0.0git
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
MemProf.h File Reference
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/ProfileData/MemProfData.inc"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
#include <optional>
#include "llvm/ProfileData/MIBEntryDef.inc"

Go to the source code of this file.

Classes

struct  llvm::memprof::PortableMemInfoBlock
 
struct  llvm::memprof::Frame
 
struct  llvm::memprof::IndexedAllocationInfo
 
struct  llvm::memprof::AllocationInfo
 
struct  llvm::memprof::IndexedMemProfRecord
 
struct  llvm::memprof::MemProfRecord
 
class  llvm::memprof::RecordLookupTrait
 
class  llvm::memprof::RecordWriterTrait
 
class  llvm::memprof::FrameWriterTrait
 
class  llvm::memprof::FrameLookupTrait
 

Namespaces

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

Macros

#define MIBEntryDef(NameTag, Name, Type)   NameTag,
 
#define MIBEntryDef(NameTag, Name, Type)   Name = Block.Name;
 
#define MIBEntryDef(NameTag, Name, Type)
 
#define MIBEntryDef(NameTag, Name, Type)
 
#define MIBEntryDef(NameTag, Name, Type)    OS << " " << #Name << ": " << Name << "\n";
 
#define MIBEntryDef(NameTag, Name, Type)    Type get##Name() const { return Name; }
 
#define MIBEntryDef(NameTag, Name, Type)   List.push_back(Meta::Name);
 
#define MIBEntryDef(NameTag, Name, Type)
 
#define MIBEntryDef(NameTag, Name, Type)   Result += sizeof(Type);
 
#define MIBEntryDef(NameTag, Name, Type)   Type Name = Type();
 

Typedefs

using llvm::memprof::MemProfSchema = llvm::SmallVector< Meta, static_cast< int >(Meta::Size)>
 
using llvm::memprof::FrameId = uint64_t
 
using llvm::memprof::CallStackId = uint64_t
 

Enumerations

enum  llvm::memprof::IndexedVersion : uint64_t { llvm::memprof::Version0 = 0 , llvm::memprof::Version1 = 1 , llvm::memprof::Version2 = 2 }
 
enum class  llvm::memprof::Meta : uint64_t { llvm::memprof::Start = 0 , llvm::memprof::MIBEntryDef , llvm::memprof::Size }
 

Functions

Expected< MemProfSchema > llvm::memprof::readMemProfSchema (const unsigned char *&Buffer)
 
CallStackId llvm::memprof::hashCallStack (ArrayRef< FrameId > CS)
 
void llvm::memprof::verifyIndexedMemProfRecord (const IndexedMemProfRecord &Record)
 
void llvm::memprof::verifyFunctionProfileData (const llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > &FunctionProfileData)
 

Variables

constexpr uint64_t llvm::memprof::MinimumSupportedVersion = Version0
 
constexpr uint64_t llvm::memprof::MaximumSupportedVersion = Version1
 

Macro Definition Documentation

◆ MIBEntryDef [1/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)    NameTag,

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [2/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)    Name = Block.Name;

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [3/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
case Meta::Name: { \
Name = endian::readNext<Type, llvm::endianness::little, unaligned>(Ptr); \
} break;
std::string Name

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [4/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
case Meta::Name: { \
LE.write<Type>(Name); \
} break;
RelocType Type
Definition: COFFYAML.cpp:391

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [5/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)     OS << " " << #Name << ": " << Name << "\n";

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [6/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)     Type get##Name() const { return Name; }

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [7/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)    List.push_back(Meta::Name);

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [8/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
if (Other.get##Name() != get##Name()) \
return false;
std::optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1291

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [9/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)    Result += sizeof(Type);

Definition at line 148 of file MemProf.h.

◆ MIBEntryDef [10/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)    Type Name = Type();

Definition at line 148 of file MemProf.h.