Commit Graph

17 Commits

Author SHA1 Message Date
b38850f27d libsysprof-profile: ensure instruments finish recording
They may still be doing operations that need to complete before we can
move on to the augmentation phase.
2023-06-06 15:35:43 -07:00
390e764aa7 libsysprof-profile: spawn spawnable and escape upon exit
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.
2023-06-02 16:27:41 -07:00
5746add9c6 libsysprof-profile: give Profiler a spawnable
And pass it along to the recording so that it can manage spawning the
subprocess during the record loop.
2023-06-02 16:15:27 -07:00
e10ab3e32e libsysprof-profile: add augmentation phase to instruments
This allows an instrument to augment the capture with additional
information before the capture is closed/flushed to storage.
2023-06-02 12:59:01 -07:00
e3404dd0ca libsysprof-profile: update time range for recording
That way we don't have gaps at the edges.
2023-05-31 10:16:51 -07:00
81317bc1ca libsysprof-profile: add recording helper to capture file data
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.
2023-05-30 17:00:53 -07:00
df7da9bb41 libsysprof-profile: remove frame overhead from max data length
Just so that we can potentially fit multiple of these per buffering in the
capture writer.
2023-05-30 17:00:00 -07:00
f9be133913 libsysprof-profile: implement loading files via sysprofd
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.
2023-05-30 15:53:39 -07:00
14f71c5eee libsysprof-profile: add API to append a file to recording 2023-05-30 14:43:44 -07:00
7c98f782c0 libsysprof-profile: add getter for capture writer 2023-05-26 17:07:16 -07:00
8409022c5c libsysprof-profile: add record step to recording/instruments 2023-05-26 16:05:48 -07:00
800c32e303 libsysprof-profile: add private API to get recording spawnable
This will still need to be set by the profiler eventually, but this gets
the readback API in place so we can use it from instruments.
2023-05-26 15:37:39 -07:00
b4e6f7c915 libsysprof-profile: add recording session fiber
Setup instrument policy, preparation, etc.
2023-05-26 15:05:29 -07:00
07dc728bfe libsysprof-profile: change state on stop
We will need some more checks in here later on once we're doing things
with the instruments, but this gets the job done for now.
2023-05-25 17:24:33 -07:00
08aa970c7c libsysprof-analyze: add instruments to recording and list policy
We need to know all the policy that must be acquired upfront so that we
don't have to do individual queries on policy.
2023-05-25 17:05:16 -07:00
2ae33917b2 libsysprof-profile: add writer to recording object 2023-05-25 16:26:18 -07:00
93153d1943 libsysprof-profile: add scaffolding for base objects
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
2023-05-25 16:21:40 -07:00