summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-12-20 15:28:53 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2007-12-20 15:28:53 +0000
commit394b673c3b7703e0f12e7a1d813a8e5689ef9673 (patch)
treec3061316ddfe80cec152f8281f448ee67fedced5 /src/app.c
parent650d06b4d317fa47ae0882c9908de95d9501ff49 (diff)
Add a currently allocated summary.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/app.c b/src/app.c
index aae3465..2b18978 100644
--- a/src/app.c
+++ b/src/app.c
@@ -50,7 +50,8 @@ struct _app {
GtkWidget *window;
GtkWidget *notebook;
- GtkWidget *summary;
+ GtkWidget *summary_total;
+ GtkWidget *summary_current;
struct {
GtkWidget *allocators;
GtkWidget *block_map;
@@ -946,7 +947,8 @@ main_window_create (App *app)
app->spacetime = spacetime_new ();
- app->summary = summary_new ();
+ app->summary_total = summary_new (TRUE);
+ app->summary_current = summary_new (FALSE);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (app->allocations.call_graph));
g_signal_connect (selection, "changed",
@@ -992,9 +994,16 @@ main_window_create (App *app)
gtk_widget_show (app->statusbar);
label = gtk_label_new ("Summary");
- gtk_notebook_append_page (GTK_NOTEBOOK (app->notebook), app->summary, label);
+ gtk_notebook_append_page (GTK_NOTEBOOK (app->notebook),
+ app->summary_total, label);
+ gtk_widget_show (label);
+ gtk_widget_show (app->summary_total);
+
+ label = gtk_label_new ("Current");
+ gtk_notebook_append_page (GTK_NOTEBOOK (app->notebook),
+ app->summary_current, label);
gtk_widget_show (label);
- gtk_widget_show (app->summary);
+ gtk_widget_show (app->summary_current);
hbox = gtk_hbox_new (FALSE, 2);
label = gtk_label_new ("Allocation Map");
@@ -1873,7 +1882,8 @@ _update_client (App *app)
app->client.allocators,
app->client.last);
- summary_update ((Summary *) app->summary, &app->client);
+ summary_update ((Summary *) app->summary_total, &app->client);
+ summary_update ((Summary *) app->summary_current, &app->client);
timeline_add_datum ((Timeline *) app->timeline, &app->client,
app->client.time, app->client.allocators);
@@ -2074,7 +2084,8 @@ app_add_alloc_fn (App *app, const gchar *pattern, GError **error)
/* XXX signal */
call_graph_store_filter (app->client.call_graph, app);
- summary_update ((Summary *) app->summary, &app->client);
+ summary_update ((Summary *) app->summary_total, &app->client);
+ summary_update ((Summary *) app->summary_current, &app->client);
if (app->client.blocks != NULL)
app_set_blocks (app, app->client.blocks);