Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFunctionNotFoundInCollection = errors.New("function not found in eBPF collection")
ErrFunctionNotFoundInCollection indicates a function was present in DWARF but not in the eBPF collection spec.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer provides stack usage information for one collection file.
func NewAnalyzer ¶
NewAnalyzer parses DWARF data from a collection path.
func (*Analyzer) CollectionSummary ¶
func (a *Analyzer) CollectionSummary() []ProgramStackUsage
CollectionSummary returns peak stack usage for all BPF programs in the collection.
func (*Analyzer) CollectionSummaryInCollection ¶
func (a *Analyzer) CollectionSummaryInCollection() ([]ProgramStackUsage, error)
CollectionSummaryInCollection returns peak stack usage for BPF programs that are also present in the loaded eBPF collection.
type CallStackEntry ¶
CallStackEntry describes one call frame for a stack slot.
type ProgramStackUsage ¶
ProgramStackUsage holds peak stack usage for one program.
func SortProgramStackUsage ¶
func SortProgramStackUsage(stackUsagePerProgram map[string]int64) []ProgramStackUsage
SortProgramStackUsage returns usage sorted by bytes descending and name ascending.
type SlotUsage ¶
type SlotUsage struct {
Offset int64 `json:"offset"`
Name string `json:"name"`
ByteSize int64 `json:"byte_size"`
FileLineCol string `json:"file_line_col"`
Callstack []CallStackEntry `json:"callstack,omitempty"`
}
SlotUsage describes one variable/register use mapped to a stack offset.
func (SlotUsage) DisplayEqual ¶
DisplayEqual reports whether two entries render as the same line in non-callstack views.