summaryrefslogtreecommitdiff
path: root/src/summary-chart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/summary-chart.c')
-rw-r--r--src/summary-chart.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/summary-chart.c b/src/summary-chart.c
index b67afb6..193252e 100644
--- a/src/summary-chart.c
+++ b/src/summary-chart.c
@@ -38,7 +38,6 @@ typedef struct _summary_chart {
AllocatorsStore *store;
struct _sum_allocator others;
- gboolean total;
guint dirty;
} SummaryChart;
@@ -54,8 +53,7 @@ G_DEFINE_TYPE (SummaryChart, summary_chart, GTK_TYPE_WIDGET)
enum {
PROP_0 = 0,
- PROP_MODEL,
- PROP_TOTAL
+ PROP_MODEL
};
static gboolean
@@ -105,9 +103,6 @@ summary_chart_set_property (GObject *obj, guint id, const GValue *v, GParamSpec
case PROP_MODEL:
summary_chart_set_model (self, g_value_get_object (v));
break;
- case PROP_TOTAL:
- self->total = g_value_get_boolean (v);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, spec);
break;
@@ -122,9 +117,6 @@ summary_chart_get_property (GObject *obj, guint id, GValue *v, GParamSpec *spec)
case PROP_MODEL:
g_value_set_object (v, self->store);
break;
- case PROP_TOTAL:
- g_value_set_boolean (v, self->total);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, spec);
break;
@@ -550,8 +542,11 @@ summary_chart_query_tooltip (GtkWidget *widget,
guint n, m, depth, n_allocs;
n_allocs = A->time_tail->n_allocs;
- if (! self->total && A->time_tail->prev)
+ if (! allocators_store_is_cumulative (self->store) &&
+ A->time_tail->prev)
+ {
n_allocs -= A->time_tail->freed;
+ }
g_string_append (string, "\n\nMost frequent allocation callsite, ");
len = g_snprintf (calls + 40, 40, "%u", n_allocs);
@@ -624,17 +619,6 @@ summary_chart_class_init (SummaryChartClass *klass)
G_PARAM_STATIC_BLURB |
G_PARAM_STATIC_NAME |
G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_TOTAL,
- g_param_spec_boolean ("total",
- _("total"),
- _("Total"),
- TRUE,
- G_PARAM_STATIC_NICK |
- G_PARAM_STATIC_BLURB |
- G_PARAM_STATIC_NAME |
- G_PARAM_READWRITE));
}
@@ -646,10 +630,9 @@ summary_chart_init (SummaryChart *self)
}
GtkWidget *
-summary_chart_new (AllocatorsStore *store, gboolean total)
+summary_chart_new (AllocatorsStore *store)
{
return g_object_new (summary_chart_get_type (),
"model", store,
- "total", total,
NULL);
}