Closed topolarity closed 11 months ago
This allows us to filter allocations that occur only when throwing errors in called functions.
Before this change:
julia> check_allocs(*, (Matrix{Float64},Matrix{Float64})) 20-element Vector{AllocCheck.AllocInstance}: ...
After:
julia> check_allocs(*, (Matrix{Float64},Matrix{Float64}); ignore_throw=true) 1-element Vector{AllocCheck.AllocInstance}: Allocation of Matrix{Float64} in ./boot.jl:477 | Array{T,2}(::UndefInitializer, m::Int, n::Int) where {T} = Stacktrace: [1] Array @ ./boot.jl:477 [inlined] [2] Array @ ./boot.jl:485 [inlined] [3] similar @ ./array.jl:418 [inlined] [4] *(A::Matrix{Float64}, B::Matrix{Float64}) @ LinearAlgebra ~/.julia/juliaup/julia-1.10.0-beta2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:113
The two outstanding limitations are:
catch
throw
CI failures are due to https://github.com/JuliaComputing/AllocCheck.jl/pull/3
Caveats above have been resolved, so ignore_throw=true is now feature-complete with this PR 🎉
ignore_throw=true
This allows us to filter allocations that occur only when throwing errors in called functions.
Before this change:
After:
The two outstanding limitations are:
This does not yet filterDonecatch
blocks, but it shouldThis does not yet filter functions that are called only fromDonethrow
/catch
blocks, but it should