Skip to content

Commit 4bb4b96

Browse files
authored
flambda-backend: Silence the debug runtime by default (runtime5 only) (#2195)
1 parent 34ef567 commit 4bb4b96

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

runtime/startup_aux.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ static void init_startup_params(void)
5757
params.runtime_events_log_wsize = Default_runtime_events_log_wsize;
5858

5959
#ifdef DEBUG
60-
atomic_store_relaxed(&caml_verb_gc, 0x3F);
60+
// Silenced in flambda-backend to make it easier to run tests that
61+
// check program output.
62+
// atomic_store_relaxed(&caml_verb_gc, 0x3F);
6163
#endif
6264
#ifndef NATIVE_CODE
6365
cds_file = caml_secure_getenv(T("CAML_DEBUG_FILE"));

runtime/startup_byt.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,9 @@ CAMLexport void caml_main(char_os **argv)
468468
caml_parse_ocamlrunparam();
469469

470470
#ifdef DEBUG
471-
caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
471+
// Silenced in flambda-backend to make it easier to run tests that
472+
// check program output.
473+
// caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
472474
#endif
473475
if (!caml_startup_aux(/* pooling */ caml_params->cleanup_on_exit))
474476
return;
@@ -609,7 +611,9 @@ CAMLexport value caml_startup_code_exn(
609611
caml_parse_ocamlrunparam();
610612

611613
#ifdef DEBUG
612-
caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
614+
// Silenced in flambda-backend to make it easier to run tests that
615+
// check program output.
616+
// caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
613617
#endif
614618
if (caml_params->cleanup_on_exit)
615619
pooling = 1;

runtime/startup_nat.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ value caml_startup_common(char_os **argv, int pooling)
9494
caml_parse_ocamlrunparam();
9595

9696
#ifdef DEBUG
97-
caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
97+
// Silenced in flambda-backend to make it easier to run tests that
98+
// check program output.
99+
// caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
98100
#endif
99101
if (caml_params->cleanup_on_exit)
100102
pooling = 1;

0 commit comments

Comments
 (0)