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

Fix GC.measure_total_time regression #9427

Merged
merged 2 commits into from
Jan 6, 2024

Conversation

rianmcguire
Copy link
Contributor

@rianmcguire rianmcguire commented Jan 6, 2024

Commit 93ac740 introduced a regression where measurements would still be taken after setting GC.measure_total_time = false.

This PR re-introduces the checks for the objspace->flags.measure_gc flag around the measurement code.

Fixes [Bug #20157]

@rianmcguire rianmcguire marked this pull request as draft January 6, 2024 04:19
Commit 93ac740 introduced a regression
where measurements would still be taken after setting
GC.measure_total_time = false.

Fixes [Bug #20157]
@rianmcguire rianmcguire marked this pull request as ready for review January 6, 2024 04:30
@KJTsanaktsidis
Copy link
Contributor

Thanks for your fix - it looks correct to me. Could you add your reproduction script from the issue you opened as a testcase (probably in test/ruby/test_gc.rb maybe?). It should more or less work as-is in an assert_separately block I think.

@KJTsanaktsidis
Copy link
Contributor

(just the check on GC.stat(:time), asserting on what syscalls are made is obviously going to send the test directly to flaketown)

@rianmcguire
Copy link
Contributor Author

CI failures on the latest commit look like unrelated flake

@KJTsanaktsidis KJTsanaktsidis merged commit 913b26d into ruby:master Jan 6, 2024
94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants