mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add callgraph flags for thread-ids
This allows you to set a flag to show the thread id of what was recorded. Use this to help disassociate similar threads in a process to figure out which thread is consuming a majority of the Total time of that process.
This commit is contained in:
@ -43,6 +43,18 @@ sysprof_document_traceable_default_init (SysprofDocumentTraceableInterface *ifac
|
||||
g_param_spec_uint ("stack-depth", NULL, NULL,
|
||||
0, G_MAXUINT16, 0,
|
||||
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
||||
|
||||
/**
|
||||
* SysprofDocumentTraceable:thread-id:
|
||||
*
|
||||
* The "thread-id" property contains the thread identifier for the traceable.
|
||||
*
|
||||
* Since: 45
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_int ("thread-id", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
|
||||
}
|
||||
|
||||
guint
|
||||
@ -58,6 +70,12 @@ sysprof_document_traceable_get_stack_address (SysprofDocumentTraceable *self,
|
||||
return SYSPROF_DOCUMENT_TRACEABLE_GET_IFACE (self)->get_stack_address (self, position);
|
||||
}
|
||||
|
||||
int
|
||||
sysprof_document_traceable_get_thread_id (SysprofDocumentTraceable *self)
|
||||
{
|
||||
return SYSPROF_DOCUMENT_TRACEABLE_GET_IFACE (self)->get_thread_id (self);
|
||||
}
|
||||
|
||||
guint
|
||||
sysprof_document_traceable_get_stack_addresses (SysprofDocumentTraceable *self,
|
||||
guint64 *addresses,
|
||||
|
||||
Reference in New Issue
Block a user