A cache of symbolized frames, keyed by instruction address.
Synopsis
Declared in <folly/debugging/symbolizer/SymbolCache.h>
class SymbolCacheBase;
Description
Symbolizing an address costs tens of microseconds, a linear scan of an ELF symbol table plus a DWARF lookup, so a hit is worth orders of magnitude more than whatever the lookup costs. Implementations should optimize for hit rate and for scaling across threads, not for the cost of a single operation.
The cache is a pure optimization: dropping a lookup or an insertion is always safe.
Entries are keyed by address alone, so a cache may only be shared between symbolizers using the same LocationInfoMode, since a DISABLED entry carries no file and line information where a FAST one does, and using the same ElfCacheBase, since a cached frame holds a shared_ptr to the ElfFile it was resolved from and its name points into that file's mapped string table.
Implementations are thread‐safe.
Member Functions
Name |
Description |
|
Virtual destructor. |
|
Copies the frames cached for |
|
Best effort: the entry may be dropped or evicted at any point. |
Non-Member Functions
Name |
Description |
The process‐wide cache for |
|
A cache of roughly |
|
An LRU cache of |
|
A cache that stores nothing. |
Created with MrDocs