-
Notifications
You must be signed in to change notification settings - Fork 375
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-4198] Gather CPU time in profiler without monkey patching Thread for all supported Ruby versions (2.1 to 3.x) #1740
[PROF-4198] Gather CPU time in profiler without monkey patching Thread for all supported Ruby versions (2.1 to 3.x) #1740
Commits on Oct 27, 2021
-
Enable gathering thread CPU time using native extension for legacy Ru…
…by < 2.6 By relying on the `debase-ruby_core_source` extension, we can get access to the internal VM headers needed to implement this functionality on all legacy Ruby versions we support. Note that this does not yet change the profiler to use `NativeExtension.clock_id_for` on these older Rubies.
Configuration menu - View commit details
-
Copy full SHA for 2d6e9c5 - Browse repository at this point
Copy the full SHA 2d6e9c5View commit details -
Introduce NativeExtension#cpu_time_ns_for helper
This abstracts away the actual operation we want in our code -- getting the cpu time for a given thread, rather than exposing the clock_id and having callers handle it.
Configuration menu - View commit details
-
Copy full SHA for a9f9354 - Browse repository at this point
Copy the full SHA a9f9354View commit details -
Sample cpu time in Stack sampler using native extension directly
We now gather cpu time directly using the native extension, rather than relying on the `cthread.rb` monkey patch. This allows us to remove `cthread.rb` (next commit), as well as to clean up the whole "let's try to detect when there's missing instrumentation" approach we had going on. It also enables us to simpify the tests. All great advantages!
Configuration menu - View commit details
-
Copy full SHA for 87c9676 - Browse repository at this point
Copy the full SHA 87c9676View commit details -
Copy Process::Waiter comments and regression tests over from cthread.rb
We want to preserve this knowledge and tests, so before deleting `cthread.rb` and its spec, let's move this to the stack sampler.
Configuration menu - View commit details
-
Copy full SHA for 2ce9dc4 - Browse repository at this point
Copy the full SHA 2ce9dc4View commit details -
Remove all references to the CPU extension from the Setup task
After we move CPU time to use the native extension, we no longer need the "CPU extension" that monkey patches `Thread` creation.
Configuration menu - View commit details
-
Copy full SHA for 50ad4f5 - Browse repository at this point
Copy the full SHA 50ad4f5View commit details -
Remove all references to the CPU time extension aka Thread monkey patch
It's been fully replaced by our usage of the native extension to get this information.
Configuration menu - View commit details
-
Copy full SHA for 1106b71 - Browse repository at this point
Copy the full SHA 1106b71View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09dd419 - Browse repository at this point
Copy the full SHA 09dd419View commit details -
`ffi` was only used by the profiling CPU time extension (`cthread.rb`) which has been removed so let's get rid of it. Thanks `ffi` for your service.
Configuration menu - View commit details
-
Copy full SHA for e85f017 - Browse repository at this point
Copy the full SHA e85f017View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a77c61 - Browse repository at this point
Copy the full SHA 9a77c61View commit details -
Skip native extension build testing for Windows+ruby-head
We still have a lot of other Windows-related failures, so let's get back to this once 3.1 is released.
Configuration menu - View commit details
-
Copy full SHA for eb8ff20 - Browse repository at this point
Copy the full SHA eb8ff20View commit details -
Workaround for Ruby 2.1 not having a public thread_native.h header
Hopefully we can deprecate Ruby 2.1 soon.
Configuration menu - View commit details
-
Copy full SHA for b47bdbb - Browse repository at this point
Copy the full SHA b47bdbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1c4fa3 - Browse repository at this point
Copy the full SHA e1c4fa3View commit details
Commits on Oct 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 0f7eeae - Browse repository at this point
Copy the full SHA 0f7eeaeView commit details
Commits on Nov 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 4725cc6 - Browse repository at this point
Copy the full SHA 4725cc6View commit details