libsysprof-analyze: introduce SysprofDocumentLoader

and thereby make a bunch of the exposed API on SysprofDocument private.
Instead we'll push some of that to the loader but for now the tests can
keep doing what their doing using the private API.

The goal here is to not expose a SysprofDocument pointer until the document
has been loaded and symbolized via the loader API. Then we can lookup
symbols directly from the document w/o intermediary objects.
This commit is contained in:
Christian Hergert
2023-05-12 15:38:16 -07:00
parent 9f6e16e373
commit 3350ad61eb
12 changed files with 543 additions and 49 deletions

View File

@ -26,9 +26,21 @@
G_BEGIN_DECLS
gboolean _sysprof_document_is_native (SysprofDocument *self);
char *_sysprof_document_ref_string (SysprofDocument *self,
const char *name);
GtkBitset *_sysprof_document_traceables (SysprofDocument *self);
SysprofDocument *_sysprof_document_new (const char *filename,
GError **error);
SysprofDocument *_sysprof_document_new_from_fd (int capture_fd,
GError **error);
void _sysprof_document_symbolize_async (SysprofDocument *self,
SysprofSymbolizer *symbolizer,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
SysprofDocumentSymbols *_sysprof_document_symbolize_finish (SysprofDocument *self,
GAsyncResult *result,
GError **error);
gboolean _sysprof_document_is_native (SysprofDocument *self);
char *_sysprof_document_ref_string (SysprofDocument *self,
const char *name);
GtkBitset *_sysprof_document_traceables (SysprofDocument *self);
G_END_DECLS