-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 some stock GC-specific tests when using MMTk #57104
Conversation
874d41d
to
a991b9a
Compare
a991b9a
to
bb00540
Compare
Any chance we could avoid the duplication of |
That can probably be a global defined in Base or Sys |
|
bb00540
to
833c1b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the tests in test/gc.jl
, I also wonder whether it would be possible to guard these lines with a @static if ...
.
@testset "GC page metrics" begin
run_nonzero_page_utilization_test()
run_pg_size_test()
end
@testset "issue-54275" begin
issue_54275_test()
end
@testset "Base.GC docstrings" begin
@test isempty(Docs.undocumented_names(GC))
end
@testset "Full GC reasons" begin
full_sweep_reasons_test()
end
As opposed to the individual function bodies.
base/Base.jl
Outdated
@@ -128,6 +128,8 @@ include("sysinfo.jl") | |||
include("libc.jl") | |||
using .Libc: getpid, gethostname, time, memcpy, memset, memmove, memcmp | |||
|
|||
const USING_STOCK_GC = occursin("stock", unsafe_string(ccall(:jl_gc_active_impl, Ptr{UInt8}, ()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should also expose GC.gc_active_impl()
which returns the string, and then have a separate function GC.is_stock_gc()
that does this occursin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add GC.gc_active_impl()
. However, I got an undefined var error when I tried adding something with occursin
to the GC module in gcutils.jl
. I assume due to that function only being imported later on, and I wasn't sure if I should change that order...
182594a
to
9f98de7
Compare
519c8fb
to
c332104
Compare
c332104
to
d5f0e83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the grammar NIT.
Other than that, LGTM.
As noted in #57103, there are a few tests that are specific to the stock GC and will fail for MMTk. For now, this PR simply skips those tests when not using the stock GC until we agree on how to approach the incompatibilities described in the issue.