From f4eaf1ec51c584fa4e053c1450b6f641bd0da0f0 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 9 Jun 2023 11:22:51 -0700 Subject: [PATCH] libsysprof-gtk: add to weight to summary augment --- .../sysprof-weighted-callgraph-view.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/libsysprof-gtk/sysprof-weighted-callgraph-view.c b/src/libsysprof-gtk/sysprof-weighted-callgraph-view.c index 8a7198fe..230b302a 100644 --- a/src/libsysprof-gtk/sysprof-weighted-callgraph-view.c +++ b/src/libsysprof-gtk/sysprof-weighted-callgraph-view.c @@ -47,20 +47,27 @@ augment_weight (SysprofCallgraph *callgraph, SysprofDocumentFrame *frame, gpointer user_data) { - AugmentWeight *aug; + AugmentWeight *cur; + AugmentWeight *sum; g_assert (SYSPROF_IS_CALLGRAPH (callgraph)); g_assert (node != NULL); g_assert (SYSPROF_IS_DOCUMENT_SAMPLE (frame)); g_assert (user_data == NULL); - aug = sysprof_callgraph_get_augment (callgraph, node); - aug->size += 1; + cur = sysprof_callgraph_get_augment (callgraph, node); + cur->size += 1; + + sum = sysprof_callgraph_get_summary_augment (callgraph, node); + sum->size += 1; for (; node; node = sysprof_callgraph_node_parent (node)) { - aug = sysprof_callgraph_get_augment (callgraph, node); - aug->total += 1; + cur = sysprof_callgraph_get_augment (callgraph, node); + cur->total += 1; + + sum = sysprof_callgraph_get_summary_augment (callgraph, node); + sum->size += 1; } }