[sgen] We must do bridge processing with all sgen locks taken.
[mono.git] / mono / metadata / profiler.c
index bae1c45bda41782903007b76ba996e8d5c046224..22b1ac580bc55efaf9ed48d8f1e8a8f1fac5ddc6 100644 (file)
@@ -1151,14 +1151,14 @@ mono_profiler_load (const char *desc)
                }
                if (!load_embedded_profiler (desc, mname)) {
                        libname = g_strdup_printf ("mono-profiler-%s", mname);
-                       if (!load_profiler_from_directory (NULL, libname, desc))
+                       if (!load_profiler_from_directory (NULL, libname, desc)) {
+                               res = FALSE;
 #if defined (MONO_ASSEMBLIES)
                                res = load_profiler_from_directory (mono_assembly_getrootdir (), libname, desc);
-#else
-                               res = FALSE;
 #endif
                                if (!res)
-                                       g_warning ("The %s profiler wasn't found in the main executable nor could it be loaded from '%s'.", libname);
+                                       g_warning ("The '%s' profiler wasn't found in the main executable nor could it be loaded from '%s'.", mname, libname);
+                       }
                        g_free (libname);
                }
                g_free (mname);