[Bug middle-end/63155] [6/7/8 Regression] memory hog

rogerio.souza at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 4 20:57:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63155

--- Comment #35 from Rogério de Souza Moraes <rogerio.souza at gmail dot com> ---
Created attachment 44791
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44791&action=edit
Small testcase more similar to original environment

Hi Richard,

this is a new testcase, based on another file in the original environment. It’s
quite small (7000 lines, 240 setjmp calls).

This code with a little complex but still simplified control structure
represents state machine implementation, which is very widely used by our
customers. Another new factor is the nested setjmp calls. Of course, original
testcase is more complex and takes even more time with more difference.

You can run it using the following commands:


time gcc -DGCC -DLINUX_C -D_GLIBCXX_USE_CXX11_ABI=0  -m32 -m32 -w -c -O0
-pedantic -fwrapv -mstackrealign -mpreferred-stack-boundary=4
gcc_2nd_synth_pure_c_item.c -o gcc_2nd_synth_pure_c_item.o

time gcc -DGCC -DLINUX_C -D_GLIBCXX_USE_CXX11_ABI=0  -m32 -m32 -w -c -O
-pedantic -fwrapv -mstackrealign -mpreferred-stack-boundary=4
gcc_2nd_synth_pure_c_item.c -o gcc_2nd_synth_pure_c_item.o


Results :

GCC: 4.8.5 (From RHEL 7.5)

real    0m0.349s
user    0m0.255s
sys     0m0.083s

real    0m0.193s
user    0m0.163s
sys     0m0.023s

GCC: 6.3.0 (GCC 6.3.0 with Revision 264523 backported and applied to it)

real    0m32.235s
user    0m30.486s
sys     0m1.622s

real    3m34.203s
user    3m33.726s
sys     0m0.292s

The performance difference is relevant in this test.

Regards,
--
Rogerio


More information about the Gcc-bugs mailing list