usdt

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Pid int
	// contains filtered or unexported fields
}

Context is the attached usdt context for a particular pid

func NewContext

func NewContext(pid int) (*Context, error)

NewContext returns a new usdt context for a given pid. The supplied code and cflags will be used to compile the module in CompileModule

func (*Context) AddUSDTArguments

func (c *Context) AddUSDTArguments(originalCode string) (string, error)

AddUSDTArguments augments the originalCode with USDT arguments needed to allow the probes to compile

func (*Context) AttachUprobes

func (c *Context) AttachUprobes(module *bcc.Module) error

AttachUprobes attaches uprobes corresponding to enabled USDT probes The module given must be the module containing the enabled probes

func (*Context) Close

func (c *Context) Close()

Close closes a Context. After this it cannot be used.

func (*Context) EnableProbe

func (c *Context) EnableProbe(probe, fnName string) error

EnableProbe enables a probe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL