[erlang-questions] initial target system, code:is_module_native() says false for native modules

Marc Sugiyama <>
Fri Dec 5 20:26:26 CET 2008


I'm trying to figure out if my code is running in native mode (hipe).

I've compiled the .erls using -smp +native.  When I load the modules
manually in the erl shell with l(), or start the application from the
shell using application:start(), code:is_module_native() for a module
in the application returns true.

If I build an initial target system for my application using the same
.beam files and start it, code:is_module_native() on modules in the
application returns false.  If I manually load the same modules with
l() in initial target system, code:is_module_native() then returns
true.

>From my performance benchmarks, I'm pretty sure that the application
running in the initial target system is using native mode code on
initial startup, but I'd feel more assured if code:is_module_native()
also returned true.  This would certainly make it easier to tell if
the build was done properly.

Is there something special I should be doing when I create the initial
target system with native .beam files?  Is code:is_module_native()
returning the wrong value for initial target systems?



More information about the erlang-questions mailing list