mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
callgraph: track max height of callgraph
This commit is contained in:
@ -71,6 +71,8 @@ struct _SysprofCallgraph
|
|||||||
GDestroyNotify augment_func_data_destroy;
|
GDestroyNotify augment_func_data_destroy;
|
||||||
|
|
||||||
SysprofCallgraphNode root;
|
SysprofCallgraphNode root;
|
||||||
|
|
||||||
|
guint height;
|
||||||
};
|
};
|
||||||
|
|
||||||
void _sysprof_callgraph_new_async (SysprofDocument *document,
|
void _sysprof_callgraph_new_async (SysprofDocument *document,
|
||||||
|
|||||||
@ -421,6 +421,9 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
|
|||||||
symbols[n_symbols++] = _sysprof_document_process_symbol (self->document, pid);
|
symbols[n_symbols++] = _sysprof_document_process_symbol (self->document, pid);
|
||||||
symbols[n_symbols++] = everything;
|
symbols[n_symbols++] = everything;
|
||||||
|
|
||||||
|
if (n_symbols > self->height)
|
||||||
|
self->height = n_symbols;
|
||||||
|
|
||||||
node = sysprof_callgraph_add_trace (self,
|
node = sysprof_callgraph_add_trace (self,
|
||||||
symbols,
|
symbols,
|
||||||
n_symbols,
|
n_symbols,
|
||||||
|
|||||||
Reference in New Issue
Block a user