mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: better empty check
This commit is contained in:
@ -514,14 +514,18 @@ sysprof_callgraph_profile_get_stash (SysprofCallgraphProfile *self)
|
|||||||
gboolean
|
gboolean
|
||||||
sysprof_callgraph_profile_is_empty (SysprofCallgraphProfile *self)
|
sysprof_callgraph_profile_is_empty (SysprofCallgraphProfile *self)
|
||||||
{
|
{
|
||||||
|
StackNode *root;
|
||||||
|
|
||||||
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), FALSE);
|
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), FALSE);
|
||||||
|
|
||||||
return self->stash == NULL;
|
return (self->stash == NULL ||
|
||||||
|
!(root = stack_stash_get_root (self->stash)) ||
|
||||||
|
!root->total);
|
||||||
}
|
}
|
||||||
|
|
||||||
GQuark
|
GQuark
|
||||||
sysprof_callgraph_profile_get_tag (SysprofCallgraphProfile *self,
|
sysprof_callgraph_profile_get_tag (SysprofCallgraphProfile *self,
|
||||||
const gchar *symbol)
|
const gchar *symbol)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), 0);
|
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_PROFILE (self), 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user