aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/erts_debug.erl
diff options
context:
space:
mode:
authorNikolaos S. Papaspyrou <[email protected]>2014-03-14 11:32:46 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-11-17 14:45:45 +0100
commit8d02ad60c88aa060ff83ff3179bc8c0ab66868ee (patch)
tree3368a591afaa2d23c9d7b38d70f80dc42785ccbb /lib/kernel/src/erts_debug.erl
parent7141fa8e4534ab7e4dcc3cad6c46872efa0e6e66 (diff)
downloadotp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.tar.gz
otp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.tar.bz2
otp-8d02ad60c88aa060ff83ff3179bc8c0ab66868ee.zip
Add machinery to enable SHCOPY dynamically
This commit is just for debugging purposes, will probably be reverted. It comes with a the erts_debug:copy_shared/1 BIF. If SHCOPY_DISABLE is defined, SHCOPY starts disabled and is dynamically enabled the first time that the BIF is called.
Diffstat (limited to 'lib/kernel/src/erts_debug.erl')
-rw-r--r--lib/kernel/src/erts_debug.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/kernel/src/erts_debug.erl b/lib/kernel/src/erts_debug.erl
index 5e1cc09e7d..87f001fdf4 100644
--- a/lib/kernel/src/erts_debug.erl
+++ b/lib/kernel/src/erts_debug.erl
@@ -35,7 +35,7 @@
dump_monitors/1, dump_links/1, flat_size/1,
get_internal_state/1, instructions/0, lock_counters/1,
map_info/1, same/2, set_internal_state/2,
- size_shared/1]).
+ size_shared/1, copy_shared/1]).
-spec breakpoint(MFA, Flag) -> non_neg_integer() when
MFA :: {Module :: module(),
@@ -93,6 +93,12 @@ flat_size(_) ->
size_shared(_) ->
erlang:nif_error(undef).
+-spec copy_shared(Term) -> term() when
+ Term :: term().
+
+copy_shared(_) ->
+ erlang:nif_error(undef).
+
-spec get_internal_state(W) -> term() when
W :: reds_left | node_and_dist_references | monitoring_nodes
| next_pid | 'DbTable_words' | check_io_debug