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

[PROF-5943] Ruby VM forking fixes for new profiler #2359

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Nov 9, 2022

What does this PR do?:

This PR collects fixes for two issues related to the new profiler and Ruby apps that employ fork. See individual commits for details.

Motivation:

We fully support Ruby applications that use fork, so I've been spending time making sure the new profiler is correct for these applications as well.

Additional Notes:

I suspect there may be a few more fixes needed before the new profiler is solid on Ruby apps that use fork, so expect more PRs on this subject.

This PR is on top of #2358 as I wanted to avoid any conflicts, but is independent of it

How to test the change?:

Both changes include test coverage. Additionally, the first change can be easily observed by checking that the profiler restarts successfully after a fork in a Ruby app that uses forking.

We already were testing if the worker thread was alive in native code
(which is why a different instance of the profiler could already be
started), but did not properly allow the same `CpuAndWallTimeWorker` to
be restarted.
There's two situations that can happen here (see comments in code),
and in either situation we want to ensure that at most one
`gc_tracepoint` is active (or none, if disabled).
@ivoanjo ivoanjo requested a review from a team November 9, 2022 14:44
@github-actions github-actions bot added the profiling Involves Datadog profiling label Nov 9, 2022
Copy link
Contributor

@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

Base automatically changed from ivoanjo/prof-6288-ci-warnings-into-errors to master November 10, 2022 14:18
@ivoanjo ivoanjo merged commit af002cd into master Nov 10, 2022
@ivoanjo ivoanjo deleted the ivoanjo/prof-5943-handle-vm-forking branch November 10, 2022 14:20
@github-actions github-actions bot added this to the 1.6.0 milestone Nov 10, 2022
@ivoanjo ivoanjo changed the title [PROF-5953] Ruby VM forking fixes for new profiler [PROF-5943] Ruby VM forking fixes for new profiler Nov 15, 2022
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.

2 participants