New @code_native regression.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

New @code_native regression.

Ismael Venegas Castelló
Just compiled Julia, tests are running and haven't failed yet or anything, yet I've found another regression related to @code_native, emitting a massive amount of native code:

ismaelvc@server1 ~ % julia-dev
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+3771 (2016-04-27 16:06 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 205d7e3 (0 days old master)
|__/                   |  x86_64-linux-gnu

ERROR: Invalid history file (~/.julia_history) format:
If you have a history file left over from an older version of Julia,
try renaming or deleting it.
Invalid character: '\t' at line 1
 in error(::ASCIIString, ::ASCIIString, ::Vararg{Any}) at ./error.jl:22
 [inlined code] from ./tuple.jl:8
 in hist_from_file(::Base.REPL.REPLHistoryProvider, ::IOStream) at ./REPL.jl:342
 in #setup_interface#26(::Bool, ::Array{Dict{Any,Any},1}, ::Any, ::Base.REPL.LineEditREPL) at ./REPL.jl:749
 [inlined code] from ./REPL.jl:701
 in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at ./REPL.jl:876
 in run_repl(::Base.REPL.LineEditREPL, ::Any) at ./REPL.jl:166
 in _start() at ./client.jl:361

INFO: Disabling history file for this session.
julia> @code_llvm 1 + 1

define i64 @"jlsys_+_32762"(i64, i64) #0 {
top:
  %2 = add i64 %1, %0
  ret i64 %2
}

shell> julia-dev -e "@code_native 1 + 1" > regression.txt

shell> wc -l regression.txt
42850 regression.txt




regression.txt

* https://gist.github.com/Ismael-VC/911156fa3266fe3bed350a1a06fc59a2

I report it here again, because I have no idea what caused this, will open a new issue if asked, thanks!
Reply | Threaded
Open this post in threaded view
|

Re: New @code_native regression.

Yichao Yu
On Wed, Apr 27, 2016 at 2:54 PM, Ismael Venegas Castelló
<[hidden email]> wrote:

> Just compiled Julia, tests are running and haven't failed yet or anything,
> yet I've found another regression related to @code_native, emitting a
> massive amount of native code:
>
> ismaelvc@server1 ~ % julia-dev
>                _
>    _       _ _(_)_     |  A fresh approach to technical computing
>   (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
>    _ _   _| |_  __ _   |  Type "?help" for help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.5.0-dev+3771 (2016-04-27 16:06 UTC)
>  _/ |\__'_|_|_|\__'_|  |  Commit 205d7e3 (0 days old master)
> |__/                   |  x86_64-linux-gnu
>
> ERROR: Invalid history file (~/.julia_history) format:
> If you have a history file left over from an older version of Julia,
> try renaming or deleting it.
> Invalid character: '\t' at line 1
>  in error(::ASCIIString, ::ASCIIString, ::Vararg{Any}) at ./error.jl:22
>  [inlined code] from ./tuple.jl:8
>  in hist_from_file(::Base.REPL.REPLHistoryProvider, ::IOStream) at
> ./REPL.jl:342
>  in #setup_interface#26(::Bool, ::Array{Dict{Any,Any},1}, ::Any,
> ::Base.REPL.LineEditREPL) at ./REPL.jl:749
>  [inlined code] from ./REPL.jl:701
>  in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at
> ./REPL.jl:876
>  in run_repl(::Base.REPL.LineEditREPL, ::Any) at ./REPL.jl:166
>  in _start() at ./client.jl:361
>
> INFO: Disabling history file for this session.
> julia> @code_llvm 1 + 1
>
> define i64 @"jlsys_+_32762"(i64, i64) #0 {
> top:
>   %2 = add i64 %1, %0
>   ret i64 %2
> }
>
> shell> julia-dev -e "@code_native 1 + 1" > regression.txt
>
> shell> wc -l regression.txt
> 42850 regression.txt
>
>
>
>
> regression.txt
>
> * https://gist.github.com/Ismael-VC/911156fa3266fe3bed350a1a06fc59a2
>
> I report it here again, because I have no idea what caused this, will open a
> new issue if asked, thanks!


https://github.com/JuliaLang/julia/issues/15971
Reply | Threaded
Open this post in threaded view
|

Re: New @code_native regression.

Ismael Venegas Castelló
Thanks for pointing it out!

El miércoles, 27 de abril de 2016, 14:03:03 (UTC-5), Yichao Yu escribió:
On Wed, Apr 27, 2016 at 2:54 PM, Ismael Venegas Castelló
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="tfjo9rolBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ismael...@...> wrote:

> Just compiled Julia, tests are running and haven't failed yet or anything,
> yet I've found another regression related to @code_native, emitting a
> massive amount of native code:
>
> ismaelvc@server1 ~ % julia-dev
>                _
>    _       _ _(_)_     |  A fresh approach to technical computing
>   (_)     | (_) (_)    |  Documentation: <a href="http://docs.julialang.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH5rlOiMepdbTWymPCNWn5s-yDDRA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH5rlOiMepdbTWymPCNWn5s-yDDRA&#39;;return true;">http://docs.julialang.org
>    _ _   _| |_  __ _   |  Type "?help" for help.
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.5.0-dev+3771 (2016-04-27 16:06 UTC)
>  _/ |\__'_|_|_|\__'_|  |  Commit 205d7e3 (0 days old master)
> |__/                   |  x86_64-linux-gnu
>
> ERROR: Invalid history file (~/.julia_history) format:
> If you have a history file left over from an older version of Julia,
> try renaming or deleting it.
> Invalid character: '\t' at line 1
>  in error(::ASCIIString, ::ASCIIString, ::Vararg{Any}) at ./error.jl:22
>  [inlined code] from ./tuple.jl:8
>  in hist_from_file(::Base.REPL.REPLHistoryProvider, ::IOStream) at
> ./REPL.jl:342
>  in #setup_interface#26(::Bool, ::Array{Dict{Any,Any},1}, ::Any,
> ::Base.REPL.LineEditREPL) at ./REPL.jl:749
>  [inlined code] from ./REPL.jl:701
>  in run_frontend(::Base.REPL.LineEditREPL, ::Base.REPL.REPLBackendRef) at
> ./REPL.jl:876
>  in run_repl(::Base.REPL.LineEditREPL, ::Any) at ./REPL.jl:166
>  in _start() at ./client.jl:361
>
> INFO: Disabling history file for this session.
> julia> @code_llvm 1 + 1
>
> define i64 @"jlsys_+_32762"(i64, i64) #0 {
> top:
>   %2 = add i64 %1, %0
>   ret i64 %2
> }
>
> shell> julia-dev -e "@code_native 1 + 1" > regression.txt
>
> shell> wc -l regression.txt
> 42850 regression.txt
>
>
>
>
> regression.txt
>
> * <a href="https://gist.github.com/Ismael-VC/911156fa3266fe3bed350a1a06fc59a2" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2FIsmael-VC%2F911156fa3266fe3bed350a1a06fc59a2\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1Mj-EO1Uly5otKS-0hawkNFjFHw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2FIsmael-VC%2F911156fa3266fe3bed350a1a06fc59a2\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1Mj-EO1Uly5otKS-0hawkNFjFHw&#39;;return true;">https://gist.github.com/Ismael-VC/911156fa3266fe3bed350a1a06fc59a2
>
> I report it here again, because I have no idea what caused this, will open a
> new issue if asked, thanks!


<a href="https://github.com/JuliaLang/julia/issues/15971" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaLang%2Fjulia%2Fissues%2F15971\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbPtBhB-xWXfUIkH8E6KgEyqGhuA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaLang%2Fjulia%2Fissues%2F15971\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGbPtBhB-xWXfUIkH8E6KgEyqGhuA&#39;;return true;">https://github.com/JuliaLang/julia/issues/15971
Reply | Threaded
Open this post in threaded view
|

Re: New @code_native regression.

Scott Jones
In reply to this post by Ismael Venegas Castelló
I've been seeing this in a lot of small functions (from Base!), that seems like it may be causing performance regressions compared to v0.4.x (where this doesn't occur):
Source line: 0
 pushq
%rbp
 movq
%rsp, %rbp
  pushq %r14 
 pushq %rbx
 subq $32
, %rsp
 movq
%rsi, %r14
 movabsq $jl_get_ptls_states_static
, %rax
 callq
*%rax
 movq
%rax, %rbx
 movq $0
, -24(%rbp)
 movq $2
, -40(%rbp)
 movq
(%rbx), %rax
 movq
%rax, -32(%rbp)
 leaq
-40(%rbp), %rax
 movq
%rax, (%rbx)


It makes the function twice as large as it was in v0.4.x.
I believe this is because of the compiling for thread support by default in v0.5.