diff options
author | Kjell Winblad <[email protected]> | 2019-04-18 11:33:56 +0200 |
---|---|---|
committer | Kjell Winblad <[email protected]> | 2019-04-18 13:27:20 +0200 |
commit | 57905f018f7710ce8951bda2dc24cd4f87c8e488 (patch) | |
tree | 1b636412f9583fe48519783e724c746133c7227f /erts/emulator/beam/erl_bif_info.c | |
parent | c4484ca7754a98c0f7d31ab945f1d18881b0d5be (diff) | |
download | otp-57905f018f7710ce8951bda2dc24cd4f87c8e488.tar.gz otp-57905f018f7710ce8951bda2dc24cd4f87c8e488.tar.bz2 otp-57905f018f7710ce8951bda2dc24cd4f87c8e488.zip |
Fix broken ETS test case
This commit fixes an ETS test case that tests the decentralized memory
counter in tables of type ordered_set with the write_concurrency
option turned on. The test case assumed that the memory consumption of
the table would only grow monotonically when terms are
inserted. However, this was not the case when the emulator was
compiled in debug mode as random splits and joins of CA tree nodes
could happen. This commit fixes the test case by disabling random
splits and joins in the tested table.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 7ff345a54b..c3d0ea40f6 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -4693,6 +4693,14 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2) BIF_RET(am_ok); } } + else if (ERTS_IS_ATOM_STR("ets_debug_random_split_join", BIF_ARG_1)) { + if (is_tuple(BIF_ARG_2)) { + Eterm* tpl = tuple_val(BIF_ARG_2); + + if (erts_ets_debug_random_split_join(tpl[1], tpl[2] == am_true)) + BIF_RET(am_ok); + } + } else if (ERTS_IS_ATOM_STR("mbuf", BIF_ARG_1)) { Uint sz = size_object(BIF_ARG_2); ErlHeapFragment* frag = new_message_buffer(sz); |