tracepoint

package
v1.1.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayTy

type ArrayTy struct {
	Ty   interface{}
	Size uint
}

func (*ArrayTy) NBytes

func (ty *ArrayTy) NBytes() (int, error)

NBytes returns the number of bytes if an array type TODO: expand for types other than Int as needed

type BoolTy

type BoolTy struct{}

type DmaAddrTy

type DmaAddrTy struct{}

dma_addr_t

type Field

type Field struct {
	Name string
	Type interface{}
}

type FieldFormat

type FieldFormat struct {
	FieldStr string
	Field    *Field
	Offset   uint
	Size     uint
	IsSigned bool
}

FieldFormat describes the format for each of the tracepoint fields

func (*FieldFormat) ParseField

func (tff *FieldFormat) ParseField() error

type Format

type Format struct {
	Name   string
	ID     int
	Fields []FieldFormat
}

Format contains the details for the tracepoint: name, id, and fields

type IntTy

type IntTy struct {
	Base     IntTyBase
	Unsigned bool
}

integer type

func (*IntTy) NBytes

func (ty *IntTy) NBytes() (int, error)

NBytes retruns the number of bytes of an integer type

type IntTyBase

type IntTyBase int
const (
	IntTyChar IntTyBase = iota
	IntTyShort
	IntTyInt
	IntTyLong
	IntTyLongLong
	IntTyInt8
	IntTyInt16
	IntTyInt32
	IntTyInt64
)

type ParseError

type ParseError struct {
	// contains filtered or unexported fields
}

func (*ParseError) Error

func (e *ParseError) Error() string

type PidTy

type PidTy struct{}

pid_t type

type PointerTy

type PointerTy struct {
	Ty    interface{}
	Const bool
}

type SizeTy

type SizeTy struct{}

pid_t type

type Tracepoint

type Tracepoint struct {
	Subsys string
	Event  string
	Format *Format
}

Tracepoint represents the information of a Linux tracepoint

func GetAllTracepoints

func GetAllTracepoints() ([]Tracepoint, error)

GetAllTracepoints iterates the tracepointsPath directory and returns all events found there. The Format field for this events is going to be empty. Callers can call LoadFormat() to fill it.

func (*Tracepoint) LoadFormat

func (gt *Tracepoint) LoadFormat() error

LoadFormat loads the format of a tracepoint from /sys/kernel/debug

type VoidTy

type VoidTy struct{}

void type

Jump to

Keyboard shortcuts

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