Skip to content

RFC: Drop usage of MJIT headers for Ruby 2.6 to 3.1 - #6135

Draft
ivoanjo wants to merge 5 commits into
masterfrom
ivoanjo/prof-15559-move-away-mjit-headers
Draft

RFC: Drop usage of MJIT headers for Ruby 2.6 to 3.1#6135
ivoanjo wants to merge 5 commits into
masterfrom
ivoanjo/prof-15559-move-away-mjit-headers

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Jul 30, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR pairs with DataDog/datadog-ruby_core_source#29 and switches Ruby 2.6 to 3.1 over to using vendored headers instead of the MJIT header.

Motivation:

We've been considering dropping our use of the MJIT headers, and just use the "vendored headers" approach for all Rubies. I've been using this branch to test it out.

Change log entry

None.

Additional Notes:

I've tested this change will all stable releases from Ruby 2.6.0 to 3.1.7. I've ran out of time before testing with the 3.2 series.

I did not yet clean up all the support code for the MJIT header.

This of course will need to be paired with a new release of the headers gem.

How to test the change?

This should actually pass CI as-is! And yes, if you check the logs during the building of the profiling extension, you'll see the headers are coming from the vendored copy, not the mjit header.

ivoanjo added 5 commits July 30, 2026 14:26
This pairs with unreleased changes in the `datadog-ruby_core_source`
gem.

I've checked all versions between 2.6.0 and 2.6.10 and all of them
pass the profiler test suite without the mjit headers.
This pairs with unreleased changes in the `datadog-ruby_core_source`
gem.

I've checked all versions between 2.7.0 and 2.7.8 and all of them
pass the profiler test suite without the mjit headers.
This pairs with unreleased changes in the `datadog-ruby_core_source`
gem.

I've checked all versions between 3.0.0 and 3.0.7 and all of them
pass the profiler test suite without the mjit headers.
This pairs with unreleased changes in the `datadog-ruby_core_source`
gem.

I've checked all versions between 3.1.0 and 3.1.7 and all of them
pass the profiler test suite without the mjit headers.
@dd-octo-sts dd-octo-sts Bot added the profiling Involves Datadog profiling label Jul 30, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 12 Pipeline jobs failed

Check Pull Request CI Status | all-jobs-are-green   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. 6 tests failed. Various end-to-end test failures across multiple configurations.

Test macOS | Test (macos-15, 3.0)   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. Error: 'NEWOBJ_OF' macro redefined in internal.h:1270 during compilation of datadog_profiling_native_extension

Test macOS | Test (macos-15, 3.1)   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. Compilation error in internal.h: 'GCC_VERSION_SINCE' is not defined, leading to multiple undeclared functions and type redefinitions during extension build.

View all 12 failed jobs.

📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: ivoanjo/prof-15559-move-away-mjit-headers

Check Pull Request CI Status | all-jobs-are-green
Commit: 7edb48170f18f306110d8d4f5fb318ed1c361dea
Error (code / test):
6 tests failed. Various end-to-end test failures across multiple configurations.
CI job: https://github.com/DataDog/dd-trace-rb/actions/runs/30547276793/job/90886540434

Test macOS | Test (macos-15, 3.0)
Commit: 7edb48170f18f306110d8d4f5fb318ed1c361dea
Error (code / build):
Error: 'NEWOBJ_OF' macro redefined in internal.h:1270 during compilation of datadog_profiling_native_extension
CI job: https://github.com/DataDog/dd-trace-rb/actions/runs/30547276853/job/90886539982

Test macOS | Test (macos-15, 3.1)
Commit: 7edb48170f18f306110d8d4f5fb318ed1c361dea
Error (code / build):
Compilation error in internal.h: 'GCC_VERSION_SINCE' is not defined, leading to multiple undeclared functions and type redefinitions during extension build.
CI job: https://github.com/DataDog/dd-trace-rb/actions/runs/30547276853/job/90886540357

Plus 2 more failing jobs not shown here.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 1 job - 0 passed on retry View in Datadog

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8855b53 | Docs | Datadog PR Page | Give us feedback!

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.

1 participant