libsysprof-analyze: add vfunc for getting stack addresses

This allows us to avoid the function call overhead for each of the
instruction pointers in the stack trace. Instead let the interface handle
the decoding of the whole set.
This commit is contained in:
Christian Hergert
2023-05-24 12:44:26 -07:00
parent 059aec5a1e
commit f7882d5c5f
4 changed files with 41 additions and 16 deletions

View File

@ -34,9 +34,12 @@ struct _SysprofDocumentTraceableInterface
{
GTypeInterface parent;
guint (*get_stack_depth) (SysprofDocumentTraceable *self);
guint64 (*get_stack_address) (SysprofDocumentTraceable *self,
guint position);
guint (*get_stack_depth) (SysprofDocumentTraceable *self);
guint64 (*get_stack_address) (SysprofDocumentTraceable *self,
guint position);
guint (*get_stack_addresses) (SysprofDocumentTraceable *self,
guint64 *addresses,
guint n_addresses);
};
SYSPROF_AVAILABLE_IN_ALL