libsysprof: add callgraph flag to merge similar processes

This is the backing implementation to allow for merging multiple processes
which have identical comm[] fields.
This commit is contained in:
Christian Hergert
2023-08-28 13:31:46 -07:00
parent 00c02f0f18
commit cdfae5f7b9
7 changed files with 36 additions and 15 deletions

View File

@ -2106,7 +2106,8 @@ sysprof_document_callgraph_finish (SysprofDocument *self,
SysprofSymbol *
_sysprof_document_process_symbol (SysprofDocument *self,
int pid)
int pid,
gboolean want_shared)
{
SysprofProcessInfo *info;
@ -2120,6 +2121,9 @@ _sysprof_document_process_symbol (SysprofDocument *self,
if (info == NULL)
return self->missing_process;
if (want_shared && info->shared_symbol)
return info->shared_symbol;
if (info->symbol)
return info->symbol;