symbol

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLinerCreationFailedBefore = errors.New("failed to initialize liner")

Functions

This section is empty.

Types

type Option added in v0.2.0

type Option func(*Symbolizer)

func WithAttemptThreshold added in v0.2.0

func WithAttemptThreshold(t int) Option

func WithCacheItemTTL added in v0.2.0

func WithCacheItemTTL(ttl time.Duration) Option

func WithCacheSize added in v0.2.0

func WithCacheSize(size int) Option

func WithDemangleMode added in v0.2.0

func WithDemangleMode(mode string) Option

type Symbolizer

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

Symbolizer converts the memory addresses, which have been encountered in stack traces, in the ingested profiles, to the corresponding human-readable source code lines.

func NewSymbolizer

func NewSymbolizer(logger log.Logger, opts ...Option) (*Symbolizer, error)

NewSymbolizer creates a new Symbolizer.

By default the cache can hold up to 1000 items with an item TTL 1 minute. The item is a liner that provides access to a single object file to resolve its memory addresses to source code lines.

If a Symbolizer failed to extract source lines, by default it will retry up to 3 times.

The default demangle mode is "simple".

func (*Symbolizer) Close added in v0.2.0

func (s *Symbolizer) Close() error

Close cleans up resources, e.g., the cache.

func (*Symbolizer) Symbolize added in v0.9.0

func (s *Symbolizer) Symbolize(ctx context.Context, m *pb.Mapping, locations []*pb.Location, debugInfoFile string) ([][]profile.LocationLine, error)

Symbolize symbolizes locations for the given mapping and object file path using DwarfLiner if the file contains debug info. Otherwise it attempts to use GoLiner, and falls back to SymtabLiner as a last resort.

Directories

Path Synopsis
Package addr2line converts memory addresses from stack traces back to line information (line number, function and file name).
Package addr2line converts memory addresses from stack traces back to line information (line number, function and file name).

Jump to

Keyboard shortcuts

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