nativeunwind

package
v0.0.0-...-494f1b8 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntervalCache

type IntervalCache interface {
	// HasIntervals returns true if interval data exists in the cache for a file with the provided
	// ID, or false otherwise.
	HasIntervals(exeID host.FileID) bool
	// GetIntervalData loads the interval data from the cache that is associated with `exeID`
	// into `interval`.
	GetIntervalData(exeID host.FileID, interval *stackdeltatypes.IntervalData) error
	// SaveIntervalData stores the provided `interval` that is associated with `exeID`
	// in the cache.
	SaveIntervalData(exeID host.FileID, interval *stackdeltatypes.IntervalData) error
	// GetCurrentCacheSize returns the current size of the cache in bytes. Or an error
	// otherwise.
	GetCurrentCacheSize() (uint64, error)
	// GetAndResetHitMissCounters returns the current hit and miss counters of the cache
	// and resets them to 0.
	GetAndResetHitMissCounters() (hit, miss uint64)
}

IntervalCache defines an interface that allows one to save and load interval data for use in the unwinding of native stacks. It should be implemented by types that want to provide caching to `GetIntervalStructures`.

type StackDeltaProvider

type StackDeltaProvider interface {
	// GetIntervalStructuresForFile inspects a single executable and extracts data that is needed
	// to rebuild the stack for traces of this executable.
	GetIntervalStructuresForFile(fileID host.FileID, elfRef *pfelf.Reference,
		interval *sdtypes.IntervalData) error

	// GetAndResetStatistics returns the internal statistics for this provider and resets all
	// values to 0.
	GetAndResetStatistics() Statistics
}

StackDeltaProvider defines an interface for types that provide access to the stack deltas from executables.

type Statistics

type Statistics struct {
	// Number of times for a hit of a cache entry.
	Hit uint64
	// Number of times for a miss of a cache entry.
	Miss uint64

	// Number of times extracting stack deltas failed.
	ExtractionErrors uint64
}

Directories

Path Synopsis
Package stackdeltatypes provides types used to represent stack delta information as constructed by `nativeunwind.GetIntervalStructures` This information is a post-processed form of the stack delta information that is used in all relevant packages.
Package stackdeltatypes provides types used to represent stack delta information as constructed by `nativeunwind.GetIntervalStructures` This information is a post-processed form of the stack delta information that is used in all relevant packages.

Jump to

Keyboard shortcuts

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