libsysprof-analyze: add batch getter for stack addresses

This allows caching the interface vfunc to reduce the overhead of accessing
each instruction pointer in the array.
This commit is contained in:
Christian Hergert
2023-05-04 10:02:53 -07:00
parent 00d8081bfe
commit e8531ebe58
2 changed files with 28 additions and 3 deletions

View File

@ -40,9 +40,13 @@ struct _SysprofDocumentTraceableInterface
};
SYSPROF_AVAILABLE_IN_ALL
guint sysprof_document_traceable_get_stack_depth (SysprofDocumentTraceable *self);
guint sysprof_document_traceable_get_stack_depth (SysprofDocumentTraceable *self);
SYSPROF_AVAILABLE_IN_ALL
guint64 sysprof_document_traceable_get_stack_address (SysprofDocumentTraceable *self,
guint position);
guint64 sysprof_document_traceable_get_stack_address (SysprofDocumentTraceable *self,
guint position);
SYSPROF_AVAILABLE_IN_ALL
guint sysprof_document_traceable_get_stack_addresses (SysprofDocumentTraceable *self,
guint64 *addresses,
guint n_addresses);
G_END_DECLS