-
-
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
inlined code line numbers need work #13725
Comments
Ref my other example in #13553 (comment) |
We would need to handle line nodes spliced in by macros too, unless these enter/pop things are labeled. Ref: #1334 (comment) |
I think we might have to put back the line number filter in inlining. I'm seeing really extreme regressions in line number info; for example looking at #13350 I get the following profile full of random locations:
Putting back the line number filter, I get the following accurate and useful output:
|
Ok, I think this particular issue is not present in 0.4 thankfully. |
though it likely would if #13491 were backported? |
Correct, especially commit a33cd07 |
#13725 Single expression functions tend to get inlined into the middle of an expression, so their line numbers should not be inserted into the outer function (the number applies to only part of an expression, not the whole statement). This also significantly reduces sysimg size.
JuliaLang#13725 Single expression functions tend to get inlined into the middle of an expression, so their line numbers should not be inserted into the outer function (the number applies to only part of an expression, not the whole statement). This also significantly reduces sysimg size.
using Base.Test
for i = 1:4
@test 1 == 2
end
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.12-pre+7 (2015-10-20 12:08 UTC)
_/ |\__'_|_|_|\__'_| | Commit fa31586* (10 days old release-0.3)
|__/ | x86_64-apple-darwin15.0.0
julia> include("/Users/andreasnoack/Desktop/testfile.jl")
ERROR: test failed: 1 == 2
in error at error.jl:21
in default_handler at test.jl:19
in do_test at test.jl:39
in anonymous at no file:5
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
while loading /Users/andreasnoack/Desktop/testfile.jl, in expression starting on line 3
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.4.1-pre+21 (2015-10-29 07:02 UTC)
_/ |\__'_|_|_|\__'_| | Commit be50c8d* (1 day old release-0.4)
|__/ | x86_64-apple-darwin15.0.0
julia> include("/Users/andreasnoack/Desktop/testfile.jl")
ERROR: LoadError: test failed: 1 == 2
in expression: 1 == 2
in error at ./error.jl:21
in default_handler at test.jl:30
in do_test at test.jl:53
[inlined code] from /Users/andreasnoack/Desktop/testfile.jl:5
in anonymous at no file:0
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:304
while loading /Users/andreasnoack/Desktop/testfile.jl, in expression starting on line 3 Update: I still think there is an issue, but the example was bad because the right line number is in the output here. I tried to make a small reproducible example, but it didn't capture the issue. I'll try to make a new example. |
fixed by #14949 |
Example (encountered while working on #13547):
The line
abstractarray.jl:301
is correct, but the other 3 line numbers are completely wrong. I believe the fix is for the inliner to insert some kind of location "pop" operation. For example we haveWe see several line nodes piled up, without knowing their nesting structure.
The text was updated successfully, but these errors were encountered: