Documentation ¶
Index ¶
- Variables
- func NewRecordingFileProvider(fp FileProvider) *recordingFileProvider
- func SafeFtracePath(path string) bool
- func SafeProcPath(path string) bool
- type BadEventHeader
- type Event
- func (e Event) Contents() []byte
- func (e Event) Etype() *EventType
- func (e Event) FlagChars() string
- func (e Event) GetCpu() uint64
- func (e Event) GetField(name string) interface{}
- func (e Event) GetName() string
- func (e Event) GetPid() uint64
- func (e Event) GetWhen() uint64
- func (e Event) Microseconds() int
- func (e Event) ProcessName() string
- func (e Event) Seconds() int
- func (e *Event) SetFtrace(f *Ftrace)
- func (e Event) String() string
- type EventType
- func (etype *EventType) DecodeEvent(data []byte, cpu int, when uint64) (*Event, error)
- func (etype *EventType) Disable() error
- func (etype *EventType) Enable() error
- func (etype *EventType) Format(e Event) string
- func (etype EventType) GetFunction(name string) cparse.Function
- func (etype EventType) GetType(name string) string
- func (etype EventType) GetVariable(name string) cparse.Variable
- func (etype *EventType) Id() int
- func (etype *EventType) Name() string
- type Events
- type EventsByTime
- type FileProvider
- type Ftrace
- func (f *Ftrace) Capture(callback func(Events))
- func (f *Ftrace) Clear() error
- func (f *Ftrace) Disable() error
- func (f *Ftrace) Enable() error
- func (f *Ftrace) NewEventType(name string, path string) (*EventType, error)
- func (f *Ftrace) PrepareCapture(cpus int, doneCh <-chan bool) error
- func (f *Ftrace) ReadKernelTrace() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var BadEvent error = errors.New("Bad event name")
View Source
var BadEventData error = errors.New("Bad event data")
View Source
var BadFtraceFileName error = errors.New("Bad file name")
View Source
var BadPageHeader = errors.New("Bad page header")
View Source
var BadProcFileName error = errors.New("Bad file name")
Functions ¶
func NewRecordingFileProvider ¶
func NewRecordingFileProvider(fp FileProvider) *recordingFileProvider
func SafeProcPath ¶
Types ¶
type BadEventHeader ¶
func (BadEventHeader) Error ¶
func (e BadEventHeader) Error() string
type Event ¶
type Event struct { Cpu int When uint64 Pid int Flags uint Preempt int // contains filtered or unexported fields }
func (Event) GetPid ¶ added in v0.1908162349.0
GetPid actually returns the tgid, an atsu-specific field
func (Event) Microseconds ¶
func (Event) ProcessName ¶
type EventType ¶
type EventType struct {
// contains filtered or unexported fields
}
func NewHeaderType ¶
func NewHeaderType(fp FileProvider, path string) (*EventType, error)
func (*EventType) DecodeEvent ¶
type EventsByTime ¶
type EventsByTime struct{ Events }
func (EventsByTime) Less ¶
func (e EventsByTime) Less(i, j int) bool
type FileProvider ¶
type FileProvider interface { ReadFtraceFile(string) ([]byte, error) WriteFtraceFile(string, []byte) error ReadProcFile(string) ([]byte, error) OpenFtrace(string) (io.ReadCloser, error) }
func NewLocalFileProvider ¶
func NewLocalFileProvider() FileProvider
func NewTestFileProvider ¶
func NewTestFileProvider(files map[string]string) FileProvider
type Ftrace ¶
type Ftrace struct {
// contains filtered or unexported fields
}
func New ¶
func New(fp FileProvider) (*Ftrace, error)
func (*Ftrace) NewEventType ¶
func (*Ftrace) ReadKernelTrace ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.