This allows visualizing currently applied filters, and remove individual
and all filters applied.
Currently the only filter that can show up is the mark filter, but in
the future new filters may be applied.
It's a GtkFilter implementation that takes a marks catalog, and filters
frames based on whether the timestamps of the frames hit any mark in
the catalog.
Internally this uses an augmented RB tree based on sys/tree.h. The
augment is a timestamp interval. This tree is used to store the mark
intervals and perform the hit test.
This can probably be optimized / improved by building the tree on
demand but as is, this code seems to be able to handle dozens of
thousands of marks without any visible choke.
This tells the SysprofProfiler that it should avoid using sysprofd unless
for some reason that instrument simply cannot work without it. Currently
that is at least the RAPL and user-space stack decoding instruments
but there may be others.
If this property is set to TRUE (the default) it queries sysprofd and
policy-kit for appropriate privileges. That generally means that the
instruments will use sysprofd to get access to things like /proc files,
perf event streams, and what not.
If set to FALSE, then this tells the instruments that they should try to
do that work locally instead of querying the sysprofd instance via D-Bus.
If we were provided a D-Bus connection to use for sysprofd then use that.
Otherwise, try to fallback to doing the work in process without the help
of sysprofd.
If we are setup without a D-Bus connection to use to talk to sysprofd then
try to perform the syscall() directly for perf_event_open.
Generally that means you need to be root.
This is used to tell the instruments what GDBusConnection they should use
to query sysprofd. Lack of a connection means they should try to do things
in process without querying sysprofd.
This helper allows us to get the file locally or via sysprofd when the
GDBusConnection is provided.
Be careful about use as your local /proc may be different than the
"system" /proc where sysprofd lives.
In map_head_and_body_twice(), the second mmap call fails:
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xf64a2000
mmap2(0xf64b3000, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0x1000) = -1 EINVAL (Invalid argument)
Due to cache issues, all shared mapping of a page must be equivalently
mapped. This requires page mappings to be at the same virtual address
modulo 4 MB. Due to a kernel limitation, all mappings to a file must
be equivalent.
The test can be fixed by rounding the buffer_size used in the mapped
ring buffer to 4 MB on hppa. This makes the two mmap mappings equivalent.
Bug-Debian: https://bugs.debian.org/1021853
This adds a property instead of the global to key off if the debuginfod
resolver should be used to bundle symbols into the capture at the
augmentation point post-capture.
This defaults to off because we do not want to auto-include them when
recording from the GTK UI (as we'd spend a bunch of time not showing a
window) but we do want to include them from sysprof-cli as that could
be running on a remote machine/container/vm with different debug URLs.
In the future, that could be improved with a different UI flow though.
Related: #130
This ensures that the document loader can apply settings from the recording
template (thusly applying future options such as debuginfod or extra debug
directories).
Related: #130
These are both available in other ways from the window. The close button
will quit the app if it's the last window. The Open File button at the
bottom handles Open and makes it more clear you can tweak things using the
profiler settings now.
Related: #130
This sets things up to save the state to disk if the greeter suceeded at
creating a profiler instance so that it may be used again on the next
run. Additionally, when loading the greeter it attempts to load from disk
the saved state.
We may want to extend this in the future to allow using sysprof-cli with
a recording template instead of command line options.