diff options
Diffstat (limited to 'src/callgraph-treemap.c')
-rw-r--r-- | src/callgraph-treemap.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/callgraph-treemap.c b/src/callgraph-treemap.c index 1f93790..e60ad89 100644 --- a/src/callgraph-treemap.c +++ b/src/callgraph-treemap.c @@ -26,6 +26,7 @@ #include "odin.h" #include "callgraph.h" +#include "frames.h" #define _(x) x @@ -139,7 +140,7 @@ call_graph_tree_map_layout_subdivide (CallGraphTreeMap *self, CallGraphTreeMapLa layout->extents.width = rect->width - 2*BORDER; layout->extents.height = rect->height - 2*BORDER; - layout->frame = frame->ip ? frame : NULL; + layout->frame = frame->frame->ip ? frame : NULL; layout->children = NULL; if (layout->extents.width < BORDER || layout->extents.height < BORDER) @@ -420,10 +421,10 @@ out: break; frame = f; - if (f->function == main_fn) + if (f->frame->function == main_fn) break; - f = call_graph_store_lookup_by_ip (self->model, frame->ip); + f = call_graph_store_lookup_by_frame (self->model, frame->frame); sum = 20 * frame->allocs / 19; while (f != NULL) { sum -= f->allocs; @@ -435,7 +436,7 @@ out: if (sum < 0) break; } - layout->frame = frame->ip ? frame : frame->n_filter ? frame->filter[0] : NULL; + layout->frame = frame->frame->ip ? frame : frame->n_filter ? frame->filter[0] : NULL; } } @@ -663,7 +664,7 @@ call_graph_tree_map_draw_label (CallGraphTreeMap *self, text = pango_layout_new (ctx); pango_layout_set_width (text, layout->extents.width - 2*BORDER); - pango_layout_set_text (text, layout->frame->frame, -1); + pango_layout_set_text (text, layout->frame->frame->function_srcloc, -1); pango_layout_get_pixel_extents (text, NULL, &logical); if (logical.width > layout->extents.width - 2*BORDER || @@ -865,13 +866,13 @@ call_graph_tree_map_query_tooltip (GtkWidget *widget, for (l = list; l != NULL; l = g_slist_next (l)) { CallGraphFrame *frame = l->data; - if (last != NULL && strcmp (frame->frame, last) == 0) - break; + if (frame->frame->function_srcloc == last) + continue; g_string_append_c (string, '\n'); g_string_append_c (string, '\t'); - g_string_append (string, frame->frame); - last = frame->frame; + g_string_append (string, frame->frame->function_srcloc); + last = frame->frame->function_srcloc; if (++n == 16) break; |