diff --git a/src/libsysprof-profile/sysprof-recording.c b/src/libsysprof-profile/sysprof-recording.c index 25e1d35c..43fb45bf 100644 --- a/src/libsysprof-profile/sysprof-recording.c +++ b/src/libsysprof-profile/sysprof-recording.c @@ -162,6 +162,12 @@ stop_recording: */ g_cancellable_cancel (cancellable); + /* But we must still wait for instruments to respond to + * the cancellation and clean up before we can move onto + * the augmentation phase. + */ + dex_await (dex_ref (record), NULL); + /* Let instruments augment the capture. Some instruments may include * extra information about the capture such as symbol names and their * address ranges per-process.