Skip to content

Commit

Permalink
Silence the debug runtime by default (runtime5 only) (#2195)
Browse files Browse the repository at this point in the history
(cherry picked from commit 50c77b2)
  • Loading branch information
mshinwell committed Dec 27, 2023
1 parent 253b3ca commit e5b2157
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ocaml/runtime/startup_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ static void init_startup_params(void)
params.runtime_events_log_wsize = Default_runtime_events_log_wsize;

#ifdef DEBUG
atomic_store_relaxed(&caml_verb_gc, 0x3F);
// Silenced in flambda-backend to make it easier to run tests that
// check program output.
// atomic_store_relaxed(&caml_verb_gc, 0x3F);
#endif
#ifndef NATIVE_CODE
cds_file = caml_secure_getenv(T("CAML_DEBUG_FILE"));
Expand Down
8 changes: 6 additions & 2 deletions ocaml/runtime/startup_byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ CAMLexport void caml_main(char_os **argv)
caml_parse_ocamlrunparam();

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

#ifdef DEBUG
caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
// Silenced in flambda-backend to make it easier to run tests that
// check program output.
// caml_gc_message (-1, "### OCaml runtime: debug mode ###\n");
#endif
if (caml_params->cleanup_on_exit)
pooling = 1;
Expand Down
4 changes: 3 additions & 1 deletion ocaml/runtime/startup_nat.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ value caml_startup_common(char_os **argv, int pooling)
caml_parse_ocamlrunparam();

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

0 comments on commit e5b2157

Please sign in to comment.