[PROF-15377] Profiling: Disallow heap profiling on Ruby 4.1+ (master)#6023
Conversation
**What does this PR do?** This PR disables heap profiling on Ruby 4.1+ (e.g. current Ruby master). **Motivation:** Our current implementation of heap profiling relies on `ObjectSpace._id2ref`, which was removed on Ruby 4.1 -- see https://bugs.ruby-lang.org/issues/22135 . Until we can re-implement the feature differently, we have no way of supporting 4.1+- **Additional Notes:** N/A **How to test the change?** Change includes test coverage.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: dbb880b | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-10 14:25:13 Comparing candidate commit dbb880b in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 1 unstable metrics.
|
What does this PR do?
This PR disables heap profiling on Ruby 4.1+ (e.g. current Ruby master).
Motivation:
Our current implementation of heap profiling relies on
ObjectSpace._id2ref, which was removed on Ruby 4.1 -- seehttps://bugs.ruby-lang.org/issues/22135 .
Until we can re-implement the feature differently, we have no way of supporting 4.1+
Change log entry
Yes. Profiling: Disallow heap profiling on Ruby 4.1+
Additional Notes:
N/A
How to test the change?
Change includes test coverage.