Skip to content

Commit 70cc4a8

Browse files
committed
Skipping allocation profiler tests
1 parent a0aef6e commit 70cc4a8

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

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)