Skip to content

Commit 817356b

Browse files
committed
clean WIP printfs
1 parent 29e664f commit 817356b

File tree

3 files changed

+11
-46
lines changed

3 files changed

+11
-46
lines changed

src/mono/mono/metadata/marshal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5237,7 +5237,6 @@ mono_marshal_get_unsafe_accessor_wrapper (MonoMethod *accessor_method, MonoUnsaf
52375237
if (accessor_method->is_generic) {
52385238
/* got a generic method definition. need to make a generic method definition wrapper */
52395239
g_assert (!accessor_method->is_inflated);
5240-
printf ("accessor method is generic: %s\n", mono_method_full_name (accessor_method, TRUE));
52415240
is_generic = TRUE;
52425241
}
52435242

src/mono/mono/mini/aot-compiler.c

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4325,14 +4325,6 @@ add_method_with_index (MonoAotCompile *acfg, MonoMethod *method, int index, gboo
43254325
{
43264326
g_assert (method);
43274327
if (!g_hash_table_lookup (acfg->method_indexes, method)) {
4328-
{
4329-
char * method_name = mono_method_get_full_name (method);
4330-
g_print ("inserting %s into acfg\n", method_name);
4331-
if (strstr(method_name, "W_REF& Program:AccessBox<W_REF") == method_name) {
4332-
printf ("haraa\n");
4333-
}
4334-
g_free (method_name);
4335-
}
43364328
g_ptr_array_add (acfg->methods, method);
43374329
g_hash_table_insert (acfg->method_indexes, method, GUINT_TO_POINTER (index + 1));
43384330
acfg->nmethods = acfg->methods->len + 1;
@@ -4866,14 +4858,6 @@ replace_generated_method (MonoAotCompile *acfg, MonoMethod *method, MonoError *e
48664858
if (G_LIKELY (mono_method_metadata_has_header (method)))
48674859
return NULL;
48684860

4869-
{
4870-
char * method_name = mono_method_get_full_name (method);
4871-
g_print ("ADDING no header %s generic instances\n", method_name);
4872-
if (strstr (method_name, "!!0") != NULL)
4873-
g_print("anon\n");
4874-
g_free (method_name);
4875-
}
4876-
48774861
/* Unsafe accessors methods. Replace attempts to compile the accessor method by
48784862
* its wrapper.
48794863
*/
@@ -4887,17 +4871,19 @@ replace_generated_method (MonoAotCompile *acfg, MonoMethod *method, MonoError *e
48874871
wrapper = mono_marshal_get_unsafe_accessor_wrapper (method, (MonoUnsafeAccessorKind)accessor_kind, member_name);
48884872
}
48894873
if (is_ok (error)) {
4890-
{
4874+
if (mono_trace_is_traced (G_LOG_LEVEL_INFO, MONO_TRACE_AOT)) {
48914875
char * method_name = mono_method_get_full_name (wrapper);
4892-
g_print ("REPLACED by %s in generic instances\n", method_name);
4876+
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "Replacing generated method by %s", method_name);
48934877
g_free (method_name);
48944878
}
48954879
return wrapper;
48964880
}
48974881
}
48984882

48994883
if (!is_ok (error)) {
4900-
aot_printerrf (acfg, "Could not get unsafe accessor wrapper due to %s ", mono_error_get_message (error));
4884+
char *method_name = mono_method_get_full_name (method);
4885+
aot_printerrf (acfg, "Could not get generated wrapper for %s due to %s", method_name, mono_error_get_message (error));
4886+
g_free (method_name);
49014887
}
49024888

49034889
return NULL;
@@ -7953,12 +7939,6 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg, gboolean stor
79537939
*/
79547940
buf2 = (guint8 *)g_malloc (4096);
79557941
p2 = buf2;
7956-
if (cfg->method->wrapper_type && cfg->method->is_generic) {
7957-
printf ("barf\n");
7958-
}
7959-
if (jinfo->d.method->wrapper_type && jinfo->d.method->is_generic) {
7960-
printf ("barf2\n");
7961-
}
79627942
encode_method_ref (acfg, jinfo->d.method, p2, &p2);
79637943
len = GPTRDIFF_TO_INT (p2 - buf2);
79647944
g_assert (len < 4096);
@@ -9552,7 +9532,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
95529532
if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
95539533
(method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) ||
95549534
(method->flags & METHOD_ATTRIBUTE_ABSTRACT)) {
9555-
printf ("Skip (impossible): %s\n", mono_method_full_name (method, TRUE));
9535+
//printf ("Skip (impossible): %s\n", mono_method_full_name (method, TRUE));
95569536
return;
95579537
}
95589538

src/mono/mono/mini/mini.c

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3196,9 +3196,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
31963196
cfg->jit_mm = jit_mm_for_method (cfg->method);
31973197
cfg->mem_manager = m_method_get_mem_manager (cfg->method);
31983198

3199-
char *method_name = mono_method_get_full_name (cfg->method);
3200-
3201-
if (cfg->method->wrapper_type == MONO_WRAPPER_ALLOC || cfg->method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
3199+
if (cfg->method->wrapper_type == MONO_WRAPPER_ALLOC || cfg->method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
32023200
/* We can't have seq points inside gc critical regions or native-to-managed wrapper */
32033201
cfg->gen_seq_points = FALSE;
32043202
cfg->gen_sdb_seq_points = FALSE;
@@ -3310,26 +3308,14 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
33103308
return cfg;
33113309
}
33123310

3313-
{
3314-
g_print ("START converting %s%s%s%smethod %s\n", COMPILE_LLVM (cfg) ? "llvm " : "", cfg->gsharedvt ? "gsharedvt " : "", (cfg->gshared && !cfg->gsharedvt) ? "gshared " : "", cfg->interp_entry_only ? "interp only " : "", method_name);
3315-
if (strstr(method_name, "W& Program:AccessBox") != NULL) {
3316-
printf ("blaps\n");
3317-
}
3318-
}
3319-
33203311
header = cfg->header = mono_method_get_header_checked (cfg->method, cfg->error);
33213312
if (!header) {
33223313
mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
33233314
if (MONO_METHOD_COMPILE_END_ENABLED ())
33243315
MONO_PROBE_METHOD_COMPILE_END (method, FALSE);
3325-
g_print ("NO HEADER, returning, %s\n", method_name);
3326-
if (strstr(method_name, "AccessBox<W_REF>") != 0) {
3327-
printf ("oops\n");
3328-
}
33293316
return cfg;
33303317
}
33313318

3332-
33333319
if (cfg->llvm_only && cfg->interp && !cfg->interp_entry_only && header->num_clauses) {
33343320
gboolean can_deopt = TRUE;
33353321
/*
@@ -3474,10 +3460,10 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
34743460
cfg->intvars = (guint16 *)mono_mempool_alloc0 (cfg->mempool, sizeof (guint16) * STACK_MAX * header->max_stack);
34753461

34763462
if (cfg->verbose_level > 0) {
3477-
char *v_method_name;
3463+
char *method_name;
34783464

3479-
v_method_name = mono_method_get_full_name (method);
3480-
g_print ("converting %s%s%s%smethod %s\n", COMPILE_LLVM (cfg) ? "llvm " : "", cfg->gsharedvt ? "gsharedvt " : "", (cfg->gshared && !cfg->gsharedvt) ? "gshared " : "", cfg->interp_entry_only ? "interp only " : "", v_method_name);
3465+
method_name = mono_method_get_full_name (method);
3466+
g_print ("converting %s%s%s%smethod %s\n", COMPILE_LLVM (cfg) ? "llvm " : "", cfg->gsharedvt ? "gsharedvt " : "", (cfg->gshared && !cfg->gsharedvt) ? "gshared " : "", cfg->interp_entry_only ? "interp only " : "", method_name);
34813467
/*
34823468
if (COMPILE_LLVM (cfg))
34833469
g_print ("converting llvm method %s\n", method_name = mono_method_full_name (method, TRUE));
@@ -3488,7 +3474,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
34883474
else
34893475
g_print ("converting method %s\n", method_name = mono_method_full_name (method, TRUE));
34903476
*/
3491-
g_free (v_method_name);
3477+
g_free (method_name);
34923478
}
34933479

34943480
if (cfg->opt & MONO_OPT_ABCREM)

0 commit comments

Comments
 (0)