Skip to content

PoC: feat(profiling): add heap-live profiling for memory leak detection#3623

Draft
realFlowControl wants to merge 1 commit intomasterfrom
florian/heap-live-profiling
Draft

PoC: feat(profiling): add heap-live profiling for memory leak detection#3623
realFlowControl wants to merge 1 commit intomasterfrom
florian/heap-live-profiling

Conversation

@realFlowControl
Copy link
Member

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.

@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

🧪 1024 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 6983b6fb000000003d83b3fea91105ff
tid: 6983b6fb00000000
hexProcessTraceId: 3d83b3fea91105ff
hexProcessSpanId: dc12bb8a2844335b
processTraceId: 4432584364602230271
processSpanId: 15857943439980376923
View all

ℹ️ Info

❄️ No new flaky tests detected

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

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>
@pr-commenter
Copy link

pr-commenter bot commented Feb 4, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-02-04 21:17:07

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

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

scenario:php-profiler-exceptions-with-profiler

  • 🟥 cpu_user_time [+14.699ms; +18.148ms] or [+20.519%; +25.335%]
  • 🟥 execution_time [+15.690ms; +18.446ms] or [+16.702%; +19.635%]

scenario:php-profiler-exceptions-with-profiler-and-timeline

  • 🟥 execution_time [+13.742ms; +16.398ms] or [+14.016%; +16.723%]

scenario:walk_stack/1

  • 🟩 wall_time [-273.753ns; -269.156ns] or [-2.155%; -2.118%]

@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 Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.20%. Comparing base (6843f96) to head (817465a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3623      +/-   ##
==========================================
- Coverage   62.21%   62.20%   -0.02%     
==========================================
  Files         141      141              
  Lines       13387    13387              
  Branches     1753     1753              
==========================================
- Hits         8329     8327       -2     
- Misses       4260     4263       +3     
+ Partials      798      797       -1     

see 1 file 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 6843f96...817465a. 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.

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