libsysprof-capture: add metadata frame type

This will allow sources and aids to discover information about what was
done between capture loading and saving.
This commit is contained in:
Christian Hergert
2019-05-19 21:57:52 -07:00
parent 53a337bf00
commit db9aea95ea
9 changed files with 189 additions and 2 deletions

View File

@ -272,6 +272,23 @@ main (gint argc,
break;
}
case SYSPROF_CAPTURE_FRAME_METADATA:
{
const SysprofCaptureMetadata *frame;
if (!(frame = sysprof_capture_reader_read_metadata (reader)))
goto panic;
sysprof_capture_writer_add_metadata (writer,
frame->frame.time,
frame->frame.cpu,
frame->frame.pid,
frame->id,
frame->metadata,
frame->frame.len - G_STRUCT_OFFSET (SysprofCaptureMetadata, metadata));
break;
}
case SYSPROF_CAPTURE_FRAME_JITMAP:
{
GHashTable *jitmap;