If a new process is spawned after the recording has started (processes
spawned *by* sysprof are done before recording starts) then try to extract
information about that process and append it to the recording.
The goal here is to get enough process information to actually decode the
process without creating fork()/exec() amplification.
Related GNOME/gnome-builder#2090
This is more of what we want to be doing anyway, we don't care about all
the forks in existence.
Additionally, include the comm[] with the pid so that instruments can take
action based on it.
This starts the perf streams from prepare instead of from record so that
we can do the linux instrument work in prepare. The samples are dropped
until our start-time is set.
Doing it this way removes sysprof-cli and sysprofd greatly from the
overhead in the callgraph which is useful so that the user gets to see
what they really care about.
It has the added benefit that we're less likely to see the pkla processes
showing up from authorizing our D-Bus connection for creating per streams.
Otherwise we end up recording ourselves too much. Do it before even though
there is a small race condition chance to miss a process spawning at the
time between prepare and record.
We might want a secondary instrument for this eventually, but for now we'll
just attach it in the Linux instrument.
This takes the output of eglinfo and glxinfo and adds it as a file in the
capture syscap. Compressed of course to keep the size smaller.
This brings together the two libraries back into one now that the whole
design is pretty well sorted out. They depend on roughly the same libraries
anyway and it's way easier of the single library can both read and write
the capture files (along with bringing in libsysprof-capture symbols in
a single place).