mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add summary augmentation capabilities
This allows us to have augmentation at the summary level so that things like the weighted callgraph or memprof callgraph can add their respective summary data up the chain of function calls.
This commit is contained in:
@ -176,7 +176,7 @@ sysprof_callgraph_frame_get_symbol (SysprofCallgraphFrame *self)
|
||||
if (self->callgraph == NULL)
|
||||
return NULL;
|
||||
|
||||
return self->node->symbol;
|
||||
return self->node->summary->symbol;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -197,3 +197,23 @@ sysprof_callgraph_frame_get_augment (SysprofCallgraphFrame *self)
|
||||
|
||||
return sysprof_callgraph_get_augment (self->callgraph, self->node);
|
||||
}
|
||||
|
||||
/**
|
||||
* sysprof_callgraph_frame_get_summary_augment: (skip)
|
||||
* @self: a #SysprofCallgraphFrame
|
||||
*
|
||||
* Gets the augmentation that was attached to the summary for
|
||||
* the callgraph node's symbol.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the augmentation data
|
||||
*/
|
||||
gpointer
|
||||
sysprof_callgraph_frame_get_summary_augment (SysprofCallgraphFrame *self)
|
||||
{
|
||||
g_return_val_if_fail (SYSPROF_IS_CALLGRAPH_FRAME (self), NULL);
|
||||
|
||||
if (self->callgraph == NULL)
|
||||
return NULL;
|
||||
|
||||
return sysprof_callgraph_get_summary_augment (self->callgraph, self->node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user