-
-
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
Remove fallback that assigns a module to inlined frames. #51405
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
KristofferC
added
the
backport 1.10
Change should be backported to the 1.10 release
label
Sep 20, 2023
BioTurboNick
added a commit
to BioTurboNick/AbbreviatedStackTraces.jl
that referenced
this pull request
Sep 25, 2023
* Optionally use `names(module)` to look up frames to re-insert into the stack trace to expose the public API calls; use `ENV["JULIA_STACKTRACE_PUBLIC"] = true` * Simplified display of internal frames by eliminating the superfluous frame numbers, adding italics (1.10+), and making the commas gray * Restores function of `ENV["JULIA_STACKTRACE_MINIMAL"] = true` * Includes temporary fix for inline frame module assignment bug to be fixed by [Remove fallback that assigns a module to inlined frames. JuliaLang/julia#51405](JuliaLang/julia#51405) * Fixes [Remove VSCode extension overrides setting `err` global once incorporated into it. #41](#41) , as VSCode extension now includes `err` global. * Removed code to bring same-location frame collapsing to 1.9, as it was misbehaving.
BioTurboNick
added a commit
to BioTurboNick/julia
that referenced
this pull request
Sep 27, 2023
KristofferC
pushed a commit
that referenced
this pull request
Oct 3, 2023
The work I did in #41099 introduced code which, if method information could not be found for an inlined frame, would fall back to use the module of the next-higher stack frame. This often worked there because the only frames that would not be assigned a module at this point would be e.g., `macro expansion` frames. However, due to the performance impact of the way method roots are currently encoded, the extra method roots were removed in #50546. The result is that inlined frames were being assigned a potentially incorrect module, rather than being left blank. Example: ``` julia> @Btime plot([1 2 3], seriestype = :blah) ... [13] #invokelatest#2 @ BenchmarkTools ./essentials.jl:901 [inlined] [14] invokelatest @ BenchmarkTools ./essentials.jl:896 [inlined] ... ``` (cherry picked from commit ed891d6)
KristofferC
added a commit
that referenced
this pull request
Nov 2, 2023
Backported PRs: - [x] #50932 <!-- types: fix hash values of Vararg --> - [x] #50975 <!-- Use rr-safe `nopl; rdtsc` sequence --> - [x] #50989 <!-- fix incorrect results in `expm1(::Union{Float16, Float32})` --> - [x] #51284 <!-- Avoid infinite loop when doing SIGTRAP in arm64-apple --> - [x] #51332 <!-- Add s4 field to Xoshiro --> - [x] #51397 <!-- call Pkg precompile hook in latest world --> - [x] #51405 <!-- Remove fallback that assigns a module to inlined frames. --> - [x] #51491 <!-- Throw clearer ArgumentError for strip with two string args --> - [x] #51531 <!-- fix `_tryonce_download_from_cache` (busybox.exe download error) --> - [x] #51541 <!-- Fix string index error in tab completion code --> - [x] #51530 <!-- Don't mark nonlocal symbols as hidden --> - [x] #51557 <!-- Fix last startup & shutdown precompiles --> - [x] #51512 <!-- avoid limiting Type{Any} to Type --> - [x] #51595 <!-- reset `maxprobe` on `empty!` --> - [x] #51582 <!-- Aggressive constprop in LinearAlgebra.wrap --> - [x] #51592 <!-- correctly track element pointer in heap snapshot --> - [x] #51326 <!-- complete false & true more generally as vals --> - [x] #51376 <!-- make `hash(::Xoshiro)` compatible with `==` --> - [x] #51557 <!-- Fix last startup & shutdown precompiles --> - [x] #51845 - [x] #51840 - [x] #50663 <!-- Fix Expr(:loopinfo) codegen --> - [x] #51863 <!-- LLVM 15.0.7-9 --> Contains multiple commits, manual intervention needed: - [ ] #51035 <!-- refactor GC scanning code to reflect jl_binding_t are now first class --> - [ ] #51092 <!-- inference: fix bad effects for recursion --> Non-merged PRs with backport label: - [ ] #51479 <!-- prevent code loading from lookin in the versioned environment when building Julia --> - [ ] #51414 <!-- improvements on GC scheduler shutdown --> - [ ] #51366 <!-- Handle infix operators in REPL completion --> - [ ] #50919 <!-- Code loading: do the "skipping mtime check for stdlib" check regardless of the value of `ispath(f)` --> - [ ] #50824 <!-- Add some aliasing warnings to docstrings for mutating functions in Base --> - [ ] #49805 <!-- Limit TimeType subtraction to AbstractDateTime -->
KristofferC
removed
the
backport 1.10
Change should be backported to the 1.10 release
label
Nov 2, 2023
nalimilan
pushed a commit
that referenced
this pull request
Nov 5, 2023
The work I did in #41099 introduced code which, if method information could not be found for an inlined frame, would fall back to use the module of the next-higher stack frame. This often worked there because the only frames that would not be assigned a module at this point would be e.g., `macro expansion` frames. However, due to the performance impact of the way method roots are currently encoded, the extra method roots were removed in #50546. The result is that inlined frames were being assigned a potentially incorrect module, rather than being left blank. Example: ``` julia> @Btime plot([1 2 3], seriestype = :blah) ... [13] #invokelatest#2 @ BenchmarkTools ./essentials.jl:901 [inlined] [14] invokelatest @ BenchmarkTools ./essentials.jl:896 [inlined] ... ``` (cherry picked from commit ed891d6)
aviatesk
pushed a commit
that referenced
this pull request
Jan 14, 2024
The fallback code that was written for #41099 is causing unintended issues with some inlined stack frames (one previous #51405, new #52709), since the main piece, linetable storage and lookup, was removed in #50546. Probably better to strip it all back to how it was previously, until it can all be revisited more fully. Should be backported to 1.10.
aviatesk
pushed a commit
that referenced
this pull request
Jan 14, 2024
The fallback code that was written for #41099 is causing unintended issues with some inlined stack frames (one previous #51405, new #52709), since the main piece, linetable storage and lookup, was removed in #50546. Probably better to strip it all back to how it was previously, until it can all be revisited more fully. Should be backported to 1.10.
Drvi
pushed a commit
to RelationalAI/julia
that referenced
this pull request
Jun 7, 2024
The fallback code that was written for JuliaLang#41099 is causing unintended issues with some inlined stack frames (one previous JuliaLang#51405, new JuliaLang#52709), since the main piece, linetable storage and lookup, was removed in JuliaLang#50546. Probably better to strip it all back to how it was previously, until it can all be revisited more fully. Should be backported to 1.10.
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.
The work I did in #41099 introduced code which, if method information could not be found for an inlined frame, would fall back to use the module of the next-higher stack frame. This often worked there because the only frames that would not be assigned a module at this point would be e.g.,
macro expansion
frames.However, due to the performance impact of the way method roots are currently encoded, the extra method roots were removed in #50546.
The result is that inlined frames in 1.10 and beyond are being assigned a potentially incorrect module, rather than being left blank.
This PR removes the fallback and fixes the issue.
Please mark for 1.10 backport?
Example: