Deduplicating symbol data across processes
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
BCC currently stores symbol mappings on a per-process basis. That is, each call to `bcc_symcache_new(pid)` iterates over `/proc/pid/maps`, reading the symbols for each file-backed mapping into a `ProcSyms` structure that isn't shared with other processes. Resolving addresses on several instances of the same process results in reading and storing the same files several times. Any libraries are also read once per process, regardless of whether the library is shared across processes. This duplication can become expensive when the number of symbols in a binary or time taken to read them is large.
We could probably solve this by storing just one set of symbol data per binary, indexed by inode, then link that into each `ProcSyms`. There would probably be some offset details to deal with as the same binary could be mapped into different process' address space with different offsets.
This isn't hugely hi-pri for me but I wanted to record it as an open issue nonetheless.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.