LLVM 22.0.0git
BTFParser.cpp File Reference

Go to the source code of this file.

Classes

struct  llvm::BTFParser::ParseContext

Macros

#define DEBUG_TYPE   "debug-info-btf-parser"

Enumerations

enum  RelocKindGroup { RKG_FIELD , RKG_TYPE , RKG_ENUMVAL , RKG_UNKNOWN }

Functions

static size_t byteSize (BTF::CommonType *Type)
template<typename T>
static const TfindInfo (const DenseMap< uint64_t, SmallVector< T, 0 > > &SecMap, SectionedAddress Address)
static RelocKindGroup relocKindGroup (const BTF::BPFFieldReloc *Reloc)
static bool isMod (const BTF::CommonType *Type)
static bool printMod (const BTFParser &BTF, const BTF::CommonType *Type, raw_ostream &Stream)
static const BTF::CommonTypeskipModsAndTypedefs (const BTFParser &BTF, const BTF::CommonType *Type)
static void relocKindName (uint32_t X, raw_ostream &Out)

Variables

const char BTFSectionName [] = ".BTF"
const char BTFExtSectionName [] = ".BTF.ext"
const BTF::CommonType VoidTypeInst = {0, BTF::BTF_KIND_UNKN << 24, {0}}

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "debug-info-btf-parser"

Definition at line 19 of file BTFParser.cpp.

Enumeration Type Documentation

◆ RelocKindGroup

Enumerator
RKG_FIELD 
RKG_TYPE 
RKG_ENUMVAL 
RKG_UNKNOWN 

Definition at line 464 of file BTFParser.cpp.

Function Documentation

◆ byteSize()

size_t byteSize ( BTF::CommonType * Type)
static

Definition at line 154 of file BTFParser.cpp.

References Size.

◆ findInfo()

template<typename T>
const T * findInfo ( const DenseMap< uint64_t, SmallVector< T, 0 > > & SecMap,
SectionedAddress Address )
static

◆ isMod()

bool isMod ( const BTF::CommonType * Type)
static

Definition at line 494 of file BTFParser.cpp.

Referenced by skipModsAndTypedefs().

◆ printMod()

bool printMod ( const BTFParser & BTF,
const BTF::CommonType * Type,
raw_ostream & Stream )
static

Definition at line 506 of file BTFParser.cpp.

Referenced by llvm::BTFParser::symbolize().

◆ relocKindGroup()

◆ relocKindName()

◆ skipModsAndTypedefs()

const BTF::CommonType * skipModsAndTypedefs ( const BTFParser & BTF,
const BTF::CommonType * Type )
static

Definition at line 527 of file BTFParser.cpp.

References llvm::sampleprof::Base, isMod(), and llvm::Type::Type().

Referenced by llvm::BTFParser::symbolize().

Variable Documentation

◆ BTFExtSectionName

const char BTFExtSectionName[] = ".BTF.ext"

Definition at line 27 of file BTFParser.cpp.

Referenced by llvm::BTFParser::hasBTFSections(), and llvm::BTFParser::parse().

◆ BTFSectionName

const char BTFSectionName[] = ".BTF"

Definition at line 26 of file BTFParser.cpp.

Referenced by llvm::BTFParser::hasBTFSections(), and llvm::BTFParser::parse().

◆ VoidTypeInst

const BTF::CommonType VoidTypeInst = {0, BTF::BTF_KIND_UNKN << 24, {0}}

Definition at line 191 of file BTFParser.cpp.