Documentation
¶
Overview ¶
Code generated by glibc_dwarfdump. DO NOT EDIT.
Code generated by musl_dwarfdump. DO NOT EDIT.
Code generated by python_dwarfdump. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func GetTSSKey(pid uint32, version Version, offsets *UserOffsets, ...) (int32, error)
- func LoadPerf() (*ebpf.CollectionSpec, error)
- func LoadPerfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- func PythonString(tok []int8, typ *PerfPyStrType) string
- type GlibcOffsets
- type LazySymbols
- type MuslOffsets
- type Perf
- func (s *Perf) CollectEvents(buf []*PerfPyEvent) []*PerfPyEvent
- func (s *Perf) FindProc(pid uint32) *Proc
- func (s *Perf) GetLazySymbols() *LazySymbols
- func (s *Perf) GetSymbols(svcReason string) (map[uint32]*PerfPySymbol, error)
- func (s *Perf) NewProc(pid uint32, data *PerfPyPidData, options *symtab.SymbolOptions, ...) (*Proc, error)
- func (s *Perf) RemoveDeadPID(pid uint32)
- type PerfMapSpecs
- type PerfMaps
- type PerfObjects
- type PerfProgramSpecs
- type PerfPrograms
- type PerfSpecs
- type Proc
- type ProcInfo
- type PyError
- type PyStrType
- type StackStatus
- type UserOffsets
- type Version
Constants ¶
const MapNameSymbols = "py_symbols"
Variables ¶
var Py310 = &Version{Major: 3, Minor: 10}
var Py311 = &Version{Major: 3, Minor: 11}
var Py312 = &Version{Major: 3, Minor: 12}
var Py313 = &Version{Major: 3, Minor: 13}
var Py37 = &Version{Major: 3, Minor: 7}
Functions ¶
func GetTSSKey ¶
func GetTSSKey(pid uint32, version Version, offsets *UserOffsets, autoTLSkeyAddr, pyRuntime uint64, libc *PerfLibc) (int32, error)
todo split offsets validation and offset usage into separate routines
func LoadPerf ¶
func LoadPerf() (*ebpf.CollectionSpec, error)
LoadPerf returns the embedded CollectionSpec for Perf.
func LoadPerfObjects ¶
func LoadPerfObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadPerfObjects loads Perf and converts it into a struct.
The following types are suitable as obj argument:
*PerfObjects *PerfPrograms *PerfMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
func PythonString ¶
Types ¶
type GlibcOffsets ¶
type LazySymbols ¶
type LazySymbols struct {
// contains filtered or unexported fields
}
LazySymbols tries to reuse a map from previous profile collection. If found a new symbols, then full dump ( GetSymbols ) is performed.
type MuslOffsets ¶
type Perf ¶
type Perf struct {
// contains filtered or unexported fields
}
func (*Perf) CollectEvents ¶
func (s *Perf) CollectEvents(buf []*PerfPyEvent) []*PerfPyEvent
func (*Perf) GetLazySymbols ¶
func (s *Perf) GetLazySymbols() *LazySymbols
func (*Perf) GetSymbols ¶
func (*Perf) RemoveDeadPID ¶
type PerfMapSpecs ¶
type PerfMapSpecs struct { }
PerfMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type PerfMaps ¶
type PerfMaps struct { }
PerfMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadPerfObjects or ebpf.CollectionSpec.LoadAndAssign.
type PerfObjects ¶
type PerfObjects struct { PerfPrograms PerfMaps }
PerfObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadPerfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*PerfObjects) Close ¶
func (o *PerfObjects) Close() error
type PerfProgramSpecs ¶
type PerfProgramSpecs struct { }
PerfSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type PerfPrograms ¶
type PerfPrograms struct { }
PerfPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadPerfObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*PerfPrograms) Close ¶
func (p *PerfPrograms) Close() error
type PerfSpecs ¶
type PerfSpecs struct { PerfProgramSpecs PerfMapSpecs }
PerfSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type Proc ¶
type Proc struct { PerfPyPidData *PerfPyPidData SymbolOptions *symtab.SymbolOptions }
type ProcInfo ¶
type PyError ¶
type PyError uint8
var ( PyErrorGeneric PyError = 1 PyErrorThreadState PyError = 2 PyErrorThreadStateNull PyError = 3 PyErrorTopFrame PyError = 4 PyErrorFrameCode PyError = 5 PyErrorFramePrev PyError = 6 PyErrorSymbol PyError = 7 PyErrorTlsbase PyError = 8 PyErrorFirstArg PyError = 9 PyErrorClassName PyError = 10 PyErrorFileName PyError = 11 PyErrorName PyError = 12 )
type StackStatus ¶
type StackStatus uint8
var ( StackStatusComplete StackStatus = 0 StackStatusError StackStatus = 1 StackStatusTruncated StackStatus = 2 )
func (StackStatus) String ¶
func (s StackStatus) String() string
type UserOffsets ¶
type UserOffsets struct { PyVarObject_ob_size int16 PyObject_ob_type int16 PyTypeObject_tp_name int16 PyThreadState_frame int16 PyThreadState_cframe int16 PyThreadState_current_frame int16 PyCFrame_current_frame int16 PyFrameObject_f_back int16 PyFrameObject_f_code int16 PyFrameObject_f_localsplus int16 PyCodeObject_co_filename int16 PyCodeObject_co_name int16 PyCodeObject_co_varnames int16 PyCodeObject_co_localsplusnames int16 PyCodeObject__co_cell2arg int16 PyCodeObject__co_cellvars int16 PyCodeObject__co_nlocals int16 PyTupleObject_ob_item int16 PyInterpreterFrame_f_code int16 PyInterpreterFrame_f_executable int16 PyInterpreterFrame_previous int16 PyInterpreterFrame_localsplus int16 PyInterpreterFrame_owner int16 PyRuntimeState_gilstate int16 PyRuntimeState_autoTSSkey int16 Gilstate_runtime_state_autoTSSkey int16 PyTssT_is_initialized int16 PyTssT_key int16 PyTssTSize int16 PyASCIIObjectSize int16 PyCompactUnicodeObjectSize int16 PyCellObject__ob_ref int16 }
UserOffsets keeps Python offsets which are then partially passed to ebpf with ProfilePyOffsetConfig
func GetUserOffsets ¶
func GetUserOffsets(version Version) (*UserOffsets, bool, error)
type Version ¶
type Version struct {
Major, Minor, Patch int
}
func GetGlibcVersionFromFile ¶
func GetMuslVersionFromFile ¶
func GetMuslVersionFromReader ¶
GetMuslVersionFromReader return minor musl version. For example 1 for 1.1.44 and 2 for 1.2.4
func GetPythonPatchVersion ¶
GetPythonPatchVersion searches for a patch version given a major + minor version with regexp r is libpython3.11.so or python3.11 elf binary