From 63e62426dc6dd4e45af6f89d99523d444c9aa73e Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Mon, 3 Jan 2022 11:17:38 -0600 Subject: [PATCH] Suppress debug output --- src/codegen.cpp | 8 ++++---- src/dump.c | 31 ++++++++++++++++--------------- src/ircode.c | 4 ++-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 44227be3f2992..f2964215bb44f 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -7447,10 +7447,10 @@ static std::pair, jl_llvm_functions_t> } } ctx.roots = NULL; - if (added) { - jl_printf(JL_STDOUT, "Increased roots from %d to %ld (external = %d) for ", rootslen, jl_array_len(m->roots), external); - jl_(m); - } + // if (added) { + // jl_printf(JL_STDOUT, "Increased roots from %d to %ld (external = %d) for ", rootslen, jl_array_len(m->roots), external); + // jl_(m); + // } if (added & external) { if (m->newrootsindex == INT32_MAX) { m->newrootsindex = rootslen; diff --git a/src/dump.c b/src/dump.c index e942313f1be02..03a501dcec699 100644 --- a/src/dump.c +++ b/src/dump.c @@ -724,8 +724,8 @@ static void jl_serialize_value_(jl_serializer_state *s, jl_value_t *v, int as_li int newrootsindex = m->newrootsindex; if (newrootsindex >= 0 && newrootsindex < INT32_MAX) { // newrootsindex marks the start of the new roots size_t i, l = jl_array_len(m->roots); - jl_printf(JL_STDOUT, "Serializing %ld new roots for ", l - newrootsindex); - jl_(m); + // jl_printf(JL_STDOUT, "Serializing %ld new roots for ", l - newrootsindex); + // jl_(m); write_int32(s->s, l - newrootsindex); for (i = newrootsindex; i < l; i++) { jl_serialize_value(s, (jl_value_t*)jl_array_ptr_ref(m->roots, i)); @@ -1632,15 +1632,15 @@ static jl_value_t *jl_deserialize_value_method_instance(jl_serializer_state *s, jl_methtable_t *mt = jl_method_get_table(m); assert((jl_value_t*)mt != jl_nothing); m = jl_lookup_method(mt, sig, m->module->primary_world); - jl_printf(JL_STDOUT, "Deserializing %d new roots for ", nroots); - jl_(m); + // jl_printf(JL_STDOUT, "Deserializing %d new roots for ", nroots); + // jl_(m); if (!m->roots) { m->roots = jl_alloc_vec_any(0); jl_gc_wb(m, m->roots); } m->newrootsindex = oldlen = jl_array_len(m->roots); jl_array_grow_end(m->roots, nroots); - jl_printf(JL_STDOUT, " (oldlen = %d, newlen = %ld)\n", oldlen, jl_array_len(m->roots)); + // jl_printf(JL_STDOUT, " (oldlen = %d, newlen = %ld)\n", oldlen, jl_array_len(m->roots)); jl_value_t **rootsdata = (jl_value_t**)jl_array_data(m->roots); for (i = 0; i < nroots; i++) { rootsdata[i+oldlen] = jl_deserialize_value(s, &(rootsdata[i+oldlen])); @@ -2332,8 +2332,8 @@ JL_DLLEXPORT int jl_save_incremental(const char *fname, jl_array_t *worklist) } JL_GC_PUSH2(&mod_array, &udeps); mod_array = jl_get_loaded_modules(); - jl_printf(JL_STDOUT, "Serializing "); - jl_(worklist); + // jl_printf(JL_STDOUT, "Serializing "); + // jl_(worklist); currently_serializing = 1; serializer_worklist = worklist; @@ -2408,18 +2408,18 @@ JL_DLLEXPORT int jl_save_incremental(const char *fname, jl_array_t *worklist) if (n_ext_mis != n_mis) jl_array_del_end(newly_inferred, n_mis - n_ext_mis); write_uint64(s.s, n_ext_mis); - jl_printf(JL_STDOUT, "Serializing %ld external MIs:\n", n_ext_mis); + // jl_printf(JL_STDOUT, "Serializing %ld external MIs:\n", n_ext_mis); // Serialize the extra MethodInstances currently_serializing = 2; for (i = 0; i < n_ext_mis; i++) { jl_method_instance_t *mi = (jl_method_instance_t*) newmis[i]; - jl_(mi); - size_t nroots = 0; + // jl_(mi); + // size_t nroots = 0; jl_method_t *m = mi->def.method; assert(jl_is_method(m)); - if (m->roots) - nroots = jl_array_len(m->roots); - jl_printf(JL_STDOUT, " method has %ld roots and newrootsindex is %d\n", nroots, mi->def.method->newrootsindex); + // if (m->roots) + // nroots = jl_array_len(m->roots); + // jl_printf(JL_STDOUT, " method has %ld roots and newrootsindex is %d\n", nroots, mi->def.method->newrootsindex); jl_serialize_value(&s, newmis[i]); } currently_serializing = 1; @@ -2646,6 +2646,7 @@ static void jl_recache_types(void) JL_GC_DISABLED } i += 2; } + // jl_printf(JL_STDOUT, "original %ld, new %ld\n", len, flagref_list.len); } // look up a method from a previously deserialized dependent module @@ -2688,8 +2689,8 @@ static jl_method_instance_t *jl_recache_method_instance(jl_method_instance_t *mi jl_code_instance_t *ci = mi->cache; if (ci) { _new->cache = ci; - jl_printf(JL_STDOUT, "Recached codeinst for "); - jl_(_new); + // jl_printf(JL_STDOUT, "Recached codeinst for "); + // jl_(_new); } while (ci) { if (ci->inferred && ci->inferred != jl_nothing) { diff --git a/src/ircode.c b/src/ircode.c index 606802b74e299..ff0d90caaa556 100644 --- a/src/ircode.c +++ b/src/ircode.c @@ -51,8 +51,8 @@ static int literal_val_id(jl_ircode_state *s, jl_value_t *v) JL_GC_DISABLED if (jl_precompile_toplevel_module != NULL && jl_parent_module(s->method->module) != jl_precompile_toplevel_module) { if (s->method->newrootsindex == INT32_MAX) { s->method->newrootsindex = l; - jl_printf(JL_STDOUT, "Set newrootsindex to %d for ", l); - jl_(s->method); + // jl_printf(JL_STDOUT, "Set newrootsindex to %d for ", l); + // jl_(s->method); } } jl_array_ptr_1d_push(rs, v);