Documentation
¶
Overview ¶
Package dump holds activity dump related files
Index ¶
- type ActivityDump
- func (ad *ActivityDump) GetSelectorStr() string
- func (ad *ActivityDump) GetState() ActivityDumpStatus
- func (ad *ActivityDump) GetTimeout() time.Duration
- func (ad *ActivityDump) Insert(event *model.Event, resolvers *resolvers.EBPFResolvers) (bool, int64, error)
- func (ad *ActivityDump) IsCountedByLimiter() bool
- func (ad *ActivityDump) IsEventTypeValid(event model.EventType) bool
- func (ad *ActivityDump) MatchesSelector(entry *model.ProcessCacheEntry) bool
- func (ad *ActivityDump) NewProcessNodeCallback(p *activity_tree.ProcessNode)
- func (ad *ActivityDump) SetCountedByLimiter(countedByLimiter bool)
- func (ad *ActivityDump) SetState(state ActivityDumpStatus)
- type ActivityDumpStatus
- type OnNeedNewTracedPid
- type WithDumpOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityDump ¶
type ActivityDump struct { Cookie uint64 // Shouldn't be changed after the activity dump is created Profile *profile.Profile LoadConfig *atomic.Pointer[model.ActivityDumpLoadConfig] // contains filtered or unexported fields }
ActivityDump represents a profile during its event collection phase
func NewActivityDump ¶
func NewActivityDump(pathsReducer *activity_tree.PathsReducer, differentiateArgs bool, dnsMatchMaxDepth int, eventTypes []model.EventType, onNeedNewTracedPid OnNeedNewTracedPid, loadConfig *model.ActivityDumpLoadConfig, options ...WithDumpOption) *ActivityDump
NewActivityDump returns a new instance of an ActivityDump
func NewEmptyActivityDump ¶
func NewEmptyActivityDump(pathsReducer *activity_tree.PathsReducer, differentiateArgs bool, dnsMatchMaxDepth int, eventTypes []model.EventType, onNeedNewTracedPid OnNeedNewTracedPid) *ActivityDump
NewEmptyActivityDump returns a new zero-like instance of an ActivityDump
func (*ActivityDump) GetSelectorStr ¶
func (ad *ActivityDump) GetSelectorStr() string
GetSelectorStr returns the string representation of the activity dump
func (*ActivityDump) GetState ¶
func (ad *ActivityDump) GetState() ActivityDumpStatus
GetState returns the state of the activity dump
func (*ActivityDump) GetTimeout ¶
func (ad *ActivityDump) GetTimeout() time.Duration
GetTimeout returns the timeout of the activity dump
func (*ActivityDump) Insert ¶
func (ad *ActivityDump) Insert(event *model.Event, resolvers *resolvers.EBPFResolvers) (bool, int64, error)
Insert inserts an event into the activity dump
func (*ActivityDump) IsCountedByLimiter ¶
func (ad *ActivityDump) IsCountedByLimiter() bool
IsCountedByLimiter returns true if the activity dump is counted by the rate limiter
func (*ActivityDump) IsEventTypeValid ¶
func (ad *ActivityDump) IsEventTypeValid(event model.EventType) bool
IsEventTypeValid returns true if the provided event type is traced by the activity dump
func (*ActivityDump) MatchesSelector ¶
func (ad *ActivityDump) MatchesSelector(entry *model.ProcessCacheEntry) bool
MatchesSelector returns true if the provided entry matches the selector of the activity dump
func (*ActivityDump) NewProcessNodeCallback ¶
func (ad *ActivityDump) NewProcessNodeCallback(p *activity_tree.ProcessNode)
NewProcessNodeCallback is a callback function used to propagate the fact that a new process node was added to the activity tree
func (*ActivityDump) SetCountedByLimiter ¶
func (ad *ActivityDump) SetCountedByLimiter(countedByLimiter bool)
SetCountedByLimiter sets the flag indicating this activity dump is counted by the rate limiter
func (*ActivityDump) SetState ¶
func (ad *ActivityDump) SetState(state ActivityDumpStatus)
SetState sets the state of the activity dump
type ActivityDumpStatus ¶
type ActivityDumpStatus int
ActivityDumpStatus defines the state of an activity dump
const ( // Stopped means that the ActivityDump is not active Stopped ActivityDumpStatus = iota // Disabled means that the ActivityDump is ready to be in running state, but we're missing the kernel space filters // to start retrieving events from kernel space Disabled // Paused means that the ActivityDump is ready to be in running state, but the kernel space filters have been configured // to prevent from being sent over the perf map Paused // Running means that the ActivityDump is active Running )
type OnNeedNewTracedPid ¶
type OnNeedNewTracedPid func(ad *ActivityDump, pid uint32)
OnNeedNewTracedPid is a callback function used to notify the caller that a new pid should be traced
type WithDumpOption ¶
type WithDumpOption func(ad *ActivityDump)
WithDumpOption can be used to configure an ActivityDump