rust-lang / rust-lang/backtrace-rs

Make MAPPINGS_CACHE_SIZE configurable

Open
#499 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
628
Forks
291
PR merge metrics
No merged PRs in 30d

Description

The MAPPINGS_CACHE_SIZE is 4 by hard coding.
Can we make it configurable? In some scenarios, the lib mappings cache miss will cause performance degrade, especially in the scenario that the debug sections are compressed. For example: https://github.com/pingcap/tiflash/issues/6347#issuecomment-1333038382
Some users may want to increase MAPPINGS_CACHE_SIZE to trade memory for performance improvement.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/symbolize/gimli.rs at MAPPINGS_CACHE_SIZE and inspect how the mappings cache is created and used. Determine the configuration surface that fits this library, then verify that users can increase the cache size and that the resulting behavior addresses cache misses for compressed debug sections.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.