aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2015-04-29 15:19:50 +0200
committerRichard Carlsson <[email protected]>2015-06-04 10:27:20 +0200
commitc0912fe4220ba5352abd8250bb38d86382052607 (patch)
tree786972192ea981abf3b5c4dee239880bc76c0546
parentd0abddfacfbff3bf159eee8d998ad980f13bf92d (diff)
downloadotp-c0912fe4220ba5352abd8250bb38d86382052607.tar.gz
otp-c0912fe4220ba5352abd8250bb38d86382052607.tar.bz2
otp-c0912fe4220ba5352abd8250bb38d86382052607.zip
Avoid exception overhead if HiPE is disabled
-rw-r--r--lib/kernel/src/code.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index 65045666ec..580c070389 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.erl
@@ -339,7 +339,8 @@ do_start(Flags) ->
ok
end,
%% Quietly load native code for all modules loaded so far
- load_native_code_for_all_loaded(),
+ Architecture = erlang:system_info(hipe_architecture),
+ load_native_code_for_all_loaded(Architecture),
Ok2;
Other ->
Other
@@ -554,9 +555,9 @@ has_ext(Ext, Extlen, File) ->
%%% Silently load native code for all modules loaded so far.
%%%
--spec load_native_code_for_all_loaded() -> ok.
-load_native_code_for_all_loaded() ->
- Architecture = erlang:system_info(hipe_architecture),
+load_native_code_for_all_loaded(undefined) ->
+ ok;
+load_native_code_for_all_loaded(Architecture) ->
try hipe_unified_loader:chunk_name(Architecture) of
ChunkTag ->
Loaded = all_loaded(),