Skip to content

Commit

Permalink
Merge branch 'master' into ib/tagimg_iddict
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Feb 22, 2025
2 parents f769c84 + 7736e2e commit 1897c7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
tags: '*'

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

Expand Down Expand Up @@ -43,6 +43,8 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
with:
cache-registries: ${{ ! (matrix.version == '1.6' && matrix.os == 'windows-latest') }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@latest
Expand Down
33 changes: 21 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,12 @@ end
A = randn(100, 100, 200)
Profile.clear()
mapslices(sum, A; dims=2) # compile it so we don't end up profiling inference
@profile mapslices(sum, A; dims=2)
g = flamegraph()
g = nothing
for _ in 1:10
@profile mapslices(sum, A; dims=2)
g = flamegraph()
FlameGraphs.depth(g) > 10 && break
end
@test FlameGraphs.depth(g) > 10
img = flamepixels(StackFrameCategory(), flamegraph(C=true))
@test any(img .== colorant"orange")
Expand All @@ -461,18 +465,21 @@ end
end
Ts = subtypes(Any)[1:20] # we don't need all of them
mappushes!(spell_spec, [], Ts)
@profile for i = 1:1000
mappushes!(spell_spec, [], Ts)
end
_, sfdict = Profile.retrieve()
rtds = []
for sfs in values(sfdict)
for sf in sfs
if (FlameGraphs.status(sf) & FlameGraphs.runtime_dispatch) != 0
push!(rtds, sfs)
break
for _ in 1:10 # try to get a runtime dispatch on unfortunately flaky profiling
@profile for i = 1:10000
mappushes!(spell_spec, [], Ts)
end
_, sfdict = Profile.retrieve()
for sfs in values(sfdict)
for sf in sfs
if (FlameGraphs.status(sf) & FlameGraphs.runtime_dispatch) != 0
push!(rtds, sfs)
break
end
end
end
isempty(rtds) || break
end
@test !isempty(rtds)
end
Expand Down Expand Up @@ -503,7 +510,9 @@ end

A = randn(100, 100, 200)
Profile.clear()
@profile mapslices(sum, A; dims=2)
while Profile.len_data() == 0
@profile mapslices(sum, A; dims=2)
end
fn = tempname()*".jlprof"
f = File{format"JLPROF"}(fn)
FlameGraphs.save(f)
Expand Down

0 comments on commit 1897c7c

Please sign in to comment.