Skip to content

Commit 0149584

Browse files
committed
clean WIP printfs
1 parent 29e664f commit 0149584

2 files changed

Lines changed: 9 additions & 34 deletions

File tree

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

Lines changed: 5 additions & 19 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;

src/mono/mono/mini/mini.c

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,22 +3310,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
33103310
return cfg;
33113311
}
33123312

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-
33203313
header = cfg->header = mono_method_get_header_checked (cfg->method, cfg->error);
33213314
if (!header) {
33223315
mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
33233316
if (MONO_METHOD_COMPILE_END_ENABLED ())
33243317
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-
}
33293318
return cfg;
33303319
}
33313320

@@ -3474,10 +3463,10 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
34743463
cfg->intvars = (guint16 *)mono_mempool_alloc0 (cfg->mempool, sizeof (guint16) * STACK_MAX * header->max_stack);
34753464

34763465
if (cfg->verbose_level > 0) {
3477-
char *v_method_name;
3466+
char *method_name;
34783467

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);
3468+
method_name = mono_method_get_full_name (method);
3469+
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);
34813470
/*
34823471
if (COMPILE_LLVM (cfg))
34833472
g_print ("converting llvm method %s\n", method_name = mono_method_full_name (method, TRUE));
@@ -3488,7 +3477,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
34883477
else
34893478
g_print ("converting method %s\n", method_name = mono_method_full_name (method, TRUE));
34903479
*/
3491-
g_free (v_method_name);
3480+
g_free (method_name);
34923481
}
34933482

34943483
if (cfg->opt & MONO_OPT_ABCREM)

0 commit comments

Comments
 (0)