This instrument does as our previous symbols_source did and will augment
the capture with additional symbols that improves the chances you'll get
proper symbolization on machines that did not create the capture.
This removes -Dagent and just uses -Dtools as it only affects sysprof-cli
and sysprof-agent. We still need to patch sysprof-cli for recent changes
as we did for sysprof-agent though.
Additionally, we haven't used the v2 service in forever, so drop that as
I can't imagine anyone has been using it.
It can be handy to get system information from journald to correlate with
what is going on in applications. This simple journald tail GSource will
dispatch to our callback which can append the logs to the capture.
This uses a custom callback rather than the GSourceFunc because that seems
a bit annoying to use with recent GCC function equivalence checks.
We need to at least submit this data to the underlying FD from our buffer
when we stop recording so that anyone consuming the FD will have access to
it. (Such as a SysprofDocumentLoader via FD).
This allows setting the net.hadess.PowerProfiles during the execution of
the Sysprof run. This is handy if you want to test in a specific mode (such
as performance) but not leave your system in that state.
This ensures that we don't clobber things by writing them without possible
translation. That is problematic when each controlfd process might have
it's own counter registration or JIT maps as they could collide with the
main writer's own state.
This fixes some situations where the counter data was coming in with
erroneous values.
This is like sample but has an "enter/exit" flag with it. This can be
useful when you want to provide tracing instead of sampling. We use a
different frame type so that we can denote that this isn't traditional
sampling, and the flag can be used to find the next exit for the current
enter for calculating durations.
The entire stack trace is provided to make things easier on tools
which may want to deal with indirect functions that were not instrumented
but can be unwound. That may allow for tooling to give the user some
insight that it's not *just* this function entering, but some functions
before it were entered too.
This also adds a SysprofTracer instrument which will preload a
libsysprof-tracer-6.so into the process providing the
__cyg_profile_func_enter() and __cyg_profile_func_leave() hooks.
This allows instruments to record a diagnostic and have it land as an
object in a GListModel of diagnostics available to the API consumer.
Such items may be used by recording UI to display issues with the recording
to the user.