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).
This commit is contained in:
Christian Hergert
2023-07-08 11:59:19 -07:00
parent 0643a2a6b4
commit 5ac95f70fe

View File

@ -215,6 +215,9 @@ stop_recording:
/* Update start/end times to be the "running time" */
_sysprof_capture_writer_set_time_range (self->writer, begin_time, end_time);
/* Clear buffers and ensure the disk layer has access to them */
sysprof_capture_writer_flush (self->writer);
if (error != NULL)
return dex_future_new_for_error (g_steal_pointer (&error));