Skip to content

Conversation

@realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Feb 4, 2026

Warning

do not merge, this is PoC

Description

Track allocations that survive across profile exports using heap-live-samples and heap-live-size sample types. Samples are emitted in batches at export time.

Enable via DD_PROFILING_HEAP_LIVE_ENABLED or datadog.profiling.heap_live_enabled (default disabled), only works when allocation profiling is active.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

PROF-13688

@github-actions github-actions bot added the profiling Relates to the Continuous Profiler label Feb 4, 2026
@datadog-official
Copy link

datadog-official bot commented Feb 4, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1028 Tests failed

    ❄️ Known flaky: Endpoints are sent() from com.datadog.appsec.php.integration.Laravel8xTests (Fix with Cursor)

    ❄️ Known flaky: Endpoints are sent() from com.datadog.appsec.php.integration.Symfony62Tests (Fix with Cursor)

testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integration\PHPInstallerTest::testSearchPhpBinaries
Test code or tested code printed unexpected output: Searching for available php binaries, this operation might take a while.
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 91f9d71 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Feb 4, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-02-12 08:02:42

Comparing candidate commit 91f9d71 in PR branch florian/heap-live-profiling with baseline commit de9c414 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 9 unstable metrics.

@realFlowControl realFlowControl force-pushed the florian/heap-live-profiling branch from bc087f2 to 817465a Compare February 4, 2026 21:03
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.20%. Comparing base (de9c414) to head (91f9d71).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3623      +/-   ##
==========================================
+ Coverage   62.11%   62.20%   +0.08%     
==========================================
  Files         141      141              
  Lines       13387    13387              
  Branches     1753     1753              
==========================================
+ Hits         8315     8327      +12     
+ Misses       4273     4263      -10     
+ Partials      799      797       -2     

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de9c414...91f9d71. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Feb 5, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-02-06 08:47:53

Comparing candidate commit 49b5835 in PR branch florian/heap-live-profiling with baseline commit 6843f96 in branch master.

Found 1 performance improvements and 4 performance regressions! Performance is the same for 186 metrics, 3 unstable metrics.

scenario:ComposerTelemetryBench/benchTelemetryParsing

  • 🟩 execution_time [-1.897µs; -1.103µs] or [-14.823%; -8.614%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+112.809ns; +149.391ns] or [+9.856%; +13.052%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+102.670ns; +152.930ns] or [+8.935%; +13.309%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+76.869ns; +117.931ns] or [+6.586%; +10.105%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+108.622ns; +151.178ns] or [+9.463%; +13.171%]

@realFlowControl realFlowControl force-pushed the florian/heap-live-profiling branch 5 times, most recently from 4aaffbf to 540cc19 Compare February 10, 2026 15:22
@realFlowControl realFlowControl force-pushed the florian/heap-live-profiling branch 2 times, most recently from 0ecb066 to 79ff80d Compare February 11, 2026 17:55
realFlowControl and others added 3 commits February 12, 2026 08:19
Track allocations that survive across profile exports using heap-live-samples
and heap-live-size sample types. Samples are emitted in batches at export time.

Enabled via DD_PROFILING_HEAP_LIVE_ENABLED when allocation profiling is active.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use functional style (map + match) in collect_batched_heap_live_samples
- Only create ProfileIndex when heap-live tracking is enabled
- Replace 32 repetitive I/O profiling lines with a loop
- Use filter_map in sample type filter method
- Add early bail-out in free_allocation when heap-live is disabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace default SipHash with a simple bit-mixing hasher optimized for
pointer addresses. Since pointers are already well-distributed, we use
`ptr ^ (ptr >> 4)` instead of expensive cryptographic hashing.

This reduces overhead in untrack_allocation() which is called on every free.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@realFlowControl realFlowControl force-pushed the florian/heap-live-profiling branch 2 times, most recently from d87cdf9 to 91f9d71 Compare February 12, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants