We can use the new infinite future here to mimic running forever when there
is no spawnable. Otherwise, if the spawnable exits we want to break out
of the recording loop.
We might have the file data from the peer and can specify the data in the
capture writer directly.
It may be useful to allow compressing these too, but we can deal with that
at a later time.
If we need access to a privileged file in /proc or /sys we need to get
that through sysprofd. This implements basic checking of paths to see
if we need to get a /proc file from there.
We can't use the GetProfFD variant because that may still cause errors
when reading back due to how selinux and other LSMs may restrict read()
to get kallsyms.
This requires recent API additions in libdex.
The goal here is to have a fairly small exposed API surface for profiling
similar to libsysprof-analyze where implementation details are hidden.
SysprofProfiler - Where you setup your recording
SysprofInstrument - What you add to a profiler to extract data
SysprofRecording - Represents an active recording w/ instruments