Skip to content

feat(profiling): replace weight with per-allocation unbiased byte … - #2344

Draft
scottgerring wants to merge 2 commits into
mainfrom
sgg/unbias-weight
Draft

feat(profiling): replace weight with per-allocation unbiased byte …#2344
scottgerring wants to merge 2 commits into
mainfrom
sgg/unbias-weight

Conversation

@scottgerring

@scottgerring scottgerring commented Aug 12, 2026

Copy link
Copy Markdown
Member

What

Redefines weight in the ddheap:alloc USDT from nsamples * sampling_interval to a proper per-allocation unbiased byte estimator. Matches proposed changes to design.

Why

nsamples * sampling_interval is a coarse measure that counts how many sampling-interval boundaries an allocation crosses, then multiplies by the interval. This has two problems:

  1. Excessive variance for large allocations. A 4 MiB allocation with a 512 KiB interval might cross 7 or 9 boundaries depending on where the random sampling points fall, producing a weight of 3.5-4.5 MiB instead of
    consistently ~4 MiB. The allocation is virtually certain to be sampled, so its weight should be close to its actual size.
  2. Size-bias distortion. Downstream consumers that count alloc_objects = 1 per emitted event systematically overstate large-allocation stacks relative to small ones, since large allocations are more likely to be sampled.

The new weight enables consumers to derive both unbiased byte totals (alloc_space = weight) and unbiased object counts (alloc_objects = weight / size) from a single value.

This brings the sampler in line with [jemalloc's approach to correcting sampling bias https://github.com/jemalloc/jemalloc/blob/dev/doc_internal/PROFILING_INTERNALS.md), which the design already references as the model for the in-process sampler.

Changes

  • weight semantics: now the unbiased estimate of allocated bytes represented by this sampled allocation, computed from its inclusion probability under Poisson sampling: p = 1 - exp(-size / interval), weight = size / p.
    Uses expm1 for numerical stability.
  • sample() return type: changed from uint64_t (nsamples * interval) to bool (was this allocation sampled?). The nsamples counter is removed; the sampling loop now only advances remaining_bytes state.
  • Weight calculation on slow path only: allocation_weight() is called after the sampling decision, so no floating-point work is added to the unsampled fast path.
  • Zero-size allocations: treated as unsampled (weight = 0) to preserve the weight == 0 means "not sampled" invariant and avoid leaving the reentry guard open.
  • Documentation: all references to nsamples * interval updated across headers, comments, and README.
  • Tests: focused deterministic tests for weight at small/interval/large sizes, monotonic convergence, edge cases, and a statistical regression test verifying sum(weights) ≈ total_allocated.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check Results

⚠️ 106 documentation warning(s) found

📦 libdd-profiling-heap-gotter - 56 warning(s)

📦 libdd-profiling-heap-sampler - 50 warning(s)


Updated: 2026-08-20 09:16:16 UTC | Commit: 084fa22 | missing-docs job results

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🔒 Cargo Deny Results

No issues found!

📦 libdd-profiling-heap-gotter - ✅ No issues

📦 libdd-profiling-heap-sampler - ✅ No issues


Updated: 2026-08-20 09:18:10 UTC | Commit: 084fa22 | dependency-check job results

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 12, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

🚦 2 Pipeline jobs failed

semver-check | validate — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitHub Actions

Semver validation failed due to major changes in 'libdd-profiling-heap-sampler' without a breaking change marker in PR title or footer.

Required checks pass | allchecks

View in Datadog · View in GitHub Actions

Some checks have failed or timed out. Please check the workflow run summary for details.

📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: sgg/unbias-weight

semver-check | validate
Commit: 084fa22f1cf5ae4f6600914ace5d1b6b1858be56
Error (code / build):
Semver validation failed due to major changes in 'libdd-profiling-heap-sampler' without a breaking change marker in PR title or footer.
CI job: https://github.com/DataDog/libdatadog/actions/runs/32352864168/job/96376541728

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 97.17%
Overall Coverage: 76.49% (+0.01%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 01fa452 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Aug 12, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-08-20 09:29:58

Comparing candidate commit 01fa452 in PR branch sgg/unbias-weight with baseline commit 1765c7c in branch main.

Found 4 performance improvements and 11 performance regressions! Performance is the same for 15 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:alloc_free/system/16

  • 🟩 execution_time [-1.430ns; -1.380ns] or [-9.136%; -8.819%]

scenario:alloc_free/system/256

  • 🟩 execution_time [-1.444ns; -1.397ns] or [-9.209%; -8.910%]

scenario:alloc_free/system/4096

  • 🟥 execution_time [+13.187ns; +13.328ns] or [+16.518%; +16.695%]

scenario:alloc_free/system/64

  • 🟩 execution_time [-1.354ns; -1.305ns] or [-8.630%; -8.319%]

scenario:profiler_attached/fast_path_system/256

  • 🟩 execution_time [-1.222ns; -1.145ns] or [-4.277%; -4.007%]

scenario:profiler_attached/slow_path_noop/16

  • 🟥 execution_time [+13.862ns; +13.906ns] or [+21.800%; +21.870%]

scenario:profiler_attached/slow_path_noop/256

  • 🟥 execution_time [+14.415ns; +14.584ns] or [+22.801%; +23.067%]

scenario:profiler_attached/slow_path_noop/4096

  • 🟥 execution_time [+13.810ns; +13.845ns] or [+21.584%; +21.638%]

scenario:profiler_attached/slow_path_noop/64

  • 🟥 execution_time [+13.854ns; +13.879ns] or [+21.783%; +21.822%]

scenario:profiler_attached/slow_path_noop/65536

  • 🟥 execution_time [+13.756ns; +13.803ns] or [+20.193%; +20.262%]

scenario:profiler_attached/slow_path_system/16

  • 🟥 execution_time [+12.288ns; +12.378ns] or [+13.832%; +13.933%]

scenario:profiler_attached/slow_path_system/256

  • 🟥 execution_time [+12.293ns; +12.394ns] or [+13.828%; +13.942%]

scenario:profiler_attached/slow_path_system/4096

  • 🟥 execution_time [+18.810ns; +18.915ns] or [+12.628%; +12.698%]

scenario:profiler_attached/slow_path_system/64

  • 🟥 execution_time [+12.408ns; +12.517ns] or [+13.966%; +14.089%]

scenario:profiler_attached/slow_path_system/65536

  • 🟥 execution_time [+12.674ns; +12.776ns] or [+8.056%; +8.120%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
alloc_free/system/16 execution_time 14.003ns 14.247ns ± 0.121ns 14.236ns ± 0.077ns 14.313ns 14.460ns 14.698ns 14.834ns 4.20% 1.227 3.352 0.85% 0.009ns 1 200
alloc_free/system/256 execution_time 14.002ns 14.262ns ± 0.111ns 14.260ns ± 0.063ns 14.321ns 14.441ns 14.629ns 14.739ns 3.36% 0.836 2.284 0.78% 0.008ns 1 200
alloc_free/system/4096 execution_time 91.277ns 93.091ns ± 0.491ns 93.122ns ± 0.259ns 93.377ns 93.833ns 94.326ns 94.571ns 1.56% -0.363 1.441 0.53% 0.035ns 1 200
alloc_free/system/64 execution_time 14.107ns 14.359ns ± 0.116ns 14.342ns ± 0.066ns 14.418ns 14.554ns 14.740ns 14.829ns 3.40% 0.839 1.464 0.80% 0.008ns 1 200
alloc_free/system/65536 execution_time 87.480ns 88.356ns ± 0.257ns 88.353ns ± 0.114ns 88.471ns 88.680ns 88.812ns 90.490ns 2.42% 2.375 23.431 0.29% 0.018ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
alloc_free/system/16 execution_time [14.230ns; 14.264ns] or [-0.118%; +0.118%] None None None
alloc_free/system/256 execution_time [14.246ns; 14.277ns] or [-0.108%; +0.108%] None None None
alloc_free/system/4096 execution_time [93.023ns; 93.159ns] or [-0.073%; +0.073%] None None None
alloc_free/system/64 execution_time [14.343ns; 14.376ns] or [-0.112%; +0.112%] None None None
alloc_free/system/65536 execution_time [88.321ns; 88.392ns] or [-0.040%; +0.040%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/slow_path_noop/16 execution_time 77.031ns 77.469ns ± 0.125ns 77.453ns ± 0.035ns 77.497ns 77.571ns 77.828ns 78.795ns 1.73% 6.201 63.672 0.16% 0.009ns 1 200
profiler_attached/slow_path_noop/256 execution_time 76.976ns 77.724ns ± 0.605ns 77.487ns ± 0.042ns 77.541ns 79.202ns 79.257ns 79.281ns 2.32% 1.983 2.093 0.78% 0.043ns 1 200
profiler_attached/slow_path_noop/4096 execution_time 77.336ns 77.810ns ± 0.108ns 77.810ns ± 0.028ns 77.834ns 77.906ns 77.985ns 78.942ns 1.45% 5.043 61.347 0.14% 0.008ns 1 200
profiler_attached/slow_path_noop/64 execution_time 77.130ns 77.464ns ± 0.072ns 77.453ns ± 0.025ns 77.486ns 77.571ns 77.656ns 77.937ns 0.62% 1.094 12.239 0.09% 0.005ns 1 200
profiler_attached/slow_path_noop/65536 execution_time 81.300ns 81.903ns ± 0.133ns 81.888ns ± 0.038ns 81.928ns 82.049ns 82.283ns 83.035ns 1.40% 4.233 35.568 0.16% 0.009ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/slow_path_noop/16 execution_time [77.452ns; 77.486ns] or [-0.022%; +0.022%] None None None
profiler_attached/slow_path_noop/256 execution_time [77.640ns; 77.807ns] or [-0.108%; +0.108%] None None None
profiler_attached/slow_path_noop/4096 execution_time [77.795ns; 77.825ns] or [-0.019%; +0.019%] None None None
profiler_attached/slow_path_noop/64 execution_time [77.454ns; 77.474ns] or [-0.013%; +0.013%] None None None
profiler_attached/slow_path_noop/65536 execution_time [81.884ns; 81.921ns] or [-0.023%; +0.023%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
no_profiler/short_circuit/16 execution_time 25.923ns 26.581ns ± 0.187ns 26.558ns ± 0.081ns 26.649ns 26.885ns 27.186ns 27.753ns 4.50% 1.609 8.533 0.70% 0.013ns 1 200
no_profiler/short_circuit/256 execution_time 25.901ns 26.510ns ± 0.164ns 26.505ns ± 0.097ns 26.612ns 26.775ns 26.870ns 26.953ns 1.69% -0.334 1.133 0.62% 0.012ns 1 200
no_profiler/short_circuit/4096 execution_time 101.151ns 102.757ns ± 0.416ns 102.769ns ± 0.221ns 102.990ns 103.346ns 103.803ns 104.365ns 1.55% -0.224 2.353 0.40% 0.029ns 1 200
no_profiler/short_circuit/64 execution_time 26.046ns 26.538ns ± 0.189ns 26.521ns ± 0.112ns 26.634ns 26.823ns 27.096ns 27.750ns 4.64% 1.587 8.142 0.71% 0.013ns 1 200
no_profiler/short_circuit/65536 execution_time 99.185ns 100.275ns ± 0.307ns 100.282ns ± 0.147ns 100.425ns 100.686ns 101.005ns 101.937ns 1.65% 0.486 4.735 0.31% 0.022ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
no_profiler/short_circuit/16 execution_time [26.555ns; 26.607ns] or [-0.098%; +0.098%] None None None
no_profiler/short_circuit/256 execution_time [26.488ns; 26.533ns] or [-0.086%; +0.086%] None None None
no_profiler/short_circuit/4096 execution_time [102.699ns; 102.815ns] or [-0.056%; +0.056%] None None None
no_profiler/short_circuit/64 execution_time [26.512ns; 26.564ns] or [-0.099%; +0.099%] None None None
no_profiler/short_circuit/65536 execution_time [100.233ns; 100.318ns] or [-0.042%; +0.042%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/fast_path_noop/16 execution_time 14.404ns 14.486ns ± 0.016ns 14.484ns ± 0.006ns 14.491ns 14.509ns 14.535ns 14.565ns 0.56% 0.535 8.014 0.11% 0.001ns 1 200
profiler_attached/fast_path_noop/256 execution_time 14.401ns 14.486ns ± 0.021ns 14.485ns ± 0.006ns 14.491ns 14.503ns 14.524ns 14.730ns 1.69% 7.137 82.891 0.15% 0.002ns 1 200
profiler_attached/fast_path_noop/4096 execution_time 14.405ns 14.483ns ± 0.017ns 14.483ns ± 0.006ns 14.489ns 14.502ns 14.548ns 14.578ns 0.65% 0.965 10.859 0.11% 0.001ns 1 200
profiler_attached/fast_path_noop/64 execution_time 14.401ns 14.485ns ± 0.023ns 14.484ns ± 0.006ns 14.491ns 14.503ns 14.521ns 14.731ns 1.70% 5.961 68.125 0.16% 0.002ns 1 200
profiler_attached/fast_path_noop/65536 execution_time 14.401ns 14.484ns ± 0.018ns 14.484ns ± 0.006ns 14.491ns 14.502ns 14.522ns 14.655ns 1.18% 3.148 39.254 0.13% 0.001ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/fast_path_noop/16 execution_time [14.483ns; 14.488ns] or [-0.015%; +0.015%] None None None
profiler_attached/fast_path_noop/256 execution_time [14.483ns; 14.489ns] or [-0.021%; +0.021%] None None None
profiler_attached/fast_path_noop/4096 execution_time [14.481ns; 14.485ns] or [-0.016%; +0.016%] None None None
profiler_attached/fast_path_noop/64 execution_time [14.482ns; 14.488ns] or [-0.022%; +0.022%] None None None
profiler_attached/fast_path_noop/65536 execution_time [14.482ns; 14.487ns] or [-0.018%; +0.018%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/fast_path_system/16 execution_time 27.034ns 27.413ns ± 0.109ns 27.405ns ± 0.052ns 27.457ns 27.562ns 27.802ns 27.847ns 1.61% 0.758 3.586 0.40% 0.008ns 1 200
profiler_attached/fast_path_system/256 execution_time 27.043ns 27.395ns ± 0.115ns 27.384ns ± 0.052ns 27.442ns 27.542ns 27.805ns 28.141ns 2.76% 1.781 9.884 0.42% 0.008ns 1 200
profiler_attached/fast_path_system/4096 execution_time 99.719ns 101.216ns ± 0.396ns 101.185ns ± 0.230ns 101.422ns 101.896ns 102.370ns 102.978ns 1.77% 0.606 2.456 0.39% 0.028ns 1 200
profiler_attached/fast_path_system/64 execution_time 26.858ns 27.403ns ± 0.112ns 27.396ns ± 0.049ns 27.454ns 27.612ns 27.704ns 27.805ns 1.49% -0.075 3.982 0.41% 0.008ns 1 200
profiler_attached/fast_path_system/65536 execution_time 100.129ns 101.694ns ± 0.343ns 101.681ns ± 0.163ns 101.848ns 102.119ns 102.599ns 103.854ns 2.14% 1.261 10.491 0.34% 0.024ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/fast_path_system/16 execution_time [27.398ns; 27.428ns] or [-0.055%; +0.055%] None None None
profiler_attached/fast_path_system/256 execution_time [27.379ns; 27.411ns] or [-0.058%; +0.058%] None None None
profiler_attached/fast_path_system/4096 execution_time [101.161ns; 101.270ns] or [-0.054%; +0.054%] None None None
profiler_attached/fast_path_system/64 execution_time [27.387ns; 27.418ns] or [-0.057%; +0.057%] None None None
profiler_attached/fast_path_system/65536 execution_time [101.647ns; 101.742ns] or [-0.047%; +0.047%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 01fa452 1787217263 sgg/unbias-weight
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/slow_path_system/16 execution_time 100.633ns 101.171ns ± 0.137ns 101.154ns ± 0.042ns 101.202ns 101.299ns 101.650ns 102.166ns 1.00% 3.655 25.159 0.14% 0.010ns 1 200
profiler_attached/slow_path_system/256 execution_time 100.355ns 101.243ns ± 0.133ns 101.237ns ± 0.039ns 101.276ns 101.451ns 101.698ns 101.926ns 0.68% -0.402 14.575 0.13% 0.009ns 1 200
profiler_attached/slow_path_system/4096 execution_time 166.833ns 167.817ns ± 0.306ns 167.803ns ± 0.130ns 167.935ns 168.249ns 168.759ns 169.782ns 1.18% 1.419 9.453 0.18% 0.022ns 1 200
profiler_attached/slow_path_system/64 execution_time 100.874ns 101.306ns ± 0.111ns 101.299ns ± 0.042ns 101.343ns 101.441ns 101.717ns 101.847ns 0.54% 1.016 7.630 0.11% 0.008ns 1 200
profiler_attached/slow_path_system/65536 execution_time 168.896ns 170.061ns ± 0.305ns 170.077ns ± 0.142ns 170.186ns 170.396ns 170.616ns 172.795ns 1.60% 3.220 31.512 0.18% 0.022ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/slow_path_system/16 execution_time [101.152ns; 101.191ns] or [-0.019%; +0.019%] None None None
profiler_attached/slow_path_system/256 execution_time [101.225ns; 101.261ns] or [-0.018%; +0.018%] None None None
profiler_attached/slow_path_system/4096 execution_time [167.775ns; 167.860ns] or [-0.025%; +0.025%] None None None
profiler_attached/slow_path_system/64 execution_time [101.291ns; 101.321ns] or [-0.015%; +0.015%] None None None
profiler_attached/slow_path_system/65536 execution_time [170.019ns; 170.103ns] or [-0.025%; +0.025%] None None None

Baseline

Baseline benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
alloc_free/system/16 execution_time 15.203ns 15.652ns ± 0.131ns 15.641ns ± 0.061ns 15.707ns 15.890ns 16.006ns 16.331ns 4.42% 0.782 4.153 0.84% 0.009ns 1 200
alloc_free/system/256 execution_time 15.201ns 15.682ns ± 0.127ns 15.693ns ± 0.062ns 15.750ns 15.859ns 16.063ns 16.208ns 3.28% -0.153 3.430 0.81% 0.009ns 1 200
alloc_free/system/4096 execution_time 79.409ns 79.833ns ± 0.137ns 79.809ns ± 0.054ns 79.869ns 80.003ns 80.375ns 80.942ns 1.42% 3.490 23.537 0.17% 0.010ns 1 200
alloc_free/system/64 execution_time 15.201ns 15.689ns ± 0.133ns 15.679ns ± 0.060ns 15.752ns 15.876ns 16.100ns 16.365ns 4.38% 0.430 5.292 0.84% 0.009ns 1 200
alloc_free/system/65536 execution_time 87.820ns 88.831ns ± 0.241ns 88.837ns ± 0.128ns 88.972ns 89.176ns 89.373ns 89.557ns 0.81% -0.705 2.875 0.27% 0.017ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
alloc_free/system/16 execution_time [15.634ns; 15.670ns] or [-0.116%; +0.116%] None None None
alloc_free/system/256 execution_time [15.665ns; 15.700ns] or [-0.113%; +0.113%] None None None
alloc_free/system/4096 execution_time [79.814ns; 79.852ns] or [-0.024%; +0.024%] None None None
alloc_free/system/64 execution_time [15.671ns; 15.707ns] or [-0.117%; +0.117%] None None None
alloc_free/system/65536 execution_time [88.798ns; 88.865ns] or [-0.038%; +0.038%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/slow_path_noop/16 execution_time 63.107ns 63.585ns ± 0.098ns 63.577ns ± 0.030ns 63.612ns 63.660ns 63.979ns 64.438ns 1.35% 3.853 35.034 0.15% 0.007ns 1 200
profiler_attached/slow_path_noop/256 execution_time 62.925ns 63.224ns ± 0.055ns 63.222ns ± 0.027ns 63.248ns 63.316ns 63.411ns 63.449ns 0.36% 0.083 6.055 0.09% 0.004ns 1 200
profiler_attached/slow_path_noop/4096 execution_time 63.709ns 63.983ns ± 0.064ns 63.978ns ± 0.027ns 64.007ns 64.063ns 64.169ns 64.397ns 0.65% 1.302 11.100 0.10% 0.005ns 1 200
profiler_attached/slow_path_noop/64 execution_time 63.331ns 63.598ns ± 0.055ns 63.595ns ± 0.025ns 63.621ns 63.676ns 63.759ns 63.815ns 0.35% -0.215 6.256 0.09% 0.004ns 1 200
profiler_attached/slow_path_noop/65536 execution_time 67.401ns 68.123ns ± 0.105ns 68.125ns ± 0.037ns 68.159ns 68.221ns 68.395ns 68.824ns 1.03% 0.081 20.985 0.15% 0.007ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/slow_path_noop/16 execution_time [63.572ns; 63.599ns] or [-0.021%; +0.021%] None None None
profiler_attached/slow_path_noop/256 execution_time [63.216ns; 63.232ns] or [-0.012%; +0.012%] None None None
profiler_attached/slow_path_noop/4096 execution_time [63.974ns; 63.992ns] or [-0.014%; +0.014%] None None None
profiler_attached/slow_path_noop/64 execution_time [63.591ns; 63.606ns] or [-0.012%; +0.012%] None None None
profiler_attached/slow_path_noop/65536 execution_time [68.109ns; 68.138ns] or [-0.021%; +0.021%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
no_profiler/short_circuit/16 execution_time 25.173ns 27.556ns ± 0.377ns 27.597ns ± 0.166ns 27.751ns 28.045ns 28.264ns 28.620ns 3.71% -2.642 15.062 1.36% 0.027ns 1 200
no_profiler/short_circuit/256 execution_time 26.668ns 27.546ns ± 0.280ns 27.581ns ± 0.146ns 27.687ns 27.925ns 28.087ns 28.923ns 4.87% 0.425 4.111 1.01% 0.020ns 1 200
no_profiler/short_circuit/4096 execution_time 100.187ns 103.870ns ± 0.528ns 103.905ns ± 0.200ns 104.111ns 104.450ns 104.899ns 105.358ns 1.40% -2.869 15.870 0.51% 0.037ns 1 200
no_profiler/short_circuit/64 execution_time 26.289ns 27.537ns ± 0.275ns 27.548ns ± 0.139ns 27.689ns 27.913ns 28.111ns 28.224ns 2.45% -1.132 3.796 0.99% 0.019ns 1 200
no_profiler/short_circuit/65536 execution_time 99.907ns 101.434ns ± 0.397ns 101.463ns ± 0.201ns 101.655ns 101.911ns 102.490ns 103.057ns 1.57% -0.253 2.821 0.39% 0.028ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
no_profiler/short_circuit/16 execution_time [27.503ns; 27.608ns] or [-0.190%; +0.190%] None None None
no_profiler/short_circuit/256 execution_time [27.507ns; 27.584ns] or [-0.141%; +0.141%] None None None
no_profiler/short_circuit/4096 execution_time [103.797ns; 103.943ns] or [-0.070%; +0.070%] None None None
no_profiler/short_circuit/64 execution_time [27.499ns; 27.575ns] or [-0.138%; +0.138%] None None None
no_profiler/short_circuit/65536 execution_time [101.379ns; 101.489ns] or [-0.054%; +0.054%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/fast_path_noop/16 execution_time 14.400ns 14.473ns ± 0.024ns 14.471ns ± 0.005ns 14.475ns 14.492ns 14.555ns 14.725ns 1.76% 6.462 64.572 0.16% 0.002ns 1 200
profiler_attached/fast_path_noop/256 execution_time 14.401ns 14.472ns ± 0.013ns 14.472ns ± 0.006ns 14.479ns 14.489ns 14.500ns 14.509ns 0.26% -1.323 8.105 0.09% 0.001ns 1 200
profiler_attached/fast_path_noop/4096 execution_time 14.402ns 14.475ns ± 0.042ns 14.471ns ± 0.006ns 14.478ns 14.490ns 14.508ns 15.045ns 3.97% 12.428 165.894 0.29% 0.003ns 1 200
profiler_attached/fast_path_noop/64 execution_time 14.404ns 14.471ns ± 0.012ns 14.470ns ± 0.005ns 14.475ns 14.484ns 14.514ns 14.533ns 0.43% 0.917 11.776 0.08% 0.001ns 1 200
profiler_attached/fast_path_noop/65536 execution_time 14.401ns 14.472ns ± 0.017ns 14.471ns ± 0.005ns 14.476ns 14.490ns 14.539ns 14.592ns 0.84% 2.226 17.243 0.12% 0.001ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/fast_path_noop/16 execution_time [14.470ns; 14.476ns] or [-0.023%; +0.023%] None None None
profiler_attached/fast_path_noop/256 execution_time [14.470ns; 14.474ns] or [-0.012%; +0.012%] None None None
profiler_attached/fast_path_noop/4096 execution_time [14.469ns; 14.480ns] or [-0.040%; +0.040%] None None None
profiler_attached/fast_path_noop/64 execution_time [14.469ns; 14.473ns] or [-0.011%; +0.011%] None None None
profiler_attached/fast_path_noop/65536 execution_time [14.470ns; 14.474ns] or [-0.016%; +0.016%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/fast_path_system/16 execution_time 26.013ns 28.573ns ± 0.468ns 28.616ns ± 0.216ns 28.826ns 29.120ns 29.320ns 29.959ns 4.70% -2.210 9.999 1.63% 0.033ns 1 200
profiler_attached/fast_path_system/256 execution_time 27.722ns 28.578ns ± 0.253ns 28.594ns ± 0.159ns 28.739ns 28.958ns 29.140ns 29.406ns 2.84% -0.271 0.712 0.88% 0.018ns 1 200
profiler_attached/fast_path_system/4096 execution_time 100.545ns 101.313ns ± 0.410ns 101.233ns ± 0.193ns 101.464ns 101.932ns 102.959ns 104.026ns 2.76% 2.793 13.794 0.40% 0.029ns 1 200
profiler_attached/fast_path_system/64 execution_time 26.412ns 28.573ns ± 0.359ns 28.592ns ± 0.182ns 28.785ns 29.083ns 29.331ns 29.503ns 3.19% -1.311 6.308 1.25% 0.025ns 1 200
profiler_attached/fast_path_system/65536 execution_time 98.268ns 101.750ns ± 0.494ns 101.801ns ± 0.207ns 101.988ns 102.413ns 102.820ns 102.942ns 1.12% -2.560 14.954 0.48% 0.035ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/fast_path_system/16 execution_time [28.508ns; 28.638ns] or [-0.227%; +0.227%] None None None
profiler_attached/fast_path_system/256 execution_time [28.543ns; 28.613ns] or [-0.123%; +0.123%] None None None
profiler_attached/fast_path_system/4096 execution_time [101.256ns; 101.370ns] or [-0.056%; +0.056%] None None None
profiler_attached/fast_path_system/64 execution_time [28.524ns; 28.623ns] or [-0.174%; +0.174%] None None None
profiler_attached/fast_path_system/65536 execution_time [101.681ns; 101.818ns] or [-0.067%; +0.067%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1765c7c 1787160004 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiler_attached/slow_path_system/16 execution_time 87.216ns 88.839ns ± 0.293ns 88.862ns ± 0.128ns 88.993ns 89.192ns 89.403ns 89.753ns 1.00% -2.065 10.148 0.33% 0.021ns 1 200
profiler_attached/slow_path_system/256 execution_time 87.507ns 88.899ns ± 0.340ns 88.899ns ± 0.187ns 89.085ns 89.505ns 89.660ns 89.783ns 0.99% -0.409 1.711 0.38% 0.024ns 1 200
profiler_attached/slow_path_system/4096 execution_time 148.269ns 148.955ns ± 0.222ns 148.944ns ± 0.109ns 149.053ns 149.351ns 149.649ns 149.801ns 0.57% 0.592 2.785 0.15% 0.016ns 1 200
profiler_attached/slow_path_system/64 execution_time 87.040ns 88.844ns ± 0.377ns 88.885ns ± 0.178ns 89.057ns 89.338ns 89.638ns 89.817ns 1.05% -1.459 5.309 0.42% 0.027ns 1 200
profiler_attached/slow_path_system/65536 execution_time 156.254ns 157.336ns ± 0.206ns 157.327ns ± 0.084ns 157.425ns 157.637ns 157.825ns 158.553ns 0.78% 0.364 9.386 0.13% 0.015ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiler_attached/slow_path_system/16 execution_time [88.798ns; 88.879ns] or [-0.046%; +0.046%] None None None
profiler_attached/slow_path_system/256 execution_time [88.852ns; 88.947ns] or [-0.053%; +0.053%] None None None
profiler_attached/slow_path_system/4096 execution_time [148.924ns; 148.986ns] or [-0.021%; +0.021%] None None None
profiler_attached/slow_path_system/64 execution_time [88.791ns; 88.896ns] or [-0.059%; +0.059%] None None None
profiler_attached/slow_path_system/65536 execution_time [157.307ns; 157.364ns] or [-0.018%; +0.018%] None None None

@dd-octo-sts

dd-octo-sts Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.20 MB 8.20 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 89.47 MB 89.47 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.06 MB 11.06 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 100.65 MB 100.65 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 26.62 MB 26.62 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 94.56 KB 94.56 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 180.69 MB 180.69 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 772.58 MB 772.58 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.72 MB 8.72 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 94.56 KB 94.56 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 25.64 MB 25.64 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.06 MB 51.06 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 23.20 MB 23.20 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 96.04 KB 96.04 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.60 MB 185.60 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 759.08 MB 759.08 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.74 MB 6.74 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 96.04 KB 96.04 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 27.58 MB 27.58 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 48.60 MB 48.60 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 79.74 MB 79.74 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.15 MB 9.15 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 95.38 MB 95.38 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.16 MB 11.16 MB 0% (0 B) 👌

Comment thread libdd-profiling-heap-sampler/include/datadog/heap/allocation_requested.h Outdated
@scottgerring scottgerring changed the title feat(heap-sampler): replace weight with per-allocation unbiased byte … feat(profiling): replace weight with per-allocation unbiased byte … Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants