<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">What does code:is_module_native(lists)
      say?<br>
      <br>
      /Sverker<br>
      <br>
      <br>
      On 04/02/2014 08:11 PM, Adrian Roe wrote:<br>
    </div>
    <blockquote cite="mid:1E378C75002143A194B7F481F447BAE8@gmail.com"
      type="cite">
      <pre wrap="">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:

</pre>
      <blockquote type="cite">
        <pre wrap="">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"}]}]
</pre>
      </blockquote>
      <pre wrap="">
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

Adrian
--  
Dr Adrian Roe
Director


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>