aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-04-21 16:37:16 +0200
committerBjörn Gustavsson <[email protected]>2010-05-17 15:51:49 +0200
commite27516edd537045e1151dc8a95c821ba18aadf4f (patch)
tree438df7f9948785067dd9d4e7fa246a7fe0464ff4 /erts/emulator/beam/erl_bif_info.c
parentf06f499690ef1f5c8659128095a82d6c9b834d68 (diff)
downloadotp-e27516edd537045e1151dc8a95c821ba18aadf4f.tar.gz
otp-e27516edd537045e1151dc8a95c821ba18aadf4f.tar.bz2
otp-e27516edd537045e1151dc8a95c821ba18aadf4f.zip
Count reductions for process even when not trapping
Set loop factors to 10. Teach erts_debug:set_internal_state to limit loop factor for binary. Add random tests for matches and match with multiple searchstrings.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 18cb09d8cd..de60ca49fa 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -3567,6 +3567,17 @@ BIF_RETTYPE erts_debug_set_internal_state_2(BIF_ALIST_2)
}
}
}
+ else if (ERTS_IS_ATOM_STR("binary_loop_limit", BIF_ARG_1)) {
+ /* Used by binary_module_SUITE (stdlib) */
+ Uint max_loops;
+ if (is_atom(BIF_ARG_2) && ERTS_IS_ATOM_STR("default", BIF_ARG_2)) {
+ max_loops = erts_binary_set_loop_limit(-1);
+ BIF_RET(make_small(max_loops));
+ } else if (term_to_Uint(BIF_ARG_2, &max_loops) != 0) {
+ max_loops = erts_binary_set_loop_limit(max_loops);
+ BIF_RET(make_small(max_loops));
+ }
+ }
else if (ERTS_IS_ATOM_STR("re_loop_limit", BIF_ARG_1)) {
/* Used by re_SUITE (stdlib) */
Uint max_loops;