mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof: add category name private helper
This commit is contained in:
@ -94,5 +94,6 @@ void _sysprof_callgraph_node_free (SysprofCallgrap
|
|||||||
SysprofCallgraphCategory _sysprof_callgraph_node_categorize (SysprofCallgraphNode *node);
|
SysprofCallgraphCategory _sysprof_callgraph_node_categorize (SysprofCallgraphNode *node);
|
||||||
void _sysprof_callgraph_categorize (SysprofCallgraph *self,
|
void _sysprof_callgraph_categorize (SysprofCallgraph *self,
|
||||||
SysprofCallgraphNode *node);
|
SysprofCallgraphNode *node);
|
||||||
|
const char *_sysprof_callgraph_category_get_name (SysprofCallgraphCategory category);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -128,11 +128,9 @@ sysprof_category_summary_get_fraction (SysprofCategorySummary *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
sysprof_category_summary_get_category_name (SysprofCategorySummary *self)
|
_sysprof_callgraph_category_get_name (SysprofCallgraphCategory category)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (SYSPROF_IS_CATEGORY_SUMMARY (self), NULL);
|
switch (category)
|
||||||
|
|
||||||
switch (self->category)
|
|
||||||
{
|
{
|
||||||
case SYSPROF_CALLGRAPH_CATEGORY_UNCATEGORIZED:
|
case SYSPROF_CALLGRAPH_CATEGORY_UNCATEGORIZED:
|
||||||
return _("Uncategorized");
|
return _("Uncategorized");
|
||||||
@ -203,3 +201,11 @@ sysprof_category_summary_get_category_name (SysprofCategorySummary *self)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
sysprof_category_summary_get_category_name (SysprofCategorySummary *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (SYSPROF_IS_CATEGORY_SUMMARY (self), NULL);
|
||||||
|
|
||||||
|
return _sysprof_callgraph_category_get_name (self->category);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user