This doesn't start reading from the input stream, but does get things into
place until we actually start processing the recording. When we get a
record vfunc, we will do the input processing.
Also, I no longer wish to try to maintain support for no-polkit. If there
is truly a system where that is something we want to support, we can bring
back the shims as a compile time alternative.
Being able to manage asynchronous operations with libdex will drastically
simplify how we implement the profiler and instruments. We may eventually
do the same with libsysprof-analyze to parallelize some operations.
The idea here is that we stop having instruments do their own policy
checking and instead do the policy checking as a set from the recording
as part of prepare/etc.
The goal here is to have a fairly small exposed API surface for profiling
similar to libsysprof-analyze where implementation details are hidden.
SysprofProfiler - Where you setup your recording
SysprofInstrument - What you add to a profiler to extract data
SysprofRecording - Represents an active recording w/ instruments
I want to move a bunch of this "contrib" style sources into their own
area so we can statically link them but keep them separate from main
sysprof code.
We need to do what binfile was doing and make the address relative to the
text_offset. We also need to ignore the text offset of the debuglink files
and pass it the text_offset of the original ELF.
This fixes a bunch of symbolization in the callgraph.
This just serves as a prototyping ground so that we can have a callgraph
view widget in the future based on these principles. It also shows some
areas that still need work, such as sorting within the tree and fixing the
text offset calculation for ELF symbols.
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.