libsysprof-analyze: track frame length

That way we don't have to decode this too in the subclasses.
This commit is contained in:
Christian Hergert
2023-04-25 17:09:04 -07:00
parent 62863f08c3
commit 97c93ea965
3 changed files with 30 additions and 12 deletions

View File

@ -114,6 +114,7 @@ sysprof_document_frame_init (SysprofDocumentFrame *self)
SysprofDocumentFrame *
_sysprof_document_frame_new (GMappedFile *mapped_file,
const SysprofCaptureFrame *frame,
guint16 frame_len,
gboolean needs_swap)
{
SysprofDocumentFrame *self;
@ -122,6 +123,7 @@ _sysprof_document_frame_new (GMappedFile *mapped_file,
self->mapped_file = g_mapped_file_ref (mapped_file);
self->frame = frame;
self->frame_len = frame_len;
self->needs_swap = !!needs_swap;
return self;