Versions in this module Expand all Collapse all v0 v0.1908240011.0 Aug 24, 2019 v0.1908162349.0 Aug 16, 2019 Changes in this version type Event + func (e Event) GetCpu() uint64 + func (e Event) GetName() string + func (e Event) GetPid() uint64 + func (e Event) GetWhen() uint64 v0.1905062139.0 May 6, 2019 v0.1902130135.0 Feb 13, 2019 v0.1902042334.0 Feb 4, 2019 Changes in this version + var BadEvent error = errors.New("Bad event name") + var BadEventData error = errors.New("Bad event data") + var BadFtraceFileName error = errors.New("Bad file name") + var BadPageHeader = errors.New("Bad page header") + var BadProcFileName error = errors.New("Bad file name") + func NewRecordingFileProvider(fp FileProvider) *recordingFileProvider + func SafeFtracePath(path string) bool + func SafeProcPath(path string) bool + type BadEventHeader struct + Offset int + Page []byte + What string + func (e BadEventHeader) Error() string + type Event struct + Cpu int + Flags uint + Pid int + Preempt int + When uint64 + func (e *Event) SetFtrace(f *Ftrace) + func (e Event) Contents() []byte + func (e Event) Etype() *EventType + func (e Event) FlagChars() string + func (e Event) GetField(name string) interface{} + func (e Event) Microseconds() int + func (e Event) ProcessName() string + func (e Event) Seconds() int + func (e Event) String() string + type EventType struct + func NewHeaderType(fp FileProvider, path string) (*EventType, error) + 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) Id() int + func (etype *EventType) Name() string + func (etype EventType) GetFunction(name string) cparse.Function + func (etype EventType) GetType(name string) string + func (etype EventType) GetVariable(name string) cparse.Variable + type Events []*Event + func (e Events) HasEventType(etype *EventType) bool + func (e Events) Len() int + func (e Events) Swap(i, j int) + type EventsByTime struct + func (e EventsByTime) Less(i, j int) bool + type FileProvider interface + OpenFtrace func(string) (io.ReadCloser, error) + ReadFtraceFile func(string) ([]byte, error) + ReadProcFile func(string) ([]byte, error) + WriteFtraceFile func(string, []byte) error + func NewLocalFileProvider() FileProvider + func NewTestFileProvider(files map[string]string) FileProvider + type Ftrace struct + func New(fp FileProvider) (*Ftrace, error) + 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)