Skip to content

Conversation

@ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Nov 25, 2025

What does this PR do?

This PR contains 3 small fixes for profiler support in Ruby 4.0.0-preview2:

  1. rb_obj_info is not available in Ruby 4
  2. Remove a pending from a spec that didn't work on Ruby 3.5.0-preview1
  3. Stack trace behavior slightly changed in Ruby 4

It does not affect other Ruby versions.

Motivation:

This PR, together with #5090 and DataDog/datadog-ruby_core_source#18 is needed to get a green CI for the profiler on Ruby 4.

Change log entry

Yes. Fix profiler support for Ruby 4.0.0-preview2

Additional Notes:

N/A

How to test the change?

We don't yet have Ruby 4 in CI, so this can only be tested locally.

Looks like this symbol was hidden again. We only use it for debugging
anyway...
With 4.0.0-preview2 this spec is working fine.
@ivoanjo ivoanjo requested review from a team as code owners November 25, 2025 11:37
@github-actions github-actions bot added the profiling Involves Datadog profiling label Nov 25, 2025
@datadog-official
Copy link

datadog-official bot commented Nov 25, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 42.11%
Total Coverage: 95.16% (-0.01%)

View detailed report

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

@ivoanjo ivoanjo mentioned this pull request Nov 25, 2025
@pr-commenter
Copy link

pr-commenter bot commented Nov 25, 2025

Benchmarks

Benchmark execution time: 2025-11-25 14:04:17

Comparing candidate commit 49e66f9 in PR branch ivoanjo/prof-13115-ruby-4_0_0-preview2-profiler with baseline commit 7084871 in branch master.

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

scenario:error - error tracking, with_error=true - third_party only

  • 🟩 throughput [+610.187op/s; +656.548op/s] or [+5.737%; +6.173%]

scenario:profiling - Allocations ()

  • 🟩 throughput [+195862.641op/s; +203332.196op/s] or [+6.248%; +6.486%]

Copy link
Member

@lloeki lloeki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ivoanjo ivoanjo merged commit ffc9958 into master Nov 25, 2025
544 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/prof-13115-ruby-4_0_0-preview2-profiler branch November 25, 2025 14:31
@github-actions github-actions bot added this to the 2.23.0 milestone Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Involves Datadog profiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants