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.
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 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.
This is a SysprofInstrument that will eventually contain the contents of
the sysprof-battery-source.c to get battery charge/rate/etc. Note that
this is different from energy usage which will come from RAPL.
This starts porting the old perf code from libsysprof into
libsysprof-profile. It does not bring over tracepoints yet, because we
need to think about how we want to support that. I may opt to do that as
a separate instrument even if that takes an additional perf fd.
The goal here is to do the whole thing on a fiber rather than how we were
doing it before. This just gets the counter registration going, but we
need to follow up with the parsing/lseek/etc code.