-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
snoopi_deep: Stop stripping function from slottypes
#38143
Merged
timholy
merged 1 commit into
JuliaLang:master
from
NHDaly:nhd-snoopi_deep-slottypes-methodinstance
Oct 23, 2020
Merged
snoopi_deep: Stop stripping function from slottypes
#38143
timholy
merged 1 commit into
JuliaLang:master
from
NHDaly:nhd-snoopi_deep-slottypes-methodinstance
Oct 23, 2020
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
The `slottypes` in a MethodInstance specialization contains the generic function object as the first argument in the array, which we were previously stripping out to "not write redundant information". But this actually makes the output harder to read, because the `show()` for `MethodInstance`s doesn't fully qualify the names of functions. For example, before this commit (note that you might ask "*Which* `fpsort!` is this? What module is it in?"): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` And after this commit (note that the fully qualified function is the first item in the slottypes array -- it's `Base.Sort.Float.fpsort!`): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Core.Const(Base.Sort.Float.fpsort!), Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` While of course you could have gotten this information out of the `MethodInstance` (which is why I left it out), it doesn't show up in the output by default, which makes copy/pasting this output less useful. The output is already quite large, so I don't think the "redundant information" concern is very valid, since it's already quite big, so it's better to include all the necessary information.
Sacha0
approved these changes
Oct 22, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thanks Nathan! :)
@timholy - you might want to take a look too? :) Thanks! |
NHDaly
added a commit
to NHDaly/julia
that referenced
this pull request
Oct 28, 2020
The slottypes array is reused and modified, so we need to make a copy of it for each inference frame. This was a bug accidentally introduced in JuliaLang#38143
Sacha0
pushed a commit
to Sacha0/julia
that referenced
this pull request
Nov 9, 2020
The `slottypes` in a MethodInstance specialization contains the generic function object as the first argument in the array, which we were previously stripping out to "not write redundant information". But this actually makes the output harder to read, because the `show()` for `MethodInstance`s doesn't fully qualify the names of functions. For example, before this commit (note that you might ask "*Which* `fpsort!` is this? What module is it in?"): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` And after this commit (note that the fully qualified function is the first item in the slottypes array -- it's `Base.Sort.Float.fpsort!`): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Core.Const(Base.Sort.Float.fpsort!), Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` While of course you could have gotten this information out of the `MethodInstance` (which is why I left it out), it doesn't show up in the output by default, which makes copy/pasting this output less useful. The output is already quite large, so I don't think the "redundant information" concern is very valid, since it's already quite big, so it's better to include all the necessary information.
Sacha0
pushed a commit
to Sacha0/julia
that referenced
this pull request
Nov 9, 2020
The slottypes array is reused and modified, so we need to make a copy of it for each inference frame. This was a bug accidentally introduced in JuliaLang#38143
NHDaly
added a commit
to NHDaly/julia
that referenced
this pull request
Nov 13, 2020
The `slottypes` in a MethodInstance specialization contains the generic function object as the first argument in the array, which we were previously stripping out to "not write redundant information". But this actually makes the output harder to read, because the `show()` for `MethodInstance`s doesn't fully qualify the names of functions. For example, before this commit (note that you might ask "*Which* `fpsort!` is this? What module is it in?"): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` And after this commit (note that the fully qualified function is the first item in the slottypes array -- it's `Base.Sort.Float.fpsort!`): ```julia 0.001485733 => Core.Compiler.Timings.InferenceFrameInfo(MethodInstance for fpsort!(::Vector{Float64}, ::Base.Sort.QuickSortAlg, ::Base.Order.ForwardOrdering), 0x0000000000007310, Any[], Any[Core.Const(Base.Sort.Float.fpsort!), Vector{Float64}, Core.Const(Base.Sort.QuickSortAlg()), Core.Const(Base.Order.ForwardOrdering())]) ``` While of course you could have gotten this information out of the `MethodInstance` (which is why I left it out), it doesn't show up in the output by default, which makes copy/pasting this output less useful. The output is already quite large, so I don't think the "redundant information" concern is very valid, since it's already quite big, so it's better to include all the necessary information.
NHDaly
added a commit
to NHDaly/julia
that referenced
this pull request
Nov 13, 2020
The slottypes array is reused and modified, so we need to make a copy of it for each inference frame. This was a bug accidentally introduced in JuliaLang#38143
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 is a follow-up to #37749.
The
slottypes
in a MethodInstance specialization contains the genericfunction object as the first argument in the array, which we were
previously stripping out to "not write redundant information".
But this actually makes the output harder to read, because the
show()
for
MethodInstance
s doesn't fully qualify the names of functions.For example, before this commit (note that you might ask "Which
fpsort!
is this? What module is it in?"):And after this commit (note that the fully qualified function is the
first item in the slottypes array -- it's
Base.Sort.Float.fpsort!
):While of course you could have gotten this information out of the
MethodInstance
(which is why I left it out), it doesn't show up in theoutput by default, which makes copy/pasting this output less useful.
The output is already quite large, so I don't think the "redundant
information" concern is very valid, since it's already quite big, so
it's better to include all the necessary information.