mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +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);
|
||||
void _sysprof_callgraph_categorize (SysprofCallgraph *self,
|
||||
SysprofCallgraphNode *node);
|
||||
const char *_sysprof_callgraph_category_get_name (SysprofCallgraphCategory category);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -128,11 +128,9 @@ sysprof_category_summary_get_fraction (SysprofCategorySummary *self)
|
||||
}
|
||||
|
||||
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 (self->category)
|
||||
switch (category)
|
||||
{
|
||||
case SYSPROF_CALLGRAPH_CATEGORY_UNCATEGORIZED:
|
||||
return _("Uncategorized");
|
||||
@ -203,3 +201,11 @@ sysprof_category_summary_get_category_name (SysprofCategorySummary *self)
|
||||
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