aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-11-08 10:17:48 +0100
committerErlang/OTP <[email protected]>2016-11-08 10:17:48 +0100
commit037aa32b27f37fede544ffc14a5b8e8867b459e3 (patch)
tree054e96d08d93391c108dfc75fd899bb9a3e72cc8
parent946d95deaf7052da763e61ecf3c8afc7a00f8453 (diff)
parent6082a673b0e8982b7d3856c107e7265b381ede06 (diff)
downloadotp-037aa32b27f37fede544ffc14a5b8e8867b459e3.tar.gz
otp-037aa32b27f37fede544ffc14a5b8e8867b459e3.tar.bz2
otp-037aa32b27f37fede544ffc14a5b8e8867b459e3.zip
Merge branch 'bjorn/erts/erl_prim_loader/OTP-14009' into maint-19
* bjorn/erts/erl_prim_loader/OTP-14009: Update preloaded modules Fix performance bug in erl_prim_loader:get_modules/{2,3}
-rw-r--r--erts/preloaded/ebin/erl_prim_loader.beambin55752 -> 55804 bytes
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl23
2 files changed, 12 insertions, 11 deletions
diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam
index 796cbd74c5..64d1a70e61 100644
--- a/erts/preloaded/ebin/erl_prim_loader.beam
+++ b/erts/preloaded/ebin/erl_prim_loader.beam
Binary files differ
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index b3ec73a60e..1d09aeded9 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -555,17 +555,18 @@ efile_gm_get(Paths, Mod, ParentRef, Process) ->
efile_gm_get_1([P|Ps], File0, Mod, {Parent,Ref}=PR, Process) ->
File = join(P, File0),
- Res = try prim_file:read_file(File) of
- {ok,Bin} ->
- gm_process(Mod, File, Bin, Process);
- Error ->
- _ = check_file_result(get_modules, File, Error),
- efile_gm_get_1(Ps, File0, Mod, PR, Process)
- catch
- _:Reason ->
- {error,{crash,Reason}}
- end,
- Parent ! {Ref,Mod,Res};
+ try prim_file:read_file(File) of
+ {ok,Bin} ->
+ Res = gm_process(Mod, File, Bin, Process),
+ Parent ! {Ref,Mod,Res};
+ Error ->
+ _ = check_file_result(get_modules, File, Error),
+ efile_gm_get_1(Ps, File0, Mod, PR, Process)
+ catch
+ _:Reason ->
+ Res = {error,{crash,Reason}},
+ Parent ! {Ref,Mod,Res}
+ end;
efile_gm_get_1([], _, Mod, {Parent,Ref}, _Process) ->
Parent ! {Ref,Mod,{error,enoent}}.