Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidInput = errors.New("invalid input") ErrInvalidMaxActive = errors.New("can only set maxactive on kretprobes") )
Functions ¶
func EventID ¶
EventID reads a trace event's ID from tracefs given its group and name. The kernel requires group and name to be alphanumeric or underscore.
func KprobeToken ¶
KprobeToken creates the SYM[+offs] token for the tracefs api.
func RandomGroup ¶
RandomGroup generates a pseudorandom string for use as a tracefs group name. Returns an error when the output string would exceed 63 characters (kernel limitation), when rand.Read() fails or when prefix contains characters not allowed by IsValidTraceID.
func UprobeToken ¶
UprobeToken creates the PATH:OFFSET(REF_CTR_OFFSET) token for the tracefs api.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event represents an entry in a tracefs probe events file.
func NewEvent ¶
NewEvent creates a new ephemeral trace event.
Returns os.ErrNotExist if symbol is not a valid kernel symbol, or if it is not traceable with kprobes. Returns os.ErrExist if a probe with the same group and symbol already exists. Returns an error if args.RetprobeMaxActive is used on non kprobe types. Returns ErrNotSupported if the kernel is too old to support kretprobe maxactive.
func (*Event) Close ¶
Close removes the event from tracefs.
Returns os.ErrClosed if the event has already been closed before.