Documentation
¶
Index ¶
- Constants
- Variables
- func AllKSyms() iter.Seq[Symbol]
- func ByteSliceToString(s []byte) string
- func FlushBTFSpec()
- func FuncsFromFile(pattern string) map[Symbol]struct{}
- func LoadBTFSpec(mod string) (*btf.Spec, error)
- func NewDumpOption() (*dumpOption, error)
- func ShowBtfFunc(fn *btf.Func) (s string)
- type Addr
- type Arg
- type ArgKind
- type CastType
- type Compare
- type DataExpr
- type Event
- type EventStat
- type Field
- type FuncEvent
- type FuncEvents
- type FuncExpr
- type FuncGraph
- type FuncInfo
- func (f *FuncInfo) GenTraceData(dataExpr DataExpr) error
- func (f *FuncInfo) InitArgsRet()
- func (f *FuncInfo) ShowPara(e *FuncEvent, opt *dumpOption, dst *bytes.Buffer)
- func (f *FuncInfo) ShowRet(e *FuncEvent, opt *dumpOption, dst *bytes.Buffer)
- func (f *FuncInfo) ShowRetTrace(e *FuncEvent, opt *dumpOption, dst *bytes.Buffer)
- func (f *FuncInfo) ShowTrace(e *FuncEvent, opt *dumpOption, dst *bytes.Buffer)
- func (f *FuncInfo) String() string
- type Option
- type Primary
- type Symbol
- type TraceData
- type Value
Constants ¶
View Source
const ( MaxParaLen = funcgraphTraceConstantPARA_LEN MaxTraceCount = int(funcgraphTraceConstantMAX_TRACES) )
View Source
const (
MaxRegParas = 6
)
Variables ¶
View Source
var ErrNotFoundKsym = errors.New("no found sym")
View Source
var RegToStr = []string{"rdi", "rsi", "rdx", "rcx", "r8", "r9"}
View Source
var RetReg = "rax"
Functions ¶
func ByteSliceToString ¶
func FlushBTFSpec ¶ added in v0.1.7
func FlushBTFSpec()
func FuncsFromFile ¶
func NewDumpOption ¶
func NewDumpOption() (*dumpOption, error)
func ShowBtfFunc ¶
Types ¶
type DataExpr ¶
type DataExpr struct {
Dereference bool `parser:"@DereferenceOperator?"`
Typ CastType `parser:"(LeftEdge Struct Whitespace @@ Whitespace DereferenceOperator RightEdge)?"`
First Primary `parser:"@@"`
Fields []Field `parser:"@@*"`
ShowString bool `parser:"@ShowString?"`
CompareInfo Compare `parser:"@@?"`
}
type FuncEvents ¶
type FuncEvents []FuncEvent
func (*FuncEvents) Add ¶
func (es *FuncEvents) Add(e FuncEvent)
func (*FuncEvents) Reset ¶
func (es *FuncEvents) Reset()
type FuncExpr ¶
type FuncExpr struct {
Module string `parser:"(@Ident Colon)?"`
Name string `parser:"@Ident"`
Datas []DataExpr `parser:"(LeftEdge@@(Whitespace? Separator Whitespace? @@)*RightEdge)?"`
}
func ParseFuncWithPara ¶
type FuncGraph ¶
type FuncGraph struct {
// contains filtered or unexported fields
}
func NewFuncGraph ¶
type FuncInfo ¶
type FuncInfo struct {
IsEntry bool
Symbol
Btfinfo *btf.Func
// contains filtered or unexported fields
}
func (*FuncInfo) GenTraceData ¶ added in v0.1.0
func (*FuncInfo) InitArgsRet ¶ added in v0.1.0
func (f *FuncInfo) InitArgsRet()
func (*FuncInfo) ShowRetTrace ¶ added in v0.1.0
type Option ¶
type Option struct {
EntryFuncs []string
AllowFuncs []string
DenyFuncs []string
EntryFuncsOfDwarf map[Symbol]struct{}
AllowFuncsOfDwarf map[Symbol]struct{}
EntryFuncExprs []*FuncExpr
AllowFuncExprs []*FuncExpr
AllowPids []int
DenyPids []int
AllowComms []string
DenyComms []string
Verbose bool
BpfLog bool
DryRun bool
MaxTraceSize uint32
MaxRingSize uint32
Mode string
Target string
InheritChild bool
Duration uint64
Depth uint64
}
type Symbol ¶
type Symbol struct {
Addr uint64
Name string
Module string
// contains filtered or unexported fields
}
func SymbolByAddr ¶ added in v0.1.7
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (Value) ShowSignNumber ¶ added in v0.0.8
func (Value) ShowString ¶ added in v0.0.8
func (Value) ShowUnsignNumber ¶ added in v0.0.8
Click to show internal directories.
Click to hide internal directories.