aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-06-10 14:48:37 +0200
committerPatrik Nyblom <[email protected]>2013-06-10 17:59:34 +0200
commit6318211b480cec0b74170d4db962e7e9b374f895 (patch)
treeec6560faa46d1c66c45f254c18f0a7fccab339ec /erts
parent2b4707d10b6ea5656242f5ae8506969c921ac841 (diff)
downloadotp-6318211b480cec0b74170d4db962e7e9b374f895.tar.gz
otp-6318211b480cec0b74170d4db962e7e9b374f895.tar.bz2
otp-6318211b480cec0b74170d4db962e7e9b374f895.zip
term_to_binary: Remove debug code and set production trap levels
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_gc.c3
-rw-r--r--erts/emulator/beam/external.c11
2 files changed, 6 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 7b463958d2..8ba94d89e9 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -1969,9 +1969,6 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset)
* in the process_structure.
*/
if (p->extra_root != NULL) {
-#ifdef HARDDEBUG
- erts_fprintf(stderr,"GC with extra root 0x%xl\n", p->extra_root->objv);
-#endif
roots[n].v = p->extra_root->objv;
roots[n].sz = p->extra_root->sz;
++n;
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index de2aacfa7b..45025ad631 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -1469,12 +1469,13 @@ erts_term_to_binary(Process* p, Eterm Term, int level, Uint flags) {
return erts_term_to_binary_simple(p, Term, size, level, flags);
}
-#define EXTREME_TTB_TRAPPING 1
+/* Define for testing */
+/* #define EXTREME_TTB_TRAPPING 1 */
#ifndef EXTREME_TTB_TRAPPING
-#define TERM_TO_BINARY_LOOP_FACTOR 10
-#define TERM_TO_BINARY_SIZE_FACTOR 10000
-#define TERM_TO_BINARY_COMPRESS_CHUNK 10000
+#define TERM_TO_BINARY_LOOP_FACTOR 500
+#define TERM_TO_BINARY_SIZE_FACTOR 500000
+#define TERM_TO_BINARY_COMPRESS_CHUNK 500000
#else
#define TERM_TO_BINARY_LOOP_FACTOR 1
#define TERM_TO_BINARY_SIZE_FACTOR 10
@@ -1556,7 +1557,7 @@ static Eterm erts_term_to_binary_int(Process* p, Eterm Term, int level, Uint fla
#ifndef EXTREME_TTB_TRAPPING
Sint reds = (Sint) (ERTS_BIF_REDS_LEFT(p) * TERM_TO_BINARY_LOOP_FACTOR);
#else
- Sint reds = 20; /* XXX */
+ Sint reds = 20; /* For testing */
#endif
Sint initial_reds = reds;
TTBContext c_buff;