Commit Graph

33 Commits

Author SHA1 Message Date
1bcdb3aeac libsysprof-profile: do not discard on cancel our subprocess wait 2023-07-12 13:14:09 -07:00
1c08fc18b0 libsysprof-profile: fix success case 2023-07-10 13:07:40 -07:00
304943a03c libsysprof-profile: include spawnable information in metadata 2023-07-10 10:58:52 -07:00
a0befecfaa libsysprof-profile: add hostname to capture metadata 2023-07-10 10:51:18 -07:00
b82b2b5434 libsysprof-profile: add sysinfo metadata to capture 2023-07-10 10:47:27 -07:00
439ea30c2f libsysprof-profile: add more system information as metadata 2023-07-10 10:38:52 -07:00
22b2510179 libsysprof-profile: ignore some errors used to break out of loop 2023-07-09 15:01:07 -07:00
2d4ed4859d libsysprof-profile: add some system metadata/files
Very handy when trying to determine what the user setup is without having
to go back and forth on issue trackers.
2023-07-08 13:10:11 -07:00
79ac0a2c73 libsysprof-profile: add version info as metadata 2023-07-08 12:41:06 -07:00
3e57c638d8 libsysprof-profile: don't discard unhandled messages
We want to re-use our future for messages until we've received something.
Otherwise, every iteration we discard a message.
2023-07-08 11:59:55 -07:00
5ac95f70fe libsysprof-profile: flush writer when recording stops
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).
2023-07-08 11:59:19 -07:00
0643a2a6b4 libsysprof-profile: add some logging information 2023-07-08 11:58:33 -07:00
cbf12f07f8 libsysprof-profiler: add reader and FD helpers for recording 2023-07-08 11:19:18 -07:00
b56f0ad444 libsysprof-profile: add property for event count
So we can bind this to the recording pad and update it with each pass
through the loop.
2023-07-08 10:28:25 -07:00
d5a13ccdb4 libsysprof-profile: add duration property for recording
So we can use this to update a recording timer view.
2023-07-07 17:36:56 -07:00
1f6cc39554 libsysprof-profile: add SysprofDiagnostic to recordings
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.
2023-06-13 11:33:43 -07:00
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