aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erts_code_purger.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-01-12 16:57:59 +0100
committerSverker Eriksson <[email protected]>2016-01-13 19:59:54 +0100
commit4c763443365591e170308a1c5f11a4586734ca4e (patch)
tree2cb663b23541827d3eebf19a582686de6c535cf9 /erts/preloaded/src/erts_code_purger.erl
parenta4920dc4045f394f6f4ab1cc89d54d55722a66d6 (diff)
downloadotp-4c763443365591e170308a1c5f11a4586734ca4e.tar.gz
otp-4c763443365591e170308a1c5f11a4586734ca4e.tar.bz2
otp-4c763443365591e170308a1c5f11a4586734ca4e.zip
erts: Optimize erlang:check_process_code
by ignoring literals. erts_internal:check_process_code will be called again anyway (with option {copy_literals, true}) before the module is actually purged. No need to check literals twice.
Diffstat (limited to 'erts/preloaded/src/erts_code_purger.erl')
-rw-r--r--erts/preloaded/src/erts_code_purger.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/preloaded/src/erts_code_purger.erl b/erts/preloaded/src/erts_code_purger.erl
index 791ef72f13..e492ba1812 100644
--- a/erts/preloaded/src/erts_code_purger.erl
+++ b/erts/preloaded/src/erts_code_purger.erl
@@ -283,8 +283,9 @@ cpc_sched_kill(Pid,
killed = true}.
cpc_request(#cpc_static{tag = Tag, module = Mod}, Pid, AllowGc) ->
- erlang:check_process_code(Pid, Mod, [{async, {Tag, Pid, AllowGc}},
- {allow_gc, AllowGc}]).
+ erts_internal:check_process_code(Pid, Mod, [{async, {Tag, Pid, AllowGc}},
+ {allow_gc, AllowGc},
+ {copy_literals, true}]).
cpc_request_gc(CpcS, [Pid|Pids]) ->
cpc_request(CpcS, Pid, true),