diff options
author | Henrik Nord <[email protected]> | 2015-06-10 12:51:38 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-06-10 12:52:05 +0200 |
commit | 355f4b567baf84c9ec3f61f70eaf64ff20500fd5 (patch) | |
tree | 670f51ed71560760ec678d05bc22647d173b348a /lib/kernel/src/code.erl | |
parent | 30630e1c2cd3f754c30a9099b223cf364bfd368e (diff) | |
parent | 060c80ea732b30d8f52ca8cab36c16d7af54a799 (diff) | |
download | otp-355f4b567baf84c9ec3f61f70eaf64ff20500fd5.tar.gz otp-355f4b567baf84c9ec3f61f70eaf64ff20500fd5.tar.bz2 otp-355f4b567baf84c9ec3f61f70eaf64ff20500fd5.zip |
Merge branch 'richcarl/avoid-try-native-load'
* richcarl/avoid-try-native-load:
Update list of funcalls in kernel code_SUITE
Move architecture knowledge out of hipe loader
Avoid repeated calls to system_info in hipe loader
Avoid exception overhead if HiPE is disabled
HiPE help shouldn't modify the calling process
OTP-12816
Diffstat (limited to 'lib/kernel/src/code.erl')
-rw-r--r-- | lib/kernel/src/code.erl | 9 |
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(), |