This ensures that we only have one thread doing reloads of stack frame
depths at a time. While we only ref the reader in the state, it should
still be fine because cursors *always* make a copy of the reader for their
internal use. I don't think this should fix#23, but it may reduce the
chances of it happening.
It's unclear to me what could cause #23 to happen, unless for some reason
multiple threads were sharing the reader's internal buffer causing the
frame-> dereferences to be junk. But as stated with reader copies, that
should not be able to happen.
Another possible avenue is that the task is cancelled and for some reason
the task is clearing the task data while the thread is running. Again,
that is not supposed to be possible given the design of GTask as it
should not release task data until finalized.
This changes a couple of our structures to use the atomic rc box instead
of gslice directly. It shouldn't affect anything, just some general
modernization while looking at #23
On a Raspberry PI 4, Sysprof crashes immediately when
trying to memchr() on the 'line' variable. The current
RPI4 support is poor on Linux mainline admitedly, but
having Sysprof to work on it at least gives us a chance
to profile the major bottlenecks.
Protect against NULL 'line'.
The annotation applies to the method as a whole, not to individual
arguments, so the existing annotations don't have any effect.
This was hidden by gdbus-codegen's automatic handling of arguments
of type 'h', but that change was reverted, resulting in a broken
build.
GLib is already doing this, which broke a number of auto-generated code.
This tracks those changes and manually sets the annotations so that we
are guaranteed to get this behavior.
We'll need to fix other uses (such as in Mutter), but we have to do that
already because of the change in GLib.
Fixes#17
The goal here is to be able to locate all of the debug directories for
active flatpak runtimes so that we can possibly decode debug libraries
from them (after verifying build-id/CRC).
The goal of this helper is to simplify the process of parsing information
about mounts and the mountinfo for per-process maps. We should be able
to change sysprof-proc-source to use this and have better support for
getting the libraries within different mount namespaces.
This simplifies the visualizer sizing by avoiding the expanding sizes
when there is more space available. Doing so allows us to treat all the
sizing uniformly.
We can also make the ticks area a visualizer for more code re-use.
This is more reliable than using a PTY and allows us to use a regular
pipe to output data into a GIOChannel. This also changes the design to
use async IO watches for sample delivery.
This allows consumers to get a RAPL profiler object on the D-Bus at
org.gnome.Sysprof3 with path /org/gnome/Sysprof3/RAPL. This can be used
by the clients to record extra power statistics.
It requires the `turbostat` program to be installed, and is provided in
packages such as `kernel-tools` on Fedora. Distributions may want to
ensure that is available as a dependency of Sysprof, but it is not
strictly required.