This has an indirect object (SysprofCallgraphSymbol) so that we can provide
plumbing to get the callgraph as well as the augmented data from the
indirection object.
This allows for callgraphs to show overview in the functions list which
contains the same augmentation that the descendants view does.
This interjects a node for unwindable traces so that cost gets accounted
to the process, but is not just at the [process] graph item as that makes
it very hard to subtract to figure out what it was.
Instead just insert an [Unwindable] node and cost-account to that.
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.
We still need to figure out the right way to plumb in the augmentation data
so that things that need to walk up the chain are possible, but this first
gets things in order to do that.
If our entire stack was in kernel address context, inject the
"- - Kernel - -" symbol at the top of the stack trace so that accounting
gets properly assigned to the kernel. This is typical with kernel processes
such as kworker.
We may need to know the final address context so we can inject symbols as
necessary into the top of the callgraph. We know it when generating the
symbols, so just yield it to the caller too.
This creates a SysprofCallgraph object which is a GListModel of
SysprofCallgraphFrame. The SysprofCallgraphFrame is also a GListModel of
SysprofCallgraphFrame so that we can map this all into a GtkListView in
the future for tree-like visibility.
The augmentation allows for the same callgraph code to be used for multiple
scenarios such as CPU sampling as well as memory allocation tracking.
If your augmentation size is <=sizeof(void*) then you do not occur an extra
allocation and you can use the inline augmentation space.
The test-callgraph clearly shows that we still need to do the shuffling
of -- Kernel -- and -- User -- like the old callgraph code did. But that
will come soon enough.