Skip to content

Commit 24ad17b

Browse files
udesouKristofferC
authored andcommitted
Updating binding version to fix MMTk CI (#57298)
Updating mmtk-julia version to include mmtk/mmtk-julia#228 and fix the MMTk CI. I've also changed the allocation profiler tests to skip all tests instead of just a few since I've seen some spurious errors - they should all be related though, we need to make sure the profiler accounts for fastpath allocation (see #57103) This should fix #57306. (cherry picked from commit 72f8a10)
1 parent f8ef8df commit 24ad17b

File tree

5 files changed

+52
-14
lines changed

5 files changed

+52
-14
lines changed

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,26 @@ endif
282282
endif
283283

284284
ifneq (${MMTK_PLAN},None)
285+
# Make sure we use the right version of $MMTK_PLAN, $MMTK_MOVING and $MMTK_BUILD
286+
# if we use the BinaryBuilder version of mmtk-julia
287+
ifeq ($(USE_BINARYBUILDER_MMTK_JULIA),1)
288+
ifeq (${MMTK_PLAN},Immix)
289+
LIB_PATH_PLAN = immix
290+
else ifeq (${MMTK_PLAN},StickyImmix)
291+
LIB_PATH_PLAN = sticky
292+
endif
293+
294+
ifeq ($(MMTK_MOVING), 0)
295+
LIB_PATH_MOVING := non_moving
296+
else
297+
LIB_PATH_MOVING := moving
298+
endif
299+
300+
JL_PRIVATE_LIBS-0 += $(LIB_PATH_PLAN)/$(LIB_PATH_MOVING)/$(MMTK_BUILD)/libmmtk_julia
301+
else
285302
JL_PRIVATE_LIBS-0 += libmmtk_julia
286303
endif
304+
endif
287305

288306
# Note that we disable MSYS2's path munging here, as otherwise
289307
# it replaces our `:`-separated list as a `;`-separated one.

deps/checksums/mmtk_julia

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ mmtk_julia-c9e046baf3a0d52fe75d6c8b28f6afd69b045d95.tar.gz/md5/73a8fbea71edce30a
88
mmtk_julia-c9e046baf3a0d52fe75d6c8b28f6afd69b045d95.tar.gz/sha512/374848b7696b565dea66daa208830581f92c1fcb0138e7a7ab88564402e94bc79c54b6ed370ec68473e31e2bd411bf82c97793796c31d39aafbbfffea9c05588
99
mmtk_julia.v0.30.4+0.x86_64-linux-gnu.tar.gz/md5/8cdeb14fd69945f64308be49f6912f9c
1010
mmtk_julia.v0.30.4+0.x86_64-linux-gnu.tar.gz/sha512/3692502f65dec8c0971b56b9bf8178641892b390d520cbcd69880d75b7500e6341534d87882246e68998f590f824ec54c18f4b8fb4aa09b8f313de065c48450e
11+
mmtk_julia-10ad6638b69b31a97a844f2f4e651e5ccea4e298.tar.gz/md5/59ed2c0e0b48673988a40527907f13ae
12+
mmtk_julia-10ad6638b69b31a97a844f2f4e651e5ccea4e298.tar.gz/sha512/d0988c37e82b8d481753f4ce83f38ba11276af3dafa8f65ee2c51122fce0dab056a65b3029cb255732226cc28d1a02e607bdaac91a02c0fd6a9fcfae834fee8c
13+
mmtk_julia.v0.30.5+1.x86_64-linux-gnu.tar.gz/md5/4d12d64754bb5c61e86e97e88bcf7912
14+
mmtk_julia.v0.30.5+1.x86_64-linux-gnu.tar.gz/sha512/0d619f00fd644338ca1ca2582b20e41db702dff8e0c338c093b2759b54379ba26ae7e0181c64931a45ebd5c3995540e535c248df9b986e73b18b65a39c5d78d2

deps/mmtk_julia.mk

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ endif # MMTK_JULIA_DIR
7575
else
7676
# We are building using the BinaryBuilder version of the binding
7777

78+
# This will download all the versions of the binding that are available in the BinaryBuilder
7879
$(eval $(call bb-install,mmtk_julia,MMTK_JULIA,false))
7980

81+
# Make sure we use the right version of $MMTK_PLAN, $MMTK_MOVING and $MMTK_BUILD
82+
ifeq (${MMTK_PLAN},Immix)
83+
LIB_PATH_PLAN = immix
84+
else ifeq (${MMTK_PLAN},StickyImmix)
85+
LIB_PATH_PLAN = sticky
86+
endif
87+
88+
ifeq ($(MMTK_MOVING), 0)
89+
LIB_PATH_MOVING := non_moving
90+
else
91+
LIB_PATH_MOVING := moving
92+
endif
93+
94+
version-check-mmtk_julia: $(BUILDROOT)/usr/lib/libmmtk_julia.so
95+
96+
$(BUILDROOT)/usr/lib/libmmtk_julia.so: get-mmtk_julia
97+
@ln -sf $(BUILDROOT)/usr/lib/$(LIB_PATH_PLAN)/$(LIB_PATH_MOVING)/$(MMTK_BUILD)/libmmtk_julia.so $@
98+
8099
endif # USE_BINARYBUILDER_MMTK_JULIA

deps/mmtk_julia.version

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MMTK_JULIA_BRANCH = master
2-
MMTK_JULIA_SHA1 = c9e046baf3a0d52fe75d6c8b28f6afd69b045d95
2+
MMTK_JULIA_SHA1 = 10ad6638b69b31a97a844f2f4e651e5ccea4e298
33
MMTK_JULIA_GIT_URL := https://github.com/mmtk/mmtk-julia.git
4-
MMTK_JULIA_TAR_URL = https://github.com/mmtk/mmtk-julia/archive/refs/tags/v0.30.4.tar.gz
5-
MMTK_JULIA_JLL_VER := 0.30.4+0
4+
MMTK_JULIA_TAR_URL = https://github.com/mmtk/mmtk-julia/archive/refs/tags/v0.30.5.tar.gz
5+
MMTK_JULIA_JLL_VER := 0.30.5+1
66
MMTK_JULIA_JLL_NAME := mmtk_julia

stdlib/Profile/test/allocs.jl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ let iobuf = IOBuffer()
88
end
99
end
1010

11+
# Issue #57103: This test does not work with MMTk because of fastpath
12+
# allocation which never calls the allocation profiler.
13+
# TODO: We should port these observability tools (e.g. allocation
14+
# profiler and heap snapshot) to MMTk
15+
@static if Base.USING_STOCK_GC
1116
@testset "alloc profiler doesn't segfault" begin
1217
res = Allocs.@profile sample_rate=1.0 begin
1318
# test the allocations during compilation
@@ -73,14 +78,8 @@ end
7378
@test length(first_alloc.stacktrace) > 0
7479
@test length(string(first_alloc.type)) > 0
7580

76-
# Issue #57103: This test does not work with MMTk because of fastpath
77-
# allocation which never calls the allocation profiler.
78-
# TODO: We should port these observability tools (e.g. allocation
79-
# profiler and heap snapshot) to MMTk
80-
@static if Base.USING_STOCK_GC
81-
@testset for type in (Task, Vector{Float64},)
82-
@test length(filter(a->a.type <: type, profile.allocs)) >= NUM_TASKS
83-
end
81+
@testset for type in (Task, Vector{Float64},)
82+
@test length(filter(a->a.type <: type, profile.allocs)) >= NUM_TASKS
8483
end
8584

8685
# TODO: it would be nice to assert that these tasks
@@ -149,8 +148,6 @@ end
149148
@test length([a for a in prof.allocs if a.type == String]) >= 1
150149
end
151150

152-
# FIXME: Issue #57103 disabling test for MMTk.
153-
@static if Base.USING_STOCK_GC
154151
@testset "alloc profiler catches allocs from codegen" begin
155152
@eval begin
156153
struct MyType x::Int; y::Int end
@@ -170,7 +167,6 @@ end
170167
@test length(prof.allocs) >= 1
171168
@test length([a for a in prof.allocs if a.type == MyType]) >= 1
172169
end
173-
end
174170

175171
@testset "alloc profiler catches allocs from buffer resize" begin
176172
f(a) = for _ in 1:100; push!(a, 1); end
@@ -187,3 +183,4 @@ end
187183
@test length([a for a in prof.allocs if a.type === Allocs.BufferType]) == 1
188184
@test length([a for a in prof.allocs if a.type === Memory{Int}]) >= 2
189185
end
186+
end

0 commit comments

Comments
 (0)