Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip building profiling native extension when Ruby has been compiled without JIT #1776

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Nov 18, 2021

The profiling native extension relies on the Ruby MJIT headers on 2.6+.

But these headers are not available in Rubies that were compiled with JIT disabled.

To avoid impacting these users (e.g. making them explicitly need to install with DD_PROFILING_NO_EXTENSION=true), let's automatically skip the extension when we detect that the JIT was disabled.

In the future, we can explore using debase-ruby_core_source for these Ruby versions, if we still want to support these users.

Fixes #1774

…without JIT

The profiling native extension relies on the Ruby MJIT headers on 2.6+.

But these headers are not available in Rubies that were compiled with
JIT disabled.

To avoid impacting these users (e.g. making them explicitly need
to install with `DD_PROFILING_NO_EXTENSION=true`), let's
automatically skip the extension when we detect that the JIT was
disabled.

In the future, we can explore using `debase-ruby_core_source` for
these Ruby versions, if we still want to support these users.

Fixes #1774
@ivoanjo ivoanjo requested a review from a team November 18, 2021 14:31
@codecov-commenter
Copy link

Codecov Report

Merging #1776 (6f7a614) into master (76000ae) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1776   +/-   ##
=======================================
  Coverage   98.21%   98.21%           
=======================================
  Files         931      931           
  Lines       44910    44910           
=======================================
+ Hits        44108    44109    +1     
+ Misses        802      801    -1     
Impacted Files Coverage Δ
spec/ddtrace/profiling/ext/forking_spec.rb 100.00% <0.00%> (+0.61%) ⬆️

Continue to review full report at Codecov.

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

@ivoanjo ivoanjo merged commit 312ffee into master Nov 19, 2021
@ivoanjo ivoanjo deleted the ivoanjo/prof-4428-nixos-install-issue branch November 19, 2021 08:52
@github-actions github-actions bot added this to the 0.55.0 milestone Nov 19, 2021
y-yagi added a commit to y-yagi/dd-trace-rb that referenced this pull request Dec 13, 2021
y-yagi added a commit to y-yagi/dd-trace-rb that referenced this pull request Dec 13, 2021
I'm not sure why, but DataDog#1776 is
going to the 404 page now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DD_PROFILING_NO_EXTENSION required when building native extensions using a nix environment
3 participants