From b277bf84af1a37becac07e1b52329a285b0f50d3 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 22 Nov 2016 15:42:17 -0500 Subject: [PATCH] [runtime] Avoid passing a newline to mono_trace (), it adds one automatically. --- mono/metadata/assembly.c | 2 +- mono/metadata/class.c | 8 ++++---- mono/metadata/image.c | 2 +- mono/mini/aot-runtime.c | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c index cae45aa64ab..6f646fe8fe8 100644 --- a/mono/metadata/assembly.c +++ b/mono/metadata/assembly.c @@ -1227,7 +1227,7 @@ mono_assembly_load_reference (MonoImage *image, int index) image->assembly->aname.name, image->assembly, reference->aname.name, reference, reference->ref_count); } else { if (image->assembly) - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Failed to load assembly %s[%p]\n", + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Failed to load assembly %s[%p].", image->assembly->aname.name, image->assembly); } diff --git a/mono/metadata/class.c b/mono/metadata/class.c index 61bbfe70f4b..eeb0c75077a 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -4297,19 +4297,19 @@ print_unimplemented_interface_method_info (MonoClass *klass, MonoClass *ic, Mono char *type_name; for (index = 0; index < onum; ++index) { - mono_trace_warning (MONO_TRACE_TYPE, " at slot %d: %s (%d) overrides %s (%d)\n", im_slot, overrides [index*2+1]->name, + mono_trace_warning (MONO_TRACE_TYPE, " at slot %d: %s (%d) overrides %s (%d)", im_slot, overrides [index*2+1]->name, overrides [index*2+1]->slot, overrides [index*2]->name, overrides [index*2]->slot); } method_signature = mono_signature_get_desc (mono_method_signature (im), FALSE); type_name = mono_type_full_name (&klass->byval_arg); - mono_trace_warning (MONO_TRACE_TYPE, "no implementation for interface method %s::%s(%s) in class %s\n", + mono_trace_warning (MONO_TRACE_TYPE, "no implementation for interface method %s::%s(%s) in class %s", mono_type_get_name (&ic->byval_arg), im->name, method_signature, type_name); g_free (method_signature); g_free (type_name); mono_class_setup_methods (klass); if (mono_class_has_failure (klass)) { char *name = mono_type_get_full_name (klass); - mono_trace_warning (MONO_TRACE_TYPE, "CLASS %s failed to resolve methods\n", name); + mono_trace_warning (MONO_TRACE_TYPE, "CLASS %s failed to resolve methods", name); g_free (name); return; } @@ -4318,7 +4318,7 @@ print_unimplemented_interface_method_info (MonoClass *klass, MonoClass *ic, Mono MonoMethod *cm = klass->methods [index]; method_signature = mono_signature_get_desc (mono_method_signature (cm), TRUE); - mono_trace_warning (MONO_TRACE_TYPE, "METHOD %s(%s)\n", cm->name, method_signature); + mono_trace_warning (MONO_TRACE_TYPE, "METHOD %s(%s)", cm->name, method_signature); g_free (method_signature); } } diff --git a/mono/metadata/image.c b/mono/metadata/image.c index 0a2b5eca65c..5e8c1d3c084 100644 --- a/mono/metadata/image.c +++ b/mono/metadata/image.c @@ -520,7 +520,7 @@ load_metadata_ptrs (MonoImage *image, MonoCLIImageInfo *iinfo) image->heap_tables.size = read32 (ptr + 4); ptr += 8 + 3; image->uncompressed_metadata = TRUE; - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Assembly '%s' has the non-standard metadata heap #-.\nRecompile it correctly (without the /incremental switch or in Release mode).\n", image->name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Assembly '%s' has the non-standard metadata heap #-.\nRecompile it correctly (without the /incremental switch or in Release mode).", image->name); } else if (strncmp (ptr + 8, "#Pdb", 5) == 0) { image->heap_pdb.data = image->raw_metadata + read32 (ptr); image->heap_pdb.size = read32 (ptr + 4); diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c index c531afce043..1c282726d02 100644 --- a/mono/mini/aot-runtime.c +++ b/mono/mini/aot-runtime.c @@ -268,15 +268,15 @@ load_image (MonoAotModule *amodule, int index, MonoError *error) assembly = mono_assembly_load (&amodule->image_names [index], amodule->assembly->basedir, &status); if (!assembly) { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable because dependency %s is not found.\n", amodule->aot_name, amodule->image_names [index].name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable because dependency %s is not found.", amodule->aot_name, amodule->image_names [index].name); mono_error_set_bad_image_name (error, amodule->aot_name, "module is unusable because dependency %s is not found (error %d).\n", amodule->image_names [index].name, status); amodule->out_of_date = TRUE; return NULL; } if (strcmp (assembly->image->guid, amodule->image_guids [index])) { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').\n", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid); - mono_error_set_bad_image_name (error, amodule->aot_name, "module is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').\n", amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid); + mono_error_set_bad_image_name (error, amodule->aot_name, "module is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').", amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid); amodule->out_of_date = TRUE; return NULL; } @@ -1959,7 +1959,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) if (info) { /* Statically linked AOT module */ aot_name = g_strdup_printf ("%s", assembly->aname.name); - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "Found statically linked AOT module '%s'.\n", aot_name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "Found statically linked AOT module '%s'.", aot_name); if (!(info->flags & MONO_AOT_FILE_FLAG_LLVM_ONLY)) { globals = (void **)info->globals; g_assert (globals); @@ -1974,7 +1974,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) sofile = mono_dl_open (aot_name, MONO_DL_LAZY, &err); if (!sofile) { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s\n", aot_name, err); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s", aot_name, err); g_free (err); g_free (aot_name); @@ -1983,7 +1983,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) g_free (basename); sofile = mono_dl_open (aot_name, MONO_DL_LAZY, &err); if (!sofile) { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s\n", aot_name, err); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s", aot_name, err); g_free (err); } @@ -2035,7 +2035,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) if (mono_aot_only) { g_error ("Failed to load AOT module '%s' while running in aot-only mode: %s.\n", aot_name, msg); } else { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable: %s.\n", aot_name, msg); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable: %s.", aot_name, msg); } g_free (msg); g_free (aot_name); @@ -2273,12 +2273,12 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data) } if (amodule->out_of_date) { - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: Module %s is unusable because a dependency is out-of-date.\n", assembly->image->name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: Module %s is unusable because a dependency is out-of-date.", assembly->image->name); if (mono_aot_only) g_error ("Failed to load AOT module '%s' while running in aot-only mode because a dependency cannot be found or it is out of date.\n", aot_name); } else - mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: loaded AOT Module for %s.\n", assembly->image->name); + mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: loaded AOT Module for %s.", assembly->image->name); } /* -- 2.25.1