-
-
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
debug metadata for inlined functions #1189
Comments
I suspect this is a side-effect of aggressive inlining, and therefore unlikely to go away. Unless you hate performance, of course ;-) |
It would be nice to make performance hating an option so we can get reasonable results in |
I see. No, I'm good with performance :) |
|
I'm pretty sure this is Julia-level inlining. Honestly, I have no idea about this, I think that @JeffBezanson, @loladiro, or @vtjnash would have to chime in (I'm not sure why I think Keno or Jameson might know the answer, but I do). |
Yes I can imagine sticking in some extra metadata along with inlined function bodies. It's a bunch of tedious work but totally doable. |
Sooner or later (v2.0?) that would be nice. |
What about adding a |
Only if you like your programs taking thousands of years to run ;-) Seriously, I think there's an (understandable) lack of appreciation of just how crucial inlining and other optimizations are in Julia. Julia without optimizations is much slower than the slowest interpreted language you can think of. |
Why is inlining so crucial for Julia? Other optimizations don't need to be turned off (as long as they don't break debug output). |
Because even something as basic as |
I see. Thanks for explaining. |
I've turned it off before. It wasn't that bad. Although building the system |
What were you running and how much slower was it? |
So many questions. I think I was just building the system image and some minor tests. There are tight inner loops that can be dramatically affected, but there aren't many of those in the sysimg build. Like vectorization (which this would prevent), it makes an enormous difference, but only in certain types of code which are relatively uncommon. |
I believe this can be closed since we now have the $ julia-0.4 --inline=no -q
julia> module M
function f()
x # line 3: error occurs here
end
function g()
f() # line 6
end
g() # line 8
end
ERROR: UndefVarError: x not defined
in f at none:3
in g at none:6
in eval at no file |
Having a workaround isn't the same as fixing this |
Ah, right, sorry. As Jeff said:
|
Ref #12544 -- if we change the inlining pass in inference to allow |
It seems that julia error tracebacks sometimes leave out some lines, including the one with the actual error.
When I load the following code from a script,
it produces the output
Note that both line 3, where the error occurs, and line 6, which calls it, are missing from the traceback.
The text was updated successfully, but these errors were encountered: