libsysprof-analyze: include final address context

We may need to know the final address context so we can inject symbols as
necessary into the top of the callgraph. We know it when generating the
symbols, so just yield it to the caller too.
This commit is contained in:
Christian Hergert
2023-05-25 11:15:07 -07:00
parent 1b0434c854
commit 6f90a552e7
4 changed files with 19 additions and 5 deletions

View File

@ -209,6 +209,7 @@ static void
sysprof_callgraph_add_traceable (SysprofCallgraph *self,
SysprofDocumentTraceable *traceable)
{
SysprofAddressContext final_context;
SysprofCallgraphNode *node;
SysprofSymbol **symbols;
guint stack_depth;
@ -225,7 +226,11 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
return;
symbols = g_newa (SysprofSymbol *, stack_depth + 2);
n_symbols = sysprof_document_symbolize_traceable (self->document, traceable, symbols, stack_depth);
n_symbols = sysprof_document_symbolize_traceable (self->document,
traceable,
symbols,
stack_depth,
&final_context);
g_assert (n_symbols > 0);
g_assert (n_symbols <= stack_depth);