diff --git a/src/libsysprof/sysprof-callgraph-private.h b/src/libsysprof/sysprof-callgraph-private.h index 5e588be9..b80c8283 100644 --- a/src/libsysprof/sysprof-callgraph-private.h +++ b/src/libsysprof/sysprof-callgraph-private.h @@ -71,6 +71,8 @@ struct _SysprofCallgraph GDestroyNotify augment_func_data_destroy; SysprofCallgraphNode root; + + guint height; }; void _sysprof_callgraph_new_async (SysprofDocument *document, diff --git a/src/libsysprof/sysprof-callgraph.c b/src/libsysprof/sysprof-callgraph.c index b7419f46..a8ef4736 100644 --- a/src/libsysprof/sysprof-callgraph.c +++ b/src/libsysprof/sysprof-callgraph.c @@ -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,