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.
This commit is contained in:
Christian Hergert
2023-06-02 12:59:01 -07:00
parent 60ecde017f
commit e10ab3e32e
3 changed files with 38 additions and 1 deletions

View File

@ -44,6 +44,8 @@ struct _SysprofInstrumentClass
DexFuture *(*record) (SysprofInstrument *self,
SysprofRecording *recording,
GCancellable *cancellable);
DexFuture *(*augment) (SysprofInstrument *self,
SysprofRecording *recording);
DexFuture *(*process_started) (SysprofInstrument *self,
SysprofRecording *recording,
int pid);
@ -56,6 +58,8 @@ DexFuture *_sysprof_instruments_prepare (GPtrArray *instruments,
DexFuture *_sysprof_instruments_record (GPtrArray *instruments,
SysprofRecording *recording,
GCancellable *cancellable);
DexFuture *_sysprof_instruments_augment (GPtrArray *instruments,
SysprofRecording *recording);
DexFuture *_sysprof_instruments_process_started (GPtrArray *instruments,
SysprofRecording *recording,
int pid);