LLVM 20.0.0git
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
MemProf.h File Reference
#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/Endian.h"
#include "llvm/Support/EndianStream.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::IndexedMemProfData
 
struct  llvm::memprof::FrameStat
 
class  llvm::memprof::CallStackRadixTreeBuilder
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
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)   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
 

Enumerations

enum  llvm::memprof::IndexedVersion : uint64_t { llvm::memprof::Version0 = 0 , llvm::memprof::Version1 = 1 , 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)
 
CallStackId llvm::memprof::hashCallStack (ArrayRef< FrameId > CS)
 
template<typename value_type , typename IterTy >
value_type llvm::memprof::detail::DerefIterator (IterTy Iter)
 
llvm::DenseMap< FrameId, FrameStat > llvm::memprof::computeFrameHistogram (llvm::MapVector< CallStackId, llvm::SmallVector< FrameId > > &MemProfCallStackData)
 
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 = Version3
 

Macro Definition Documentation

◆ MIBEntryDef [1/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [2/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [3/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [4/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [5/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [6/9]

#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 192 of file MemProf.h.

◆ MIBEntryDef [7/9]

#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:1309

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [8/9]

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

Definition at line 192 of file MemProf.h.

◆ MIBEntryDef [9/9]

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

Definition at line 192 of file MemProf.h.