mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: track relative offset for frame
This is handy so that we don't have to keep multiple objects around to handle this request. Otherwise we'd need to keep references to the document and that is a bit annoying. This of course has a limit of about an hour (in tv_nsec), but that is far longer than we can realistically record anyway.
This commit is contained in:
@ -34,6 +34,7 @@ struct _SysprofDocumentFrame
|
||||
guint32 frame_len : 16;
|
||||
guint32 needs_swap : 1;
|
||||
guint32 padding : 15;
|
||||
guint32 time_offset;
|
||||
};
|
||||
|
||||
struct _SysprofDocumentFrameClass
|
||||
@ -44,7 +45,8 @@ struct _SysprofDocumentFrameClass
|
||||
SysprofDocumentFrame *_sysprof_document_frame_new (GMappedFile *mapped,
|
||||
const SysprofCaptureFrame *frame,
|
||||
guint16 frame_len,
|
||||
gboolean needs_swap);
|
||||
gboolean needs_swap,
|
||||
gint64 clock_at_start);
|
||||
|
||||
#define SYSPROF_DOCUMENT_FRAME_ENDPTR(obj) \
|
||||
(&((const guint8 *)SYSPROF_DOCUMENT_FRAME(obj)->frame)[SYSPROF_DOCUMENT_FRAME(obj)->frame_len])
|
||||
|
||||
Reference in New Issue
Block a user