-
Notifications
You must be signed in to change notification settings - Fork 368
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
[PROF-8074] Restore support for Ruby 3.3 #3167
Merged
Merged
Commits on Sep 28, 2023
-
Revert "Disable profiler on Ruby 3.3 due to incompatibility"
This reverts commit 9e812f0.
Configuration menu - View commit details
-
Copy full SHA for 34073b5 - Browse repository at this point
Copy the full SHA 34073b5View commit details -
Revert "Don't try to compile profiler on Ruby 3.3"
This reverts commit 06c2ac6.
Configuration menu - View commit details
-
Copy full SHA for 5d096b0 - Browse repository at this point
Copy the full SHA 5d096b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 796b651 - Browse repository at this point
Copy the full SHA 796b651View commit details -
[PROF-8074] Restore support for Ruby 3.3
**What does this PR do?** Back in #3053, a customer reported that profiling was not working on ruby-head (for Ruby 3.3). At the time, I tracked it down to two issues: 1. A bunch of headers had changed, and thus we needed a new release of `debase-ruby_core_source` to include them 2. We were getting errors when loading the profiler due to the `ruby_current_ec` VM symbol no longer being available. At the time, I chose to disable profiling on Ruby 3.3 (#3054) until we could tackle these two items. Item 1. was fixed in #3163, that pulls in a new release of `debase-ruby_core_source` that includes the 3.3-preview2 headers. This PR fixes item 2. and re-enables profiling on Ruby 3.3 (and thus reverts #3054). **Motivation:** Make sure we're in good shape for the Ruby 3.3 final release in December. **Additional Notes:** We didn't use the magic `ruby_current_ec` VM symbol directly. Instead, we were using `GET_RACTOR()` and `GET_EC()` which call a few methods that are defined as `inline` in `vm_core.h`. Those methods all relied on `ruby_current_ec`, and thus hiding that symbol made them break. As an alternative, we can get to the same objects by starting with the current thread, and navigating the object graph a bit. The `rb_thread_current()` also relies on `ruby_current_ec` but crucially **is not inline** and is actually a public API of the VM, so that one kept working. I hesitated on if we should use `rb_thread_current()` on all Rubies with Ractors, or if we should keep the fast path for 3.0 to 3.2. I ended up deciding to keep the fast path since it was quite easy to do, but in the future we could instead choose to simplify this whole thing. P.s.: This is one of those PRs where a lot of work went into a handful of unimpressive lines of code 😅 . **How to test the change?** Validate that CI is passing on Ruby 3.3! Fixes #3053
Configuration menu - View commit details
-
Copy full SHA for f052704 - Browse repository at this point
Copy the full SHA f052704View commit details -
Configuration menu - View commit details
-
Copy full SHA for d508be8 - Browse repository at this point
Copy the full SHA d508be8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6350e08 - Browse repository at this point
Copy the full SHA 6350e08View commit details
Commits on Sep 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f1e00ec - Browse repository at this point
Copy the full SHA f1e00ecView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.