conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
{
MonoJitInfo *ji;
+ MonoMethod *method;
MonoContext ctx, new_ctx;
MonoLMF *lmf;
guint8 *stack_limit;
continue;
}
+ if (ji)
+ method = jinfo_get_method (ji);
+ else
+ method = NULL;
+
/* The last frame can be in any state so mark conservatively */
if (last) {
if (ji) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
}
DEBUG (fprintf (logfile, "\t <Last frame>\n"));
last = FALSE;
pc_offset = (guint8*)MONO_CONTEXT_GET_IP (&ctx) - (guint8*)ji->code_start;
/* These frames are very problematic */
- if (ji->method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
+ DEBUG (char *fname = mono_method_full_name (method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
DEBUG (fprintf (logfile, "\tSkip.\n"));
continue;
}
emap = ji->gc_info;
if (!emap) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (ji), TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
DEBUG (fprintf (logfile, "\tNo GC Map.\n"));
continue;
}
* Debugging aid to control the number of frames scanned precisely
*/
if (!precise_frame_limit_inited) {
- if (getenv ("MONO_PRECISE_COUNT"))
- precise_frame_limit = atoi (getenv ("MONO_PRECISE_COUNT"));
+ if (g_getenv ("MONO_PRECISE_COUNT"))
+ precise_frame_limit = atoi (g_getenv ("MONO_PRECISE_COUNT"));
precise_frame_limit_inited = TRUE;
}
if (precise_frame_limit != -1) {
if (precise_frame_count [FALSE] == precise_frame_limit)
- printf ("LAST PRECISE FRAME: %s\n", mono_method_full_name (ji->method, TRUE));
+ printf ("LAST PRECISE FRAME: %s\n", mono_method_full_name (method, TRUE));
if (precise_frame_count [FALSE] > precise_frame_limit)
continue;
}
frame_start = fp + map->start_offset + map->map_offset;
frame_end = fp + map->end_offset;
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p) limit=%p fp=%p frame=%p-%p (%d)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx), stack_limit, fp, frame_start, frame_end, (int)(frame_end - frame_start)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (ji), TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p) limit=%p fp=%p frame=%p-%p (%d)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx), stack_limit, fp, frame_start, frame_end, (int)(frame_end - frame_start)); g_free (fname));
/* Find the callsite index */
if (map->callsite_entry_size == 1) {
break;
}
if (i == map->ncallsites) {
- printf ("Unable to find ip offset 0x%x in callsite list of %s.\n", pc_offset + 1, mono_method_full_name (ji->method, TRUE));
+ printf ("Unable to find ip offset 0x%x in callsite list of %s.\n", pc_offset + 1, mono_method_full_name (method, TRUE));
g_assert_not_reached ();
}
cindex = i;
fi = &tls->frames [findex];
frame_start = stack_start + fi->frame_start_offset;
- DEBUG (char *fname = mono_method_full_name (fi->ji->method, TRUE); fprintf (logfile, "Mark(1): %s\n", fname); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (fi->ji), TRUE); fprintf (logfile, "Mark(1): %s\n", fname); g_free (fname));
/*
* FIXME: Add a function to mark using a bitmap, to avoid doing a
static int precise_count;
precise_count ++;
- if (getenv ("MONO_GCMAP_COUNT")) {
- if (precise_count == atoi (getenv ("MONO_GCMAP_COUNT")))
+ if (g_getenv ("MONO_GCMAP_COUNT")) {
+ if (precise_count == atoi (g_getenv ("MONO_GCMAP_COUNT")))
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (precise_count > atoi (getenv ("MONO_GCMAP_COUNT")))
+ if (precise_count > atoi (g_getenv ("MONO_GCMAP_COUNT")))
return;
}
}
parse_debug_options (void)
{
char **opts, **ptr;
- char *env;
+ const char *env;
- env = getenv ("MONO_GCMAP_DEBUG");
+ env = g_getenv ("MONO_GCMAP_DEBUG");
if (!env)
return;