public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 @ 2015-01-13 11:31 trippels at gcc dot gnu.org 2015-01-18 17:34 ` [Bug target/64580] " segher at gcc dot gnu.org ` (12 more replies) 0 siblings, 13 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-13 11:31 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 Bug ID: 64580 Summary: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org CC: segher at gcc dot gnu.org Host: powerpc64-unknown-linux-gnu Target: powerpc64-unknown-linux-gnu Build: powerpc64-unknown-linux-gnu "perf top" shows very high rs6000_stack_info() usage during final LTO link of libxul (Firefox) on ppc64, e.g.: 31.34% lto1 [.] rs6000_stack_info() rs6000_stack_info() rs6000_stack_info() rs6000_output_function_prologue(_IO_FILE*, long) final_start_function(rtx_insn*, _IO_FILE*, int) rs6000_output_mi_thunk(_IO_FILE*, tree_node*, long, long, tree_node*) cgraph_node::expand_thunk(bool, bool) cgraph_node::assemble_thunks_and_aliases() cgraph_node::assemble_thunks_and_aliases() cgraph_node::expand() symbol_table::compile() lto_main() compile_file() 1.36% cc1plus [.] _cpp_lex_token ... powerpc64-unknown-linux-gnu ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org @ 2015-01-18 17:34 ` segher at gcc dot gnu.org 2015-01-19 14:04 ` trippels at gcc dot gnu.org ` (11 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: segher at gcc dot gnu.org @ 2015-01-18 17:34 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> --- Hi Markus, How often is rs6000_stack_info called there? Are there any hotspots in the function? Do you have a standalone testcase? ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org 2015-01-18 17:34 ` [Bug target/64580] " segher at gcc dot gnu.org @ 2015-01-19 14:04 ` trippels at gcc dot gnu.org 2015-01-22 0:30 ` segher at gcc dot gnu.org ` (10 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-19 14:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Hi Segher, on gcc112 you can use the following command to reproduce the issue: % g++ -xlto -c -mcpu=power8 -O3 -fPIC -fno-exceptions -fltrans -o /dev/null /var/tmp/libxul.so.ltrans8.o ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org 2015-01-18 17:34 ` [Bug target/64580] " segher at gcc dot gnu.org 2015-01-19 14:04 ` trippels at gcc dot gnu.org @ 2015-01-22 0:30 ` segher at gcc dot gnu.org 2015-01-22 7:20 ` trippels at gcc dot gnu.org ` (9 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: segher at gcc dot gnu.org @ 2015-01-22 0:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> --- Hi again, Unfortunately it seems I am unable to build a version of GCC that is compatible with that (every version I tried either complains or ICEs). Maybe you can answer the above questions yourself? How often is rs6000_output_mi_thunk called (+ some sense of scale, e.g. how many "real" functions are emitted)? Is there a real hotspot in rs6000_stack_info itself? I haven't been able to get it above 0.16% of cpu time, and no hotspots. Can perf be used to analyze results on a different machine than used to generate the data? ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (2 preceding siblings ...) 2015-01-22 0:30 ` segher at gcc dot gnu.org @ 2015-01-22 7:20 ` trippels at gcc dot gnu.org 2015-01-22 7:56 ` trippels at gcc dot gnu.org ` (8 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-22 7:20 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #3) > Hi again, > > Unfortunately it seems I am unable to build a version of GCC that is > compatible with that (every version I tried either complains or ICEs). Yes, it's unfortunate that there is no stable interface at all. Every patch in this area potentially breaks things and there were a couple of them in the last few days. > Maybe you can answer the above questions yourself? How often > is rs6000_output_mi_thunk called (+ some sense of scale, e.g. > how many "real" functions are emitted)? Is there a real hotspot > in rs6000_stack_info itself? I haven't been able to get it above > 0.16% of cpu time, and no hotspots. I will try to collect some callgrind data later today. > Can perf be used to analyze results on a different machine than > used to generate the data? If the version of perf is the same then yes. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (3 preceding siblings ...) 2015-01-22 7:20 ` trippels at gcc dot gnu.org @ 2015-01-22 7:56 ` trippels at gcc dot gnu.org 2015-01-22 18:06 ` dje at gcc dot gnu.org ` (7 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-22 7:56 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Here is an example "callgrind_control -e -b" output (program is still running): PID 53944: /home/trippels/gcc_test/usr/local/bin/../libexec/gcc/powerpc64-unknown-linux-gnu/5.0.0/lto1 -quiet -dumpbase libxul.so.ltrans8.o -mcpu=power8 -auxbase-strip /dev/null -O3 -version -fPIC -fno-exceptions -fltrans /var/tmp/libxul.so.ltrans8.o -o /home/trippels/tmp/ccxhYq0O.s sending command status internal to pid 53944 Totals: Ir Th 1 163,422,428,166 Frame: Ir Backtrace for Thread 1 [ 0] 127,387,164,848 rs6000_stack_info() (932 x) [ 1] 127,387,195,580 rs6000_output_function_prologue(_IO_FILE*, long) (932 x) [ 2] 127,387,263,387 final_start_function(rtx_insn*, _IO_FILE*, int) (132 x) [ 3] 127,390,072,883 rs6000_output_mi_thunk(_IO_FILE*, tree_node*, long, long, tree_node*) (132 x) [ 4] 127,490,182,450 cgraph_node::expand_thunk(bool, bool) (132 x) [ 5] 127,490,272,999 cgraph_node::assemble_thunks_and_aliases() (190 x) [ 6] 127,491,063,296 cgraph_node::assemble_thunks_and_aliases() (800 x) [ 7] 156,624,357,942 cgraph_node::expand() (800 x) [ 8] 157,695,780,192 symbol_table::compile() [clone .part.53] (1 x) [ 9] 157,695,780,213 symbol_table::compile() (1 x) [10] 163,407,638,386 lto_main() (1 x) [11] 163,407,638,419 compile_file() (1 x) [12] 163,421,626,146 toplev::main(int, char**) (1 x) [13] 163,421,626,164 main (1 x) [14] 163,421,630,096 generic_start_main.isra.0 (1 x) [15] 163,421,630,244 (below main) (1 x) [16] 163,421,632,780 0x0000000010f23930 (1 x) [17] 163,421,632,786 0x000000001012f5a0 (1 x) [18] 163,421,632,794 _start (1 x) [19] 163,421,634,426 _dl_start_user (1 x) [20] . _start ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (4 preceding siblings ...) 2015-01-22 7:56 ` trippels at gcc dot gnu.org @ 2015-01-22 18:06 ` dje at gcc dot gnu.org 2015-01-23 10:11 ` trippels at gcc dot gnu.org ` (6 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: dje at gcc dot gnu.org @ 2015-01-22 18:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 David Edelsohn <dje at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-22 CC| |dje at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #7 from David Edelsohn <dje at gcc dot gnu.org> --- Confirmed. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (5 preceding siblings ...) 2015-01-22 18:06 ` dje at gcc dot gnu.org @ 2015-01-23 10:11 ` trippels at gcc dot gnu.org 2015-01-23 11:56 ` trippels at gcc dot gnu.org ` (5 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-23 10:11 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- The issue is also reproducible with an --enable-checking=release compiler. The following command reproduces the issue using r220030 on gcc110: /home/trippels/gcc_5/usr/local/bin/../libexec/gcc/powerpc64-unknown-linux-gnu/5.0.0/lto1 -quiet -dumpbase libxul.so.ltrans7.o -mcpu=power7 -auxbase-strip /dev/null -O3 -version -fPIC -fno-exceptions -fltrans /var/tmp/libxul.so.ltrans7.o -o /dev/null ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (6 preceding siblings ...) 2015-01-23 10:11 ` trippels at gcc dot gnu.org @ 2015-01-23 11:56 ` trippels at gcc dot gnu.org 2015-01-23 13:15 ` trippels at gcc dot gnu.org ` (4 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-23 11:56 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #9 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (gdb) bt #0 0x0000000010a64660 in compute_vrsave_mask () at ../../gcc/gcc/config/rs6000/rs6000.c:21149 #1 rs6000_stack_info () at ../../gcc/gcc/config/rs6000/rs6000.c:21686 #2 0x0000000010a65694 in rs6000_output_function_prologue (file=0x114a5800, size=<optimized out>) at ../../gcc/gcc/config/rs6000/rs6000.c:24284 #3 0x0000000010320300 in final_start_function (first=<optimized out>, file=0x114a5800, optimize_p=<optimized out>) at ../../gcc/gcc/final.c:1881 #4 0x0000000010a3cc88 in rs6000_output_mi_thunk (file=0x114a5800, thunk_fndecl=<optimized out>, delta=<optimized out>, vcall_offset=<optimized out>, function=<optimized out>) at ../../gcc/gcc/config/rs6000/rs6000.c:25807 #5 0x000000001020f5b4 in cgraph_node::expand_thunk (this=this@entry=0xcbb3390, output_asm_thunks=output_asm_thunks@entry=true, force_gimple_thunk=force_gimple_thunk@entry=false) at ../../gcc/gcc/cgraphunit.c:1528 #6 0x0000000010210814 in cgraph_node::assemble_thunks_and_aliases (this=this@entry=0xcbb3200) at ../../gcc/gcc/cgraphunit.c:1742 #7 0x000000001021079c in cgraph_node::assemble_thunks_and_aliases (this=this@entry=0xcbb23f0) at ../../gcc/gcc/cgraphunit.c:1758 #8 0x0000000010210b04 in cgraph_node::expand (this=this@entry=0xcbb23f0) at ../../gcc/gcc/cgraphunit.c:1867 #9 0x00000000102128d8 in expand_all_functions () at ../../gcc/gcc/cgraphunit.c:1940 #10 symbol_table::compile (this=0xa8100a8) at ../../gcc/gcc/cgraphunit.c:2293 #11 0x000000001015b9a0 in lto_main () at ../../gcc/gcc/lto/lto.c:3457 #12 0x00000000106bc94c in compile_file () at ../../gcc/gcc/toplev.c:594 #13 0x00000000101262a8 in do_compile () at ../../gcc/gcc/toplev.c:2047 #14 toplev::main (this=<optimized out>, argc=15, argv=0xfff00ead8) at ../../gcc/gcc/toplev.c:2144 #15 0x0000000010126c7c in main (argc=<optimized out>, argv=0xfff00ead8) at ../../gcc/gcc/main.c:38 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (7 preceding siblings ...) 2015-01-23 11:56 ` trippels at gcc dot gnu.org @ 2015-01-23 13:15 ` trippels at gcc dot gnu.org 2015-01-30 5:36 ` segher at gcc dot gnu.org ` (3 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-23 13:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Created attachment 34552 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34552&action=edit callgrind_annotate output Output of "callgrind_annotate --tree=both callgrind.out.47690 >| out" is attached. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (8 preceding siblings ...) 2015-01-23 13:15 ` trippels at gcc dot gnu.org @ 2015-01-30 5:36 ` segher at gcc dot gnu.org 2015-01-30 6:38 ` trippels at gcc dot gnu.org ` (2 subsequent siblings) 12 siblings, 0 replies; 14+ messages in thread From: segher at gcc dot gnu.org @ 2015-01-30 5:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Fri Jan 30 05:35:52 2015 New Revision: 220272 URL: https://gcc.gnu.org/viewcvs?rev=220272&root=gcc&view=rev Log: PR target/64580 * config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order. (rs6000_stack_info): Add assert. (rs6000_output_savres_externs): New function, split off from... (rs6000_output_function_prologue): ... here. Do not call it for thunks. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (9 preceding siblings ...) 2015-01-30 5:36 ` segher at gcc dot gnu.org @ 2015-01-30 6:38 ` trippels at gcc dot gnu.org 2015-02-05 15:02 ` segher at gcc dot gnu.org 2015-02-05 15:07 ` segher at gcc dot gnu.org 12 siblings, 0 replies; 14+ messages in thread From: trippels at gcc dot gnu.org @ 2015-01-30 6:38 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #12 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Fixed for gcc-5. Many thanks. I'll leave this bug open for possible backports. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (10 preceding siblings ...) 2015-01-30 6:38 ` trippels at gcc dot gnu.org @ 2015-02-05 15:02 ` segher at gcc dot gnu.org 2015-02-05 15:07 ` segher at gcc dot gnu.org 12 siblings, 0 replies; 14+ messages in thread From: segher at gcc dot gnu.org @ 2015-02-05 15:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #13 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Thu Feb 5 15:01:49 2015 New Revision: 220453 URL: https://gcc.gnu.org/viewcvs?rev=220453&root=gcc&view=rev Log: PR target/64580 Backport from mainline * config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order. (rs6000_stack_info): Add assert. (rs6000_output_savres_externs): New function, split off from... (rs6000_output_function_prologue): ... here. Do not call it for thunks. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.c ^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/64580] very high rs6000_stack_info() usage during LTO Firefox build on ppc64 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org ` (11 preceding siblings ...) 2015-02-05 15:02 ` segher at gcc dot gnu.org @ 2015-02-05 15:07 ` segher at gcc dot gnu.org 12 siblings, 0 replies; 14+ messages in thread From: segher at gcc dot gnu.org @ 2015-02-05 15:07 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64580 --- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Thu Feb 5 15:06:40 2015 New Revision: 220454 URL: https://gcc.gnu.org/viewcvs?rev=220454&root=gcc&view=rev Log: PR target/64580 Backport from mainline * config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order. (rs6000_stack_info): Add assert. (rs6000_output_savres_externs): New function, split off from... (rs6000_output_function_prologue): ... here. Do not call it for thunks. Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/config/rs6000/rs6000.c ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-02-05 15:07 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-13 11:31 [Bug target/64580] New: very high rs6000_stack_info() usage during LTO Firefox build on ppc64 trippels at gcc dot gnu.org 2015-01-18 17:34 ` [Bug target/64580] " segher at gcc dot gnu.org 2015-01-19 14:04 ` trippels at gcc dot gnu.org 2015-01-22 0:30 ` segher at gcc dot gnu.org 2015-01-22 7:20 ` trippels at gcc dot gnu.org 2015-01-22 7:56 ` trippels at gcc dot gnu.org 2015-01-22 18:06 ` dje at gcc dot gnu.org 2015-01-23 10:11 ` trippels at gcc dot gnu.org 2015-01-23 11:56 ` trippels at gcc dot gnu.org 2015-01-23 13:15 ` trippels at gcc dot gnu.org 2015-01-30 5:36 ` segher at gcc dot gnu.org 2015-01-30 6:38 ` trippels at gcc dot gnu.org 2015-02-05 15:02 ` segher at gcc dot gnu.org 2015-02-05 15:07 ` segher at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).