[cfe-dev] computed goto/labels as values in interpreters

Carsten Mattner carstenmattner at gmail.com
Tue Sep 18 07:27:39 PDT 2012


On Tue, Sep 18, 2012 at 4:24 PM, Carsten Mattner
<carstenmattner at gmail.com> wrote:
> On Tue, Sep 18, 2012 at 3:01 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
>>> I can try picking likely files and confirm they're such.
>>> That wouldn't mean it's the only files. Would that help?
>>> Is it important to compare compile and link steps?
>>> If it is I'd have to see how I can measure it without messing
>>> around too much.
>>
>> It should help yes. Even if there are multiple problems, fixing one
>> makes it easy to isolate others. I would suggest starting with the
>> file clang takes the longest to compile relative to gcc.
>>
>> Cheers,
>> Rafael
>
> With no MAKEFLAGS set and in the trees configured and already built
> as described in my earlier email:
>
> $ cd otp/gcc
> $ export ERL_TOP=$PWD
> $ export PATH=$ERL_TOP/bin:$PATH
> $ cd erts
> $ touch emulator/beam/beam_emu.c
> $ /usr/bin/time make
> 11.09user 0.83system 0:18.99elapsed 62%CPU (0avgtext+0avgdata 63448maxresident)k
> 89712inputs+37832outputs (124major+265927minor)pagefaults 0swaps
> $ cd ../lib/wx
> $ touch c_src/*.c* c_src/gen/*.c* && /usr/bin/time make
> 113.29user 6.28system 2:00.54elapsed 99%CPU (0avgtext+0avgdata
> 623272maxresident)k
> 0inputs+38112outputs (0major+1684363minor)pagefaults 0swaps
>
> # new shell
> $ cd otp/clang
> $ export ERL_TOP=$PWD
> $ export PATH=$ERL_TOP/bin:$PATH
> # even though it's all set to clang and clang++ from the ./configure step,
> # let's make sure the we have the same environment configured
> $ export CC=clang
> $ export CXX=clang++
> $ cd erts
> $ touch emulator/beam/beam_emu.c
> $ /usr/bin/time make
> 270.64user 0.96system 4:42.57elapsed 96%CPU (0avgtext+0avgdata
> 164248maxresident)k
> 118008inputs+26656outputs (298major+284692minor)pagefaults 0swaps
> $ cd ../lib/wx
> $ touch c_src/*.c* c_src/gen/*.c* && /usr/bin/time make
> # c_src/gen/wxe_funcs.cpp is generated code and seems to infinite loop
> on compile
> # killed the make process after about 32mins of trying to build wxe_funcs.cpp
> ^Cmake[1]: *** [i686-pc-linux-gnu/wxe_funcs.o] Interrupt
> make: *** [opt] Interrupt
> Command terminated by signal 2
> 8.65user 0.56system 33:25.77elapsed 0%CPU (0avgtext+0avgdata 63860maxresident)k
> 48inputs+4104outputs (0major+177432minor)pagefaults 0swaps
>
> excerpt from top for the offending clang invocation before killing:
> PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
> 20   0  339m 314m  21m R  99.8 15.8  32:44.97 clang

llvm/clang is a fresh build from last night just after the compile fix
in projects/compiler-rt was committed:
$ clang -v
clang version 3.2 (http://llvm.org/git/clang.git
6defd9f31eec51278d056f1bff885018e2321373)
(http://llvm.org/git/llvm.git ff1547890a5af47c215bf7e1f1da85bae6aabe4d)
Target: i386-pc-linux-gnu
Thread model: posix




More information about the cfe-dev mailing list