Versions in this module Expand all Collapse all v0 v0.1.1 Jul 17, 2023 Changes in this version + type Stat struct — js/wasm, windows/amd64 + Dev uint64 + Ino uint64 v0.1.0 Jul 5, 2023 Changes in this version + type CacheOptions struct — linux/amd64 + BuildIDCacheOptions GCacheOptions + Metrics *Metrics + PidCacheOptions GCacheOptions + SameFileCacheOptions GCacheOptions + type ElfCache struct + BuildIDCache *GCache[elf.BuildID, SymbolNameResolver] + SameFileCache *GCache[Stat, SymbolNameResolver] + func NewElfCache(buildIDCacheOptions GCacheOptions, sameFileCacheOptions GCacheOptions) (*ElfCache, error) + func (e *ElfCache) CacheByBuildID(buildID elf.BuildID, v SymbolNameResolver) + func (e *ElfCache) CacheByStat(s Stat, v SymbolNameResolver) + func (e *ElfCache) Cleanup() + func (e *ElfCache) DebugInfo() ElfCacheDebugInfo + func (e *ElfCache) GetSymbolsByBuildID(buildID elf.BuildID) SymbolNameResolver + func (e *ElfCache) GetSymbolsByStat(s Stat) SymbolNameResolver + func (e *ElfCache) NextRound() + func (e *ElfCache) Update(buildIDCacheOptions GCacheOptions, sameFileCacheOptions GCacheOptions) + type ElfCacheDebugInfo struct + BuildIDCache GCacheDebugInfo[elf.SymTabDebugInfo] + SameFileCache GCacheDebugInfo[elf.SymTabDebugInfo] + type ElfDebugInfo struct + File string + SymbolsCount int + type ElfTable struct + func NewElfTable(logger log.Logger, procMap *ProcMap, fs string, elfFilePath string, ...) *ElfTable + func (et *ElfTable) Cleanup() + func (et *ElfTable) DebugInfo() elf2.SymTabDebugInfo + func (et *ElfTable) Resolve(pc uint64) string + type ElfTableOptions struct + ElfCache *ElfCache + Metrics *Metrics + type GCache struct + func NewGCache(options GCacheOptions) (*GCache[K, V], error) + func (g *GCache[K, V]) Cache(k K, v V) + func (g *GCache[K, V]) Cleanup() + func (g *GCache[K, V]) Each(f func(k K, v V)) + func (g *GCache[K, V]) EachLRU(f func(k K, v V)) + func (g *GCache[K, V]) EachRound(f func(k K, v V)) + func (g *GCache[K, V]) Get(k K) V + func (g *GCache[K, V]) LRUSize() int + func (g *GCache[K, V]) NextRound() + func (g *GCache[K, V]) Remove(k K) + func (g *GCache[K, V]) RoundSize() int + func (g *GCache[K, V]) Update(options GCacheOptions) + type GCacheDebugInfo struct + LRU []T + LRUSize int + Round []T + RoundSize int + func DebugInfo(g *GCache[K, V], ff func(K, V) D) GCacheDebugInfo[D] + type GCacheOptions struct + KeepRounds int + Size int + type Metrics struct + ElfErrors *prometheus.CounterVec + KnownSymbols *prometheus.CounterVec + ProcErrors *prometheus.CounterVec + UnknownModules *prometheus.CounterVec + UnknownStacks *prometheus.CounterVec + UnknownSymbols *prometheus.CounterVec + func NewMetrics(reg prometheus.Registerer) *Metrics + type PidKey uint32 — linux/amd64 + type ProcMap struct + Dev uint64 + EndAddr uint64 + Inode uint64 + Offset int64 + Pathname string + Perms *ProcMapPermissions + StartAddr uint64 + type ProcMapPermissions struct + Execute bool + Private bool + Read bool + Shared bool + Write bool + type ProcTable struct + func NewProcTable(logger log.Logger, options ProcTableOptions) *ProcTable + func (p *ProcTable) Cleanup() + func (p *ProcTable) DebugInfo() ProcTableDebugInfo + func (p *ProcTable) Refresh() + func (p *ProcTable) Resolve(pc uint64) Symbol + type ProcTableDebugInfo struct + ElfTables map[string]elf.SymTabDebugInfo + Pid int + Size int + type ProcTableOptions struct + Pid int + type Resource interface + Cleanup func() + Refresh func() + type Stat struct — darwin/amd64, linux/amd64 + Dev uint64 + Inode uint64 + type Sym struct + Name string + Start uint64 + type SymTab struct + Symbols []Sym + func NewSymTab(symbols []Sym) *SymTab + func (t *SymTab) Length() int + func (t *SymTab) Rebase(base uint64) + func (t *SymTab) Resolve(addr uint64) *Sym + type Symbol struct + Module string + Name string + Start uint64 + type SymbolCache struct — linux/amd64 + func NewSymbolCache(logger log.Logger, options CacheOptions) (*SymbolCache, error) + func (sc *SymbolCache) Cleanup() + func (sc *SymbolCache) ElfCacheDebugInfo() ElfCacheDebugInfo + func (sc *SymbolCache) NextRound() + func (sc *SymbolCache) PidCacheDebugInfo() GCacheDebugInfo[ProcTableDebugInfo] + func (sc *SymbolCache) Resolve(pid uint32, addr uint64) Symbol + func (sc *SymbolCache) UpdateOptions(options CacheOptions) + type SymbolNameResolver interface + Cleanup func() + DebugInfo func() elf.SymTabDebugInfo + IsDead func() bool + Refresh func() + Resolve func(addr uint64) string + type SymbolTab struct + func NewKallsyms(kallsyms []byte) (*SymbolTab, error) + func NewSymbolTab(symbols []Symbol) *SymbolTab + func (t *SymbolTab) Cleanup() + func (t *SymbolTab) DebugString() string + func (t *SymbolTab) Rebase(base uint64) + func (t *SymbolTab) Refresh() + func (t *SymbolTab) Resolve(addr uint64) Symbol + type SymbolTable interface + Cleanup func() + Refresh func() + Resolve func(addr uint64) Symbol