Skip to content
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

Switch debug registry mapping to CodeInstance #56878

Merged
merged 1 commit into from
Dec 22, 2024
Merged

Switch debug registry mapping to CodeInstance #56878

merged 1 commit into from
Dec 22, 2024

Conversation

Keno
Copy link
Member

@Keno Keno commented Dec 20, 2024

Currently our debugging code maps from pointers to MethodInstance. However, I think it makes more sense to map to CodeInstance instead, since that's what we're actually compiling and as we're starting to make more use of external owners and custom specializations, we'll want to be able to annotate that in backtraces. This only adjusts the internal data structures - any actual printing changes for those sorts of use cases will have to come separately.

Comment on lines +146 to +148
if isa(def, Core.ABIOverride)
def = def.def
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arbitrary proliferation of these checks seems a bad sign, but that is unrelated to this PR (which looks good to me)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we just need to put these behind a better accessor. I'll clean that up in the future.

Keno added a commit to timholy/Revise.jl that referenced this pull request Dec 20, 2024
The `linfo` field of `StackFrame` can now be a `CodeInstance`.
Keno added a commit to timholy/Revise.jl that referenced this pull request Dec 21, 2024
The `linfo` field of `StackFrame` can now be a `CodeInstance`.
Currently our debugging code maps from pointers to `MethodInstance`.
However, I think it makes more sense to map to `CodeInstance` instead,
since that's what we're actually compiling and as we're starting to
make more use of external owners and custom specializations, we'll
want to be able to annotate that in backtraces. This only adjusts
the internal data structures - any actual printing changes for
those sorts of use cases will have to come separately.
@Keno Keno merged commit cc4122c into master Dec 22, 2024
7 checks passed
@Keno Keno deleted the kf/cibacktrace branch December 22, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants