So changing this was a little backwards. The goal here is to allow using
libsysprof-2 without polkit, it just won't have the ability to elevate
privileges.
Just a quick workaround to use a tmpfile if memfd is not available. We
should try to ensure that we get something on tmpfs, but this is probably
good enough for a fallback.
We can use this to notify the user that not enough samples where collected
to build a callgraph. This can happen when all the samples collected are
ignored (due to being in ignored kernel space address ranges for example).
We keep the start time as a iso8601 string, which is useful, but not
enough for relative timestamps to the epoch (start time). Include a
clock time in the same clock domain.
We were not getting the proper value for time. We need sample_id_all set
according to my cursory reading of the core.c in the kernel. Also, the
time is aligned to 64-bit (after the comm field).
We might want to add a CTRADD type later on, for relative values rather
than absolute. But this should get us started.
Simply define counters upfront, and then set them during the capture
process.
Obviously, we need to come up with a good way to visualize this
information in the UI.
If we reuse the profiler instance (not convinced this is a good idea yet)
then we could have a nonzero elapsed time. Reset it immediately so that
the UI doesn't jitter between the previous value and 00:00.
Without this, after logging in you are already multiple seconds into your
profiling session recording. Not ideal. So instead, we do the async polkit
auth upfront during SpSource::prepare(), and then toggle ready after we
have received notification.
For some systems, such as embedded Linux including ARM, we might want to
just compile libsysprof/sysprof-cli without the GTK user interface. This
allows for that. You can copy the capture files to your visualization
host to render the results.
This will make it easier to support installing just sysprof-cli and the
sysprofd helper daemon on systems where GTK is not feasible or necessary.
This does not, however, do that. It simply gets things broken up into
pieces.
Similar to the old sysprof, this generates a textual representation of the
descendants view. It matches the expansion of the treeview in the output
text.
When we see addresses in libgobject-introspection, give them the
"Introspection" tag to make it clear which library the symbol came from.
This is particularly useful since so many functions overlap with g_
prefixes.
Sometimes its really annoying to dive into a descendant and then want to
go back to where you were. This uses alt+left arrow to go back to the
previous node. It doesn't, however, re-expand the tree to the previous
state.
This is a major redesign a modernization of Sysprof. The core data
structures and design are largely the same, but it has been ported to
Gtk3 and has lots of additions that should make your profiling experience
smoother. Especially for those that are new to profiling.
There are some very simple help docs added, but we really need the
experts to come in and write some documentation here.