diff options
author | Nikolaos S. Papaspyrou <[email protected]> | 2012-06-08 23:13:50 +0300 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-11-17 14:33:12 +0100 |
commit | d5711cb70be9ad2e5c78839e8a368900ba248a4a (patch) | |
tree | 528f53ad5add94327611f0ac5aa3e8aa36405f9f /erts/emulator/beam/erl_gc.c | |
parent | dad527f55b51d60e75a0d19aa0f4f42c1065777f (diff) | |
download | otp-d5711cb70be9ad2e5c78839e8a368900ba248a4a.tar.gz otp-d5711cb70be9ad2e5c78839e8a368900ba248a4a.tar.bz2 otp-d5711cb70be9ad2e5c78839e8a368900ba248a4a.zip |
Add all the main machinery
Add functions size_shared, copy_shared_calculate and copy_shared_perform.
Add the infrastructure for making these communicate with each other.
Add debug information to other places in the VM, to watch interaction
with the sharing-preserving copy.
CAUTION: If you define the SHCOPY_DEBUG macro (after SHCOPY is actually
used in the VM) and make the whole OTP, there will be a lot of debugging
messages during make (it will also be enabled in erlc). You have been
warned...
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 6cb37752bc..ec96a7563a 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -42,6 +42,8 @@ #include "dtrace-wrapper.h" #include "erl_bif_unique.h" +#undef SHCOPY_DEBUG + #define ERTS_INACT_WR_PB_LEAVE_MUCH_LIMIT 1 #define ERTS_INACT_WR_PB_LEAVE_MUCH_PERCENTAGE 20 #define ERTS_INACT_WR_PB_LEAVE_LIMIT 10 @@ -1166,6 +1168,10 @@ do_minor(Process *p, ErlHeapFragment *live_hf_end, char* oh = (char *) OLD_HEAP(p); Uint oh_size = (char *) OLD_HTOP(p) - oh; +#ifdef SHCOPY_DEBUG + VERBOSE_DEBUG("[pid=%T] MINOR GC: %p %p %p %p\n", p->common.id, HEAP_START(p), HEAP_END(p), OLD_HEAP(p), OLD_HEND(p)); +#endif + n_htop = n_heap = (Eterm*) ERTS_HEAP_ALLOC(ERTS_ALC_T_HEAP, sizeof(Eterm)*new_sz); @@ -1383,6 +1389,10 @@ major_collection(Process* p, ErlHeapFragment *live_hf_end, Uint new_sz, stk_sz; int adjusted; +#ifdef SHCOPY_DEBUG + VERBOSE_DEBUG("[pid=%T] MAJOR GC: %p %p %p %p\n", p->common.id, HEAP_START(p), HEAP_END(p), OLD_HEAP(p), OLD_HEND(p)); +#endif + /* * Do a fullsweep GC. First figure out the size of the heap * to receive all live data. |