Skip to content

Commit ed891d6

Browse files
authored
Remove fallback that assigns a module to inlined frames. (#51405)
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] ... ```
1 parent bf3eb09 commit ed891d6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

base/stacktraces.jl

-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ Base.@constprop :none function lookup(pointer::Ptr{Cvoid})
206206
elseif miroots !== nothing
207207
linfo = lookup_inline_frame_info(func, file, miroots)
208208
end
209-
linfo = linfo === nothing ? parentmodule(res[i + 1]) : linfo # e.g. `macro expansion`
210209
end
211210
res[i] = StackFrame(func, file, linenum, linfo, info[5]::Bool, info[6]::Bool, pointer)
212211
end

0 commit comments

Comments
 (0)