libsysprof-analyze: add basic symbolize API

This isn't what it will look like in final form, just get the minimum
there for us to use it with the bundled decoder (copied from libsysprof
with adaptations).
This commit is contained in:
Christian Hergert
2023-05-09 13:29:52 -07:00
parent d8d787c871
commit b625fec454
4 changed files with 183 additions and 17 deletions

View File

@ -21,6 +21,7 @@
#pragma once
#include "sysprof-document.h"
#include "sysprof-symbol.h"
#include "sysprof-symbolizer.h"
G_BEGIN_DECLS
@ -36,24 +37,32 @@ struct _SysprofSymbolizerClass
{
GObjectClass parent_class;
void (*prepare_async) (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*prepare_finish) (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
void (*prepare_async) (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*prepare_finish) (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
SysprofSymbol *(*symbolize) (SysprofSymbolizer *self,
gint64 time,
int pid,
SysprofAddress address);
};
void _sysprof_symbolizer_prepare_async (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean _sysprof_symbolizer_prepare_finish (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
void _sysprof_symbolizer_prepare_async (SysprofSymbolizer *self,
SysprofDocument *document,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean _sysprof_symbolizer_prepare_finish (SysprofSymbolizer *self,
GAsyncResult *result,
GError **error);
SysprofSymbol *_sysprof_symbolizer_symbolize (SysprofSymbolizer *self,
gint64 time,
int pid,
SysprofAddress address);
G_END_DECLS