aboutsummaryrefslogtreecommitdiffstats
path: root/trace-graph.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-08-30 16:28:06 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2012-08-30 16:28:06 -0400
commit129f97bd91c3f971ee4c3d09264efca1384bd9b6 (patch)
tree6b060a9c33337f3013015b43db0333d75abb5eda /trace-graph.c
parent15bbd1e788af29d06b3fb64cefd0e2e3cdd64a8b (diff)
Fixed performance / memory leak of mouse hovering
Diffstat (limited to 'trace-graph.c')
-rw-r--r--trace-graph.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/trace-graph.c b/trace-graph.c
index f9bd4af..f843e26 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -1863,7 +1863,6 @@ static void draw_plot(struct graph_info *ginfo, struct graph_plot *plot,
1863static void draw_hashed_plots(struct graph_info *ginfo) 1863static void draw_hashed_plots(struct graph_info *ginfo)
1864{ 1864{
1865 gint cpu, pid; 1865 gint cpu, pid;
1866 gboolean started;
1867 struct record *record; 1866 struct record *record;
1868 struct plot_hash *hash; 1867 struct plot_hash *hash;
1869 struct plot_list *list; 1868 struct plot_list *list;
@@ -1882,7 +1881,7 @@ static void draw_hashed_plots(struct graph_info *ginfo)
1882 1881
1883 // TODO: hack to clean up until first release, make unhacky 1882 // TODO: hack to clean up until first release, make unhacky
1884 if (ginfo->rtg_info.clean_records && 1883 if (ginfo->rtg_info.clean_records &&
1885 ginfo->rtg_info.start_time == 0) { 1884 (ginfo->rtg_info.start_time == 0 || ginfo->view_start_time < ginfo->rtg_info.start_time)) {
1886 unsigned long long dull, rel = 0; 1885 unsigned long long dull, rel = 0;
1887 char *dchar; 1886 char *dchar;
1888 int dint; 1887 int dint;
@@ -1964,6 +1963,8 @@ static void draw_plots(struct graph_info *ginfo, gint new_width)
1964 set_color(ginfo->draw, plot->gc, plot->last_color); 1963 set_color(ginfo->draw, plot->gc, plot->last_color);
1965 } 1964 }
1966 1965
1966 printf("we here1\n");
1967
1967 trace_set_cursor(GDK_WATCH); 1968 trace_set_cursor(GDK_WATCH);
1968 /* Shortcut if we don't have any task plots */ 1969 /* Shortcut if we don't have any task plots */
1969 if (!ginfo->nr_task_hash && !ginfo->all_recs) { 1970 if (!ginfo->nr_task_hash && !ginfo->all_recs) {
@@ -1991,6 +1992,8 @@ static void draw_plots(struct graph_info *ginfo, gint new_width)
1991 goto out; 1992 goto out;
1992 } 1993 }
1993 1994
1995 printf("we here\n");
1996
1994 draw_hashed_plots(ginfo); 1997 draw_hashed_plots(ginfo);
1995 1998
1996out: 1999out:
@@ -2097,8 +2100,10 @@ static void draw_timeline(struct graph_info *ginfo, gint width)
2097static void draw_info(struct graph_info *ginfo, 2100static void draw_info(struct graph_info *ginfo,
2098 gint new_width) 2101 gint new_width)
2099{ 2102{
2103 printf("we going?\n");
2100 if (!ginfo->handle) 2104 if (!ginfo->handle)
2101 return; 2105 return;
2106 printf("we gone\n");
2102 2107
2103 ginfo->resolution = (gdouble)new_width / (gdouble)(ginfo->view_end_time - 2108 ginfo->resolution = (gdouble)new_width / (gdouble)(ginfo->view_end_time -
2104 ginfo->view_start_time); 2109 ginfo->view_start_time);
@@ -2107,6 +2112,7 @@ static void draw_info(struct graph_info *ginfo,
2107 2112
2108 draw_timeline(ginfo, new_width); 2113 draw_timeline(ginfo, new_width);
2109 2114
2115 printf("drawing plots\n");
2110 draw_plots(ginfo, new_width); 2116 draw_plots(ginfo, new_width);
2111 2117
2112 ginfo->read_comms = FALSE; 2118 ginfo->read_comms = FALSE;
@@ -2324,6 +2330,7 @@ static void redraw_pixmap_backend(struct graph_info *ginfo)
2324 if (old_pix) 2330 if (old_pix)
2325 g_object_unref(old_pix); 2331 g_object_unref(old_pix);
2326 2332
2333
2327 if (ginfo->hadj_value) { 2334 if (ginfo->hadj_value) {
2328// gtk_adjustment_set_lower(ginfo->hadj, -100.0); 2335// gtk_adjustment_set_lower(ginfo->hadj, -100.0);
2329 gtk_adjustment_set_value(ginfo->hadj, ginfo->hadj_value); 2336 gtk_adjustment_set_value(ginfo->hadj, ginfo->hadj_value);