summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-12-21 14:07:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2007-12-21 14:07:46 +0000
commitb6b50e9bf0e531fb61d8f3f89f1ec01af97636f6 (patch)
treeae733078b0e03962cebab1d87e98eee7fe88b8d5
parent1b92dad28f9ab2058aff0c1bc688107f4d4c56f1 (diff)
Accumulate callgraph since last update.
-rw-r--r--src/app.c6
-rw-r--r--src/callgraph-store.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/app.c b/src/app.c
index 2f8d015..befa54e 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1899,9 +1899,9 @@ _update_client (App *app)
app_set_blocks (app, app->client.blocks);
call_graph_store_update (app->client.call_graph,
- app,
- app->client.allocators,
- app->client.last);
+ app,
+ app->client.allocators,
+ app->client.last);
summary_update ((Summary *) app->summary_total, &app->client);
summary_update ((Summary *) app->summary_current, &app->client);
diff --git a/src/callgraph-store.c b/src/callgraph-store.c
index eb80638..25491f1 100644
--- a/src/callgraph-store.c
+++ b/src/callgraph-store.c
@@ -909,7 +909,7 @@ call_graph_store_update (CallGraphStore *store,
updated = 0;
for (A = allocators; A != NULL; A = A->next) {
const AllocatorTime *At = A->time_tail;
- const AllocatorTime *Ap = At->prev;
+ const AllocatorTime *Ap;
if (At->time <= since)
continue;
@@ -917,6 +917,9 @@ call_graph_store_update (CallGraphStore *store,
if (At->n_allocs == 0)
continue;
+ Ap = At->prev;
+ while (Ap != NULL && Ap->time > since)
+ Ap = Ap->prev;
if (Ap == NULL)
Ap = &nil;