Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Location ¶
type Location struct { // Function from where the call was done. Function string // File where the function is. File string // Stack is a call stack that stops at function. Using "/" to separate functions. Stack string }
Location identifies a place in the code. It is used to aggregate data. It does not have the uint64 address or the file line because this would lead to high cardinality and, for instance, different points of the same function would be counted in different entries. OTOH the stack trace is considered a key field, to know where the call comes from.
type NilObjFileError ¶
type NilObjFileError struct{}
NilObjFileError when obj file is not initialized.
type NoFrame0Error ¶
type NoFrame0Error struct{}
NoFrame0Error when there's not even one frame in sample.
type ObjFile ¶
type ObjFile struct {
// contains filtered or unexported fields
}
ObjFile is an object file representation, used to resolve addresses.
func New ¶
New returns a global object allowing to resolve addresses to locations. This is a slingleton, and reports data only for self, the current program identified by os.Args[0]. When testing, go test tools do not embed symbols by default, you need to explicitly use `go test -o filename` else this will fail and not be able to get the info.
type Resolver ¶
type Resolver interface { // Name of the resolver. Typically, binary file name. Name() string // Resolve some addresses to a location. // The contains string is used to find the leaf on which to aggregate data. // The addrs should be ordered with the leaf in first positions, and callers after. Resolve(contains string, addrs []uint64) (*Location, error) }
Resolver resolves addresses to locations.