libsysprof-analyze: add GListModel of callgraph symbols

This has an indirect object (SysprofCallgraphSymbol) so that we can provide
plumbing to get the callgraph as well as the augmented data from the
indirection object.

This allows for callgraphs to show overview in the functions list which
contains the same augmentation that the descendants view does.
This commit is contained in:
Christian Hergert
2023-06-12 11:15:50 -07:00
parent d8adcb5b48
commit 643aa374cb
8 changed files with 395 additions and 38 deletions

View File

@ -47,16 +47,36 @@ struct _SysprofCallgraphNode
gpointer augment;
};
void _sysprof_callgraph_new_async (SysprofDocument *document,
GListModel *traceables,
gsize augment_size,
SysprofAugmentationFunc augment_func,
gpointer augment_func_data,
GDestroyNotify augment_func_data_destroy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
SysprofCallgraph *_sysprof_callgraph_new_finish (GAsyncResult *result,
GError **error);
struct _SysprofCallgraph
{
GObject parent_instance;
SysprofDocument *document;
GListModel *traceables;
GHashTable *symbol_to_summary;
GPtrArray *symbols;
gsize augment_size;
SysprofAugmentationFunc augment_func;
gpointer augment_func_data;
GDestroyNotify augment_func_data_destroy;
SysprofCallgraphNode root;
};
void _sysprof_callgraph_new_async (SysprofDocument *document,
GListModel *traceables,
gsize augment_size,
SysprofAugmentationFunc augment_func,
gpointer augment_func_data,
GDestroyNotify augment_func_data_destroy,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
SysprofCallgraph *_sysprof_callgraph_new_finish (GAsyncResult *result,
GError **error);
gpointer _sysprof_callgraph_get_symbol_augment (SysprofCallgraph *self,
SysprofSymbol *symbol);
G_END_DECLS