Rollback unboxing from 1f7e90ca#3960
Conversation
This became quite unergonomic with the downcast, but looks like there was a reason for the boxing. Otherwise ShmLimiter references weird addresses. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
morrisonlevi
left a comment
There was a problem hiding this comment.
Looks good to me as long as tests pass, pretty mechanical.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31de2faf28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| match value.product { | ||
| RemoteConfigProduct::LiveDebugger => { | ||
| let val = (data, MaybeShmLimiter::open(limiter_index)); | ||
| let val = Box::new((data, MaybeShmLimiter::open(limiter_index))); |
There was a problem hiding this comment.
Preserve boxed limiter storage on config updates
When a LiveDebugger config path is updated in place, the Occupied branch below installs the new probe after e.insert(val) has replaced and dropped the previous Box. Installed log probes keep the limiter pointer passed from Rust in dd_set_log_probe (tracer/live_debugger.c:753-756) and dereference it on each evaluation, so a normal Add/update for the same config_id can leave the existing hook pointing at freed boxed storage until it is removed. Please update the existing box in place or remove the old hook before swapping the allocation.
Useful? React with 👍 / 👎.
|
Benchmarks [ tracer ]Benchmark execution time: 2026-06-05 22:21:55 Comparing candidate commit 31de2fa in PR branch Found 3 performance improvements and 1 performance regressions! Performance is the same for 189 metrics, 1 unstable metrics.
|
This became quite unergonomic with the downcast, but looks like there was a reason for the boxing.
Otherwise ShmLimiter references weird addresses.