libsysprof-analyze: add getter for callgraph from frame

This commit is contained in:
Christian Hergert
2023-06-09 15:57:16 -07:00
parent a7443e05f0
commit 12f32e8838
2 changed files with 18 additions and 0 deletions

View File

@ -227,3 +227,19 @@ sysprof_callgraph_frame_get_summary_augment (SysprofCallgraphFrame *self)
return sysprof_callgraph_get_summary_augment (self->callgraph, self->node);
}
/**
* sysprof_callgraph_frame_get_callgraph:
* @self: a #SysprofCallgraphFrame
*
* Gets the callgraph the frame belongs to.
*
* Returns: (transfer none) (nullable): a #SysprofCallgraph, or %NULL
*/
SysprofCallgraph *
sysprof_callgraph_frame_get_callgraph (SysprofCallgraphFrame *self)
{
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_FRAME (self), NULL);
return self->callgraph;
}

View File

@ -70,5 +70,7 @@ gpointer sysprof_callgraph_get_summary_augment (SysprofCallg
SysprofCallgraphNode *node);
SYSPROF_AVAILABLE_IN_ALL
SysprofCallgraphNode *sysprof_callgraph_node_parent (SysprofCallgraphNode *node);
SYSPROF_AVAILABLE_IN_ALL
SysprofCallgraph *sysprof_callgraph_frame_get_callgraph (SysprofCallgraphFrame *self);
G_END_DECLS