Re: Minor issue: dialyzer on ARM: Compiling some key modules to native code => Illegal instruction (core dumped)
Robert Virding <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAH_GQaNy_qfmjQP5qX22UeNpcc_Sc3D-o4LkoY90GTjb88f1mg@mail.gmail.com> |
Wouldn't a generally better solution be to make the no_native the default and instead have to explicitly turn it on with a --native flag? I have found I unless I am checking very many files it usually goes faster to turn it off, at least when looking at the total time. Robert On 1 December 2014 at 14:58, Kostis Sagonas <[email protected]> wrote: > On 12/01/2014 10:42 AM, Mikael Pettersson wrote: > >> Background: ARM processors typically support two related but different >> instruction sets and execution modes: ARM (the ordinary one) and Thumb >> (an alternative one which offers higher code density at the expense of >> lower performance). With ARMv7, the Thumb mode has been improved and >> some environments make it the default. >> ... >> It's possible to work around this problem by forcing the VM to be >> compiled in ARM mode (by adding "-marm" to CFLAGS). I prepared a >> patch to do that, and it fixed the problem on Mattias' system. >> >> Since changing the compilation mode may or may not be what the >> user or system builder intended, I'm reluctant to do this silently. >> Therefore I'm considering removing the auto-enable of HiPE on ARM. >> Users will have to explicitly enable HiPE, and accept that BEAM will >> be in ARM mode not Thumb. >> > > I do not have a strong opinion but, from what you are describing and from > some googling on ARM vs thumb on the internet, it seems to me that adding > -marm to the CFLAGS will result in BEAM itself executing faster (or at > least not slower than with thumb), and the main advantage of the Thumb mode > is in better memory (i-cache?) utilization. I am not sure why some > (recent?) C compilers make Thumb the default, but I guess it's because the > ARM processors are often used in embedded applications and they primarily > want to optimize for code size rather than speed. Not sure this is the > primary goal of Erlang developers who download and install Erlang/OTP and > e.g. want to run dialyzer (as Mattias) on that machine. > > So my current vote would go to add the -marm option anyway when building > BEAM, and leave HiPE enabled by default on that platform too. Erlang > developers who are primarily interested in the memory benefits of the Thumb > mode can explicitly enable it with an appropriate flag which would also > disable HiPE then, at least until the following is fixed. > > It would be nice to investigate where the incorrect mode switch between > HiPE and BEAM is and eliminate this if it's not too much work. > > Kostis > > _______________________________________________ > erlang-bugs mailing list > [email protected] > http://erlang.org/mailman/listinfo/erlang-bugs > _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs