aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-01-17 20:00:49 +0100
committerSverker Eriksson <[email protected]>2018-01-17 20:00:49 +0100
commitd57d91427e1ddb09cbf55cac2014a368fe717b46 (patch)
tree472f228c23ba7bb03f32a91d05c4e6f2e7e50960 /lib
parent19b7ccfe076d88a96b62f3222f38be31bb087df2 (diff)
downloadotp-d57d91427e1ddb09cbf55cac2014a368fe717b46.tar.gz
otp-d57d91427e1ddb09cbf55cac2014a368fe717b46.tar.bz2
otp-d57d91427e1ddb09cbf55cac2014a368fe717b46.zip
Fix slow hipe execution
particularly slow erlc when compiler is hipe compiled. hipe_unified_loader:load did not patch external call sites and instead caused a double hipe mode switch per call. hipe_unified_loader:load is only used for early modules first loaded as beam and by code:atomic_load and friends.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index f4c7c277ed..f8199fcf71 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -236,9 +236,10 @@ load_common(Mod, Bin, Beam, Architecture) ->
lists:foreach(fun({FE, DestAddress}) ->
hipe_bifs:set_native_address_in_fe(FE, DestAddress)
end, erase(closures_to_patch)),
- ok = hipe_bifs:commit_patch_load(LoaderState),
set_beam_call_traps(FunDefs),
- ok;
+ export_funs(FunDefs),
+ ok = hipe_bifs:commit_patch_load(LoaderState),
+ ok;
BeamBinary when is_binary(BeamBinary) ->
%% Find all closures in the code.
[] = erase(closures_to_patch), %Clean up, assertion.