From 90fdd7f842b0d77b5aedbaa3514bccd4c174fb1f Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 12 Jun 2023 17:22:17 -0700 Subject: [PATCH] libsysprof-analyze: use symbol hash for better coalescing We want to increase how much the symbols get coalesced across processes so long as they are reasonably the same symbol. --- src/libsysprof-analyze/sysprof-callgraph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-analyze/sysprof-callgraph.c b/src/libsysprof-analyze/sysprof-callgraph.c index 3a83114b..1c9e178b 100644 --- a/src/libsysprof-analyze/sysprof-callgraph.c +++ b/src/libsysprof-analyze/sysprof-callgraph.c @@ -388,7 +388,10 @@ _sysprof_callgraph_new_async (SysprofDocument *document, self->augment_func = augment_func; self->augment_func_data = augment_func_data; self->augment_func_data_destroy = augment_func_data_destroy; - self->symbol_to_summary = g_hash_table_new_full (NULL, NULL, NULL, summary_free); + self->symbol_to_summary = g_hash_table_new_full ((GHashFunc)sysprof_symbol_hash, + (GEqualFunc)sysprof_symbol_equal, + NULL, + summary_free); self->symbols = g_ptr_array_new (); self->root.summary = sysprof_callgraph_get_summary (self, everything);