-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add ignore_throw
support
#4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
topolarity
force-pushed
the
ct/ignore-throw
branch
3 times, most recently
from
October 2, 2023 17:13
0f5d166
to
1f8df2a
Compare
CI failures are due to #3 |
Caveats above have been resolved, so |
topolarity
force-pushed
the
ct/ignore-throw
branch
2 times, most recently
from
October 3, 2023 17:26
ea32105
to
49e5069
Compare
topolarity
changed the title
Add preliminary
Add Oct 3, 2023
ignore_throw
supportignore_throw
support
gbaraldi
reviewed
Oct 4, 2023
This allows us to filter allocations that occur only when throwing errors in called functions. Before this change: ```julia julia> check_allocs(*, (Matrix{Float64},Matrix{Float64})) 20-element Vector{AllocCheck.AllocInstance}: ... ``` After: ```julia 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 ```
This allows us to ignore calls to functions that occur only within throw/catch blocks.
topolarity
force-pushed
the
ct/ignore-throw
branch
from
October 4, 2023 15:39
49e5069
to
57cba84
Compare
Since we assume forward-progress, being post-dominated by an `unreachable` means that path must encounter a throw(). This assumption is being re-considered for upcoming versions of Julia, but for the moment it still stands.
topolarity
force-pushed
the
ct/ignore-throw
branch
from
October 4, 2023 15:46
57cba84
to
1856e16
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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