mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: externalize access to frames array
This can be useful to optimize some walking paths in other layers.
This commit is contained in:
@ -28,6 +28,12 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _SysprofDocumentFramePointer
|
||||||
|
{
|
||||||
|
guint64 offset : 48;
|
||||||
|
guint64 length : 16;
|
||||||
|
} SysprofDocumentFramePointer;
|
||||||
|
|
||||||
typedef struct _SysprofDocumentTimedValue
|
typedef struct _SysprofDocumentTimedValue
|
||||||
{
|
{
|
||||||
gint64 time;
|
gint64 time;
|
||||||
@ -74,5 +80,6 @@ SysprofSymbol *_sysprof_document_thread_symbol (SysprofDocument *self,
|
|||||||
int pid,
|
int pid,
|
||||||
int tid);
|
int tid);
|
||||||
SysprofSymbol *_sysprof_document_kernel_symbol (SysprofDocument *self);
|
SysprofSymbol *_sysprof_document_kernel_symbol (SysprofDocument *self);
|
||||||
|
GArray *_sysprof_document_get_frames (SysprofDocument *self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -106,12 +106,6 @@ struct _SysprofDocument
|
|||||||
guint needs_swap : 1;
|
guint needs_swap : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _SysprofDocumentFramePointer
|
|
||||||
{
|
|
||||||
guint64 offset : 48;
|
|
||||||
guint64 length : 16;
|
|
||||||
} SysprofDocumentFramePointer;
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_ALLOCATIONS,
|
PROP_ALLOCATIONS,
|
||||||
@ -2676,3 +2670,11 @@ sysprof_document_save_finish (SysprofDocument *self,
|
|||||||
|
|
||||||
return g_task_propagate_boolean (G_TASK (result), error);
|
return g_task_propagate_boolean (G_TASK (result), error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GArray *
|
||||||
|
_sysprof_document_get_frames (SysprofDocument *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), NULL);
|
||||||
|
|
||||||
|
return g_array_ref (self->frames);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user