Skip to content

dyninst/object: keep dwarf sections off the heap #39079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ajwerner
Copy link
Contributor

What does this PR do?

This keeps the data off the heap. For uncompressed sections it also keeps
them file backed. This has a somewhat negative impact on decoding throughput
that is a bit surprising. I imagine that it has to do with the faults when
writing the data out, but I'm not certain. The benchmarks definitely are
noisy.

name                      old time/op    new time/op    delta
LoadElfFile/cockroach-10     904ms ± 6%     918ms ± 2%     ~     (p=0.067 n=20+18)
LoadElfFile/dd-agent-10      241ms ± 3%     254ms ± 3%   +5.17%  (p=0.000 n=19+19)

name                      old speed      new speed      delta
LoadElfFile/cockroach-10   290MB/s ± 6%   285MB/s ± 3%   -1.69%  (p=0.041 n=20+19)
LoadElfFile/dd-agent-10    297MB/s ± 3%   283MB/s ± 3%   -4.92%  (p=0.000 n=19+19)

name                      old alloc/op   new alloc/op   delta
LoadElfFile/cockroach-10     276MB ± 0%      14MB ± 0%  -95.02%  (p=0.000 n=20+17)
LoadElfFile/dd-agent-10     75.3MB ± 0%     3.6MB ± 0%  -95.27%  (p=0.000 n=19+19)

name                      old allocs/op  new allocs/op  delta
LoadElfFile/cockroach-10      121k ± 0%      121k ± 0%   +0.00%  (p=0.000 n=20+17)
LoadElfFile/dd-agent-10      32.1k ± 0%     32.1k ± 0%     ~     (all equal)

Relates to https://datadoghq.atlassian.net/browse/DEBUG-4026

This is the newer hotness.
@ajwerner ajwerner requested a review from a team as a code owner July 18, 2025 21:17
@ajwerner ajwerner added the qa/done QA done before merge and regressions are covered by tests label Jul 18, 2025
@github-actions github-actions bot added the medium review PR review might take time label Jul 18, 2025
This keeps the data off the heap. For uncompressed sections it also keeps
them file backed. This has a somewhat negative impact on decoding throughput
that is a bit surprising. I imagine that it has to do with the faults when
writing the data out, but I'm not certain. The benchmarks definitely are
noisy.

```
name                      old time/op    new time/op    delta
LoadElfFile/cockroach-10     904ms ± 6%     918ms ± 2%     ~     (p=0.067 n=20+18)
LoadElfFile/dd-agent-10      241ms ± 3%     254ms ± 3%   +5.17%  (p=0.000 n=19+19)

name                      old speed      new speed      delta
LoadElfFile/cockroach-10   290MB/s ± 6%   285MB/s ± 3%   -1.69%  (p=0.041 n=20+19)
LoadElfFile/dd-agent-10    297MB/s ± 3%   283MB/s ± 3%   -4.92%  (p=0.000 n=19+19)

name                      old alloc/op   new alloc/op   delta
LoadElfFile/cockroach-10     276MB ± 0%      14MB ± 0%  -95.02%  (p=0.000 n=20+17)
LoadElfFile/dd-agent-10     75.3MB ± 0%     3.6MB ± 0%  -95.27%  (p=0.000 n=19+19)

name                      old allocs/op  new allocs/op  delta
LoadElfFile/cockroach-10      121k ± 0%      121k ± 0%   +0.00%  (p=0.000 n=20+17)
LoadElfFile/dd-agent-10      32.1k ± 0%     32.1k ± 0%     ~     (all equal)
```
@ajwerner ajwerner force-pushed the ajwerner/mmap-debug-sections branch from d9b153e to f8509d2 Compare July 18, 2025 21:25
Copy link

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: d2b7bf1e-abf6-4668-9b99-9de8ca2d4b6e

Baseline: 7bfdddc
Comparison: f8509d2
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization -1.67 [-4.78, +1.45] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
otlp_ingest_logs memory utilization +0.30 [+0.17, +0.42] 1 Logs
otlp_ingest_metrics memory utilization +0.12 [-0.03, +0.26] 1 Logs
docker_containers_memory memory utilization +0.09 [+0.03, +0.16] 1 Logs
quality_gate_idle memory utilization +0.08 [+0.05, +0.12] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency egress throughput +0.08 [-0.52, +0.67] 1 Logs
ddot_metrics memory utilization +0.06 [-0.06, +0.18] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.06 [-0.55, +0.67] 1 Logs
quality_gate_idle_all_features memory utilization +0.04 [-0.04, +0.11] 1 Logs bounds checks dashboard
file_to_blackhole_0ms_latency egress throughput +0.04 [-0.55, +0.62] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.01 [-0.60, +0.61] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.02, +0.02] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.25, +0.25] 1 Logs
ddot_logs memory utilization -0.19 [-0.28, -0.11] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.30 [-0.33, -0.26] 1 Logs
file_tree memory utilization -0.70 [-0.74, -0.67] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.76 [-1.62, +0.10] 1 Logs
quality_gate_logs % cpu utilization -0.77 [-3.52, +1.97] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput -1.44 [-1.49, -1.38] 1 Logs
docker_containers_cpu % cpu utilization -1.67 [-4.78, +1.45] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@agent-platform-auto-pr
Copy link
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 7bfdddc

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${+0.01}$$ $${703.3}$$ < $${703.45}$$ $${+0.02}$$ $${177.62}$$ < $${178.35}$$
agent_deb_amd64_fips $${+0.01}$$ $${701.55}$$ < $${701.7}$$ $${+0.03}$$ $${176.98}$$ < $${177.76}$$
agent_heroku_amd64 $${0}$$ $${354.56}$$ < $${355.37}$$ $${-0}$$ $${94.85}$$ < $${95.72}$$
agent_msi $${+0}$$ $${977.74}$$ < $${978.18}$$ $${-0.05}$$ $${148.59}$$ < $${149.26}$$
agent_rpm_amd64 $${+0.01}$$ $${703.29}$$ < $${703.44}$$ $${+0}$$ $${179.19}$$ < $${179.87}$$
agent_rpm_amd64_fips $${+0.01}$$ $${701.54}$$ < $${701.69}$$ $${-0.02}$$ $${178.83}$$ < $${179.47}$$
agent_rpm_arm64 $${+0.01}$$ $${693.23}$$ < $${693.48}$$ $${+0.02}$$ $${162.91}$$ < $${163.62}$$
agent_rpm_arm64_fips $${+0.01}$$ $${691.54}$$ < $${691.79}$$ $${-0.01}$$ $${161.88}$$ < $${162.65}$$
agent_suse_amd64 $${+0.01}$$ $${703.29}$$ < $${703.44}$$ $${+0}$$ $${179.19}$$ < $${179.87}$$
agent_suse_amd64_fips $${+0.01}$$ $${701.54}$$ < $${701.69}$$ $${-0.02}$$ $${178.83}$$ < $${179.47}$$
agent_suse_arm64 $${+0.01}$$ $${693.23}$$ < $${693.48}$$ $${+0.02}$$ $${162.91}$$ < $${163.62}$$
agent_suse_arm64_fips $${+0.01}$$ $${691.54}$$ < $${691.79}$$ $${-0.01}$$ $${161.88}$$ < $${162.65}$$
docker_agent_amd64 $${+0.01}$$ $${787.05}$$ < $${787.26}$$ $${-0}$$ $${270.83}$$ < $${271.51}$$
docker_agent_arm64 $${+0.01}$$ $${800.5}$$ < $${800.74}$$ $${+0}$$ $${258.51}$$ < $${259.24}$$
docker_agent_jmx_amd64 $${+0.01}$$ $${978.29}$$ < $${978.45}$$ $${+0.01}$$ $${339.87}$$ < $${340.47}$$
docker_agent_jmx_arm64 $${+0.01}$$ $${980.34}$$ < $${980.54}$$ $${-0.01}$$ $${323.51}$$ < $${324.2}$$
docker_cluster_agent_amd64 $${+0}$$ $${213.87}$$ < $${214.5}$$ $${+0}$$ $${72.72}$$ < $${73.51}$$
docker_cluster_agent_arm64 $${0}$$ $${229.74}$$ < $${230.33}$$ $${+0}$$ $${68.96}$$ < $${69.77}$$
docker_cws_instrumentation_amd64 $${0}$$ $${7.07}$$ < $${7.12}$$ $${-0}$$ $${2.95}$$ < $${3.29}$$
docker_cws_instrumentation_arm64 $${+0}$$ $${6.69}$$ < $${6.92}$$ $${+0}$$ $${2.7}$$ < $${3.07}$$
docker_dogstatsd_amd64 $${0}$$ $${38.69}$$ < $${39.57}$$ $${+0}$$ $${14.93}$$ < $${15.76}$$
docker_dogstatsd_arm64 $${+0}$$ $${37.35}$$ < $${38.2}$$ $${-0}$$ $${14.37}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${0}$$ $${29.92}$$ < $${31.4}$$ $${-0}$$ $${7.87}$$ < $${8.95}$$
dogstatsd_deb_arm64 $${0}$$ $${28.52}$$ < $${29.97}$$ $${-0}$$ $${6.83}$$ < $${7.89}$$
dogstatsd_rpm_amd64 $${0}$$ $${29.92}$$ < $${31.4}$$ $${-0}$$ $${7.88}$$ < $${8.96}$$
dogstatsd_suse_amd64 $${0}$$ $${29.92}$$ < $${31.4}$$ $${-0}$$ $${7.88}$$ < $${8.96}$$
iot_agent_deb_amd64 $${0}$$ $${54.02}$$ < $${54.55}$$ $${+0}$$ $${13.62}$$ < $${14.45}$$
iot_agent_deb_arm64 $${0}$$ $${51.34}$$ < $${51.9}$$ $${-0}$$ $${11.78}$$ < $${12.63}$$
iot_agent_deb_armhf $${0}$$ $${50.86}$$ < $${51.42}$$ $${-0}$$ $${11.86}$$ < $${12.74}$$
iot_agent_rpm_amd64 $${0}$$ $${54.02}$$ < $${54.55}$$ $${+0}$$ $${13.63}$$ < $${14.47}$$
iot_agent_rpm_arm64 $${0}$$ $${51.34}$$ < $${51.91}$$ $${+0}$$ $${11.8}$$ < $${12.65}$$
iot_agent_suse_amd64 $${0}$$ $${54.02}$$ < $${54.55}$$ $${+0}$$ $${13.63}$$ < $${14.47}$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog medium review PR review might take time qa/done QA done before merge and regressions are covered by tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant