[erlang-questions] Building / releasing with HIPE / native

Adrian Roe roe.adrian@REDACTED
Wed Apr 2 20:11:54 CEST 2014

We’ve been using Erlang in production for quite a few years now and for the first time we have a project that really benefits from HIPE / native code being turned on (before things have always been fast enough without and the benefit of more detailed stack traces etc outweighed any performance gains).  We did some benchmarking by compiling single modules with HIPE - both in our application code and then going through key OTP / Erlang library modules, clearing sticky_directory errors and recompiling them one by one with +native.

Now that it is clear that (for this use case) native / HIPE is the way to go, I went to the project’s build box and recompiled Erlang (R16B03) from source with  

./configure --enable-hipe --enable-native-libs
in the expectation that all libraries would be compiled with +native

Checking (for example) lists.beam gives:

> Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
> Eshell V5.10.4  (abort with ^G)
> 1> lists:module_info().
> [{exports,[{append,2},
>            {append,1},
>            {subtract,2},
>            {nth,2},
>            {nthtail,2},
>            {prefix,2},
>            {suffix,2},
>            {last,1},
>            {seq,2},
>            {seq,3},
>            {sum,1},
>            {duplicate,2},
>            {min,1},
>            {max,1},
>            {sublist,3},
>            {sublist,2},
>            {zip,2},
>            {zip3,3},
>            {unzip3,1},
>            {zipwith,3},
>            {zipwith3,4},
>            {merge,1},
>            {merge3,3},
>            {rmerge3,3},
>            {merge,...},
>            {...}|...]},
>  {imports,[]},
>  {attributes,[{vsn,[329984570326751442388870353176450263952]}]},
>  {compile,[{options,[{outdir,"/net/isildur/ldisk/daily_build/r16b03_prebuild_opu_o.2013-12-09_20/otp_src_R16B03/lib/stdlib/src/../ebin"},
>                      {i,"/net/isildur/ldisk/daily_build/r16b03_prebuild_opu_o.2013-12-09_20/otp_src_R16B03/lib/stdlib/src/../include"},
>                      {i,"/net/isildur/ldisk/daily_build/r16b03_prebuild_opu_o.2013-12-09_20/otp_src_R16B03/lib/stdlib/src/../../kernel/include"},
>                      warnings_as_errors,debug_info]},
>            {version,"4.9.3"},
>            {time,{2013,12,9,19,26,33}},
>            {source,"/net/isildur/ldisk/daily_build/r16b03_prebuild_opu_o.2013-12-09_20/otp_src_R16B03/lib/stdlib/src/lists.erl"}]}]

No sign of native anywhere…

I’ve tried this on OSX, CentOS and Ubuntu all with the same result, so it’s clearly me doing something stupid, but I can’t see it.

I obviously could go through and rebuild each module in turn (as we did for the benchmarking) but it doesn’t feel like the right way forward.  

Any suggestions gratefully received!

Kind regards

Dr Adrian Roe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140402/e4e8eda7/attachment.htm>

More information about the erlang-questions mailing list