callgraph: track max height of callgraph

This commit is contained in:
Christian Hergert
2023-08-23 14:31:10 -07:00
parent 2cf6701adf
commit fd618ccb4b
2 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,8 @@ struct _SysprofCallgraph
GDestroyNotify augment_func_data_destroy;
SysprofCallgraphNode root;
guint height;
};
void _sysprof_callgraph_new_async (SysprofDocument *document,

View File

@ -421,6 +421,9 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
symbols[n_symbols++] = _sysprof_document_process_symbol (self->document, pid);
symbols[n_symbols++] = everything;
if (n_symbols > self->height)
self->height = n_symbols;
node = sysprof_callgraph_add_trace (self,
symbols,
n_symbols,