summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-05-08 19:45:09 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-05-08 19:45:09 +0100
commit0ee9f4a61a1b982cf8992121ce41acd2094f17ce (patch)
tree3858260d4acd8d1b326c51f7e6b0484f6bfaff00
parent4dd5fa0ec918b77972edb61c067028e7cabb7491 (diff)
Correct the calculation of current blocks.
-rw-r--r--src/summary-chart.c14
-rw-r--r--src/summary-view.c14
2 files changed, 8 insertions, 20 deletions
diff --git a/src/summary-chart.c b/src/summary-chart.c
index 4744419..669d6fe 100644
--- a/src/summary-chart.c
+++ b/src/summary-chart.c
@@ -562,11 +562,8 @@ summary_chart_query_tooltip (GtkWidget *widget,
logical_rect = ink_rect;
n_allocs = A->time_tail->n_allocs;
- if (! allocators_store_is_cumulative (self->store) &&
- A->time_tail->prev)
- {
- n_allocs -= A->time_tail->freed;
- }
+ if (! allocators_store_is_cumulative (self->store))
+ n_allocs -= A->time_tail->n_frees;
g_string_append (string, "\n\nMost frequent allocation callsite, ");
len = g_snprintf (calls + 40, 40, "%u", n_allocs);
@@ -599,11 +596,8 @@ summary_chart_query_tooltip (GtkWidget *widget,
*prev = next;
} else {
n_allocs = AA->time_tail->n_allocs;
- if (! allocators_store_is_cumulative (self->store) &&
- AA->time_tail->prev)
- {
- n_allocs -= AA->time_tail->freed;
- }
+ if (! allocators_store_is_cumulative (self->store))
+ n_allocs -= AA->time_tail->n_frees;
this_allocs += n_allocs;
prev = &l->next;
}
diff --git a/src/summary-view.c b/src/summary-view.c
index e24945a..ea32290 100644
--- a/src/summary-view.c
+++ b/src/summary-view.c
@@ -175,11 +175,8 @@ summary_view_query_tooltip (GtkWidget *widget,
A = sum->largest;
n_allocs = A->time_tail->n_allocs;
- if (! allocators_store_is_cumulative ((AllocatorsStore *) model) &&
- A->time_tail->prev)
- {
- n_allocs -= A->time_tail->freed;
- }
+ if (! allocators_store_is_cumulative ((AllocatorsStore *) model))
+ n_allocs -= A->time_tail->n_frees;
string = g_string_new ("Most frequent allocation callsite, ");
len = g_snprintf (calls + 40, 40, "%u", n_allocs);
@@ -216,11 +213,8 @@ summary_view_query_tooltip (GtkWidget *widget,
*prev = next;
} else {
n_allocs = AA->time_tail->n_allocs;
- if (! allocators_store_is_cumulative ((AllocatorsStore *) model) &&
- AA->time_tail->prev)
- {
- n_allocs -= AA->time_tail->freed;
- }
+ if (! allocators_store_is_cumulative ((AllocatorsStore *) model))
+ n_allocs -= AA->time_tail->n_frees;
this_allocs += n_allocs;
prev = &l->next;
}