mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: expose properties for some data
This commit is contained in:
@ -102,6 +102,8 @@ typedef struct _SysprofDocumentFramePointer
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_ALLOCATIONS,
|
||||
PROP_SAMPLES,
|
||||
PROP_TIME_SPAN,
|
||||
N_PROPS
|
||||
};
|
||||
@ -267,6 +269,14 @@ sysprof_document_get_property (GObject *object,
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_ALLOCATIONS:
|
||||
g_value_take_object (value, sysprof_document_list_allocations (self));
|
||||
break;
|
||||
|
||||
case PROP_SAMPLES:
|
||||
g_value_take_object (value, sysprof_document_list_samples (self));
|
||||
break;
|
||||
|
||||
case PROP_TIME_SPAN:
|
||||
g_value_set_boxed (value, sysprof_document_get_time_span (self));
|
||||
break;
|
||||
@ -284,6 +294,16 @@ sysprof_document_class_init (SysprofDocumentClass *klass)
|
||||
object_class->finalize = sysprof_document_finalize;
|
||||
object_class->get_property = sysprof_document_get_property;
|
||||
|
||||
properties [PROP_ALLOCATIONS] =
|
||||
g_param_spec_object ("allocations", NULL, NULL,
|
||||
G_TYPE_LIST_MODEL,
|
||||
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
properties [PROP_SAMPLES] =
|
||||
g_param_spec_object ("samples", NULL, NULL,
|
||||
G_TYPE_LIST_MODEL,
|
||||
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
properties [PROP_TIME_SPAN] =
|
||||
g_param_spec_boxed ("time-span", NULL, NULL,
|
||||
SYSPROF_TYPE_TIME_SPAN,
|
||||
|
||||
Reference in New Issue
Block a user