summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;