libsysprof-analyze: add SysprofProcessInfo

This internal type is used to collect things about a process like the
memory maps, address layout, and symbol cache. This can persist once
parsed at startup, then applied to objects created on demand such as the
SysprofDocumentProcess or used by symbolizers internally rather than
complicated function arguments.
This commit is contained in:
Christian Hergert
2023-05-11 12:21:32 -07:00
parent ccd790fef5
commit 9b5e25037b
12 changed files with 275 additions and 109 deletions

View File

@ -25,6 +25,7 @@
#include "sysprof-symbol.h"
#include "sysprof-symbolizer.h"
#include "sysprof-mount-namespace-private.h"
#include "sysprof-process-info-private.h"
G_BEGIN_DECLS
@ -39,34 +40,30 @@ 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);
SysprofSymbol *(*symbolize) (SysprofSymbolizer *self,
SysprofMountNamespace *mount_namespace,
SysprofAddressLayout *address_layout,
int pid,
SysprofAddress address);
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,
const SysprofProcessInfo *process_info,
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);
SysprofSymbol *_sysprof_symbolizer_symbolize (SysprofSymbolizer *self,
SysprofMountNamespace *mount_namespace,
SysprofAddressLayout *address_layout,
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);
SysprofSymbol *_sysprof_symbolizer_symbolize (SysprofSymbolizer *self,
const SysprofProcessInfo *process_info,
SysprofAddress address);
G_END_DECLS