LLVM 20.0.0git
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
MemProf.h File Reference
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/ProfileData/MemProfData.inc"
#include "llvm/Support/BLAKE3.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/HashBuilder.h"
#include "llvm/Support/raw_ostream.h"
#include <bitset>
#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
 
class  llvm::memprof::CallStackWriterTrait
 
class  llvm::memprof::CallStackLookupTrait
 
struct  llvm::memprof::FrameIdConverter< MapTy >
 
struct  llvm::memprof::CallStackIdConverter< MapTy >
 
struct  llvm::memprof::LinearFrameIdConverter
 
struct  llvm::memprof::LinearCallStackIdConverter
 
struct  llvm::memprof::LineLocation
 
struct  llvm::memprof::CallerCalleePairExtractor
 
struct  llvm::memprof::IndexedMemProfData
 
struct  llvm::memprof::IndexedCallstackIdConveter
 
struct  llvm::memprof::FrameStat
 
class  llvm::memprof::CallStackRadixTreeBuilder< FrameIdTy >
 

Namespaces

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

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)
 
#define MIBEntryDef(NameTag, Name, Type)
 
#define MIBEntryDef(NameTag, Name, Type)
 
#define MIBEntryDef(NameTag, Name, 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::LinearFrameId = uint32_t
 
using llvm::memprof::CallStackId = uint64_t
 
using llvm::memprof::LinearCallStackId = uint32_t
 
using llvm::memprof::CallEdgeTy = std::pair< LineLocation, uint64_t >
 

Enumerations

enum  llvm::memprof::IndexedVersion : uint64_t { llvm::memprof::Version2 = 2 , llvm::memprof::Version3 = 3 }
 
enum class  llvm::memprof::Meta : uint64_t { llvm::memprof::Start = 0 , llvm::memprof::MIBEntryDef , llvm::memprof::Size }
 

Functions

MemProfSchema llvm::memprof::getFullSchema ()
 
MemProfSchema llvm::memprof::getHotColdSchema ()
 
Expected< MemProfSchema > llvm::memprof::readMemProfSchema (const unsigned char *&Buffer)
 
template<typename value_type , typename IterTy >
value_type llvm::memprof::detail::DerefIterator (IterTy Iter)
 
template<typename FrameIdTy >
llvm::DenseMap< FrameIdTy, FrameStat > llvm::memprof::computeFrameHistogram (llvm::MapVector< CallStackId, llvm::SmallVector< FrameIdTy > > &MemProfCallStackData)
 

Variables

constexpr uint64_t llvm::memprof::MinimumSupportedVersion = Version2
 
constexpr uint64_t llvm::memprof::MaximumSupportedVersion = Version3
 

Macro Definition Documentation

◆ MIBEntryDef [1/10]

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

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [2/10]

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

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [3/10]

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

Definition at line 207 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:410

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [5/10]

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

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [6/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
Type get##Name() const { \
assert(Schema[llvm::to_underlying(Meta::Name)]); \
return Name; \
}
constexpr std::underlying_type_t< Enum > to_underlying(Enum E)
Returns underlying integer value of an enum.

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [7/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
void set##Name(Type NewVal) { \
assert(Schema[llvm::to_underlying(Meta::Name)]); \
Name = NewVal; \
}

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [8/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
if (Schema[llvm::to_underlying(Meta::Name)] && \
Other.get##Name() != get##Name()) \
return false;
std::optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1313

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [9/10]

#define MIBEntryDef (   NameTag,
  Name,
  Type 
)
Value:
case Meta::Name: { \
Result += sizeof(Type); \
} break;

Definition at line 207 of file MemProf.h.

◆ MIBEntryDef [10/10]

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

Definition at line 207 of file MemProf.h.