Add profiling_frameptr feature for jemalloc --enable-prof-frameptr#171
Add profiling_frameptr feature for jemalloc --enable-prof-frameptr#171ArniDagur wants to merge 1 commit into
profiling_frameptr feature for jemalloc --enable-prof-frameptr#171Conversation
|
Welcome @ArniDagur! It looks like this is your first PR to tikv/jemallocator 🎉 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds a new Changesprofiling_frameptr feature addition
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Similar to tikv#159, we introduce `profiling_frameptr` to enable frame-pointer based profiling via `--enable-prof-frameptr`. This option was introduced in jemalloc/jemalloc#2712, which was released as a part of `5.3.1`. We make `profiling_frameptr` mutually exclusive with `profiling_libunwind`, since jemalloc configures just a single backtrace method, and we don't want it to silently prefer one over the other. Signed-off-by: Arni Dagur <adg@adg.is>
453356d to
d6f8285
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@jemalloc-sys/build.rs`:
- Around line 321-328: The `profiling_frameptr` branch in `build.rs` currently
gates `--enable-prof-frameptr` only on `target`, so a non-Linux build host can
still pass a flag that jemalloc ignores. Update the `profiling_frameptr`
handling to check `host` (or both `host` and `target`) before calling
`cmd.arg("--enable-prof-frameptr")`, and keep the existing `info!`/panic
behavior aligned with the new host-based gate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6c8e4ae1-7835-4ab2-ad50-850933ec51f2
📒 Files selected for processing (5)
jemalloc-ctl/Cargo.tomljemalloc-sys/Cargo.tomljemalloc-sys/README.mdjemalloc-sys/build.rsjemallocator/Cargo.toml
| // wins over frameptr if both are enabled. We make them mutually exclusive to | ||
| // avoid confusion resulting from configuration priority. | ||
| if profiling_libunwind && profiling_frameptr { | ||
| panic!( |
Similar to #159, we introduce
profiling_frameptrto enable frame-pointer based profiling via--enable-prof-frameptr.This option was introduced in jemalloc/jemalloc#2712, which was released as a part of
5.3.1.We make
profiling_frameptrmutually exclusive withprofiling_libunwind, since jemalloc configures just a single backtrace method, and we don't want it to silently prefer one over the other.Summary by CodeRabbit