diff --git a/src/libsysprof-analyze/sysprof-document-frame-private.h b/src/libsysprof-analyze/sysprof-document-frame-private.h index 6035313e..82ad8e2e 100644 --- a/src/libsysprof-analyze/sysprof-document-frame-private.h +++ b/src/libsysprof-analyze/sysprof-document-frame-private.h @@ -42,18 +42,6 @@ struct _SysprofDocumentFrameClass GObjectClass parent_class; }; -struct _SysprofDocumentMark -{ - SysprofDocumentFrame parent_instance; - double begin_fraction; - double end_fraction; -}; - -struct _SysprofDocumentMarkClass -{ - SysprofDocumentFrameClass parent_class; -}; - SysprofDocumentFrame *_sysprof_document_frame_new (GMappedFile *mapped, const SysprofCaptureFrame *frame, guint16 frame_len, diff --git a/src/libsysprof-analyze/sysprof-document-frame.c b/src/libsysprof-analyze/sysprof-document-frame.c index e6f7e7dd..25af7f93 100644 --- a/src/libsysprof-analyze/sysprof-document-frame.c +++ b/src/libsysprof-analyze/sysprof-document-frame.c @@ -220,16 +220,6 @@ _sysprof_document_frame_new (GMappedFile *mapped_file, /* loose precision here after about 71 minutes */ self->time_offset = (guint)time_offset; - if (frame->type == SYSPROF_CAPTURE_FRAME_MARK) - { - SysprofDocumentMark *mark = (SysprofDocumentMark *)self; - gint64 capture_duration = end_time - begin_time; - gint64 duration = sysprof_document_mark_get_duration (mark); - - mark->begin_fraction = time_offset / (double)capture_duration; - mark->end_fraction = (time_offset + duration) / (double)capture_duration; - } - return self; } diff --git a/src/libsysprof-analyze/sysprof-document-mark.c b/src/libsysprof-analyze/sysprof-document-mark.c index 43c51f3a..bf7de40a 100644 --- a/src/libsysprof-analyze/sysprof-document-mark.c +++ b/src/libsysprof-analyze/sysprof-document-mark.c @@ -23,6 +23,17 @@ #include "sysprof-document-frame-private.h" #include "sysprof-document-mark.h" +struct _SysprofDocumentMark +{ + SysprofDocumentFrame parent_instance; +}; + +struct _SysprofDocumentMarkClass +{ + SysprofDocumentFrameClass parent_class; +}; + + enum { PROP_0, PROP_DURATION, @@ -149,29 +160,3 @@ sysprof_document_mark_get_message (SysprofDocumentMark *self) return SYSPROF_DOCUMENT_FRAME_CSTRING (self, mark->message); } - -/** - * sysprof_document_mark_get_time_fraction: - * @self: a #SysprofDocumentMark - * @begin_fraction: (out) (nullable): a location for the begin - * time as a fraction - * @end_fraction: (out) (nullable): a location for the end - * time as a fraction - * - * Gets the begin/end time of the mark as a fraction between 0 and 1. - * - * 0 is the beginning of the capture, 1 is the end of the capture. - */ -void -sysprof_document_mark_get_time_fraction (SysprofDocumentMark *self, - double *begin_fraction, - double *end_fraction) -{ - g_return_if_fail (SYSPROF_IS_DOCUMENT_MARK (self)); - - if (begin_fraction) - *begin_fraction = self->begin_fraction; - - if (end_fraction) - *end_fraction = self->end_fraction; -} diff --git a/src/libsysprof-analyze/sysprof-document-mark.h b/src/libsysprof-analyze/sysprof-document-mark.h index e549f597..99bd7550 100644 --- a/src/libsysprof-analyze/sysprof-document-mark.h +++ b/src/libsysprof-analyze/sysprof-document-mark.h @@ -33,19 +33,15 @@ typedef struct _SysprofDocumentMark SysprofDocumentMark; typedef struct _SysprofDocumentMarkClass SysprofDocumentMarkClass; SYSPROF_AVAILABLE_IN_ALL -GType sysprof_document_mark_get_type (void) G_GNUC_CONST; +GType sysprof_document_mark_get_type (void) G_GNUC_CONST; SYSPROF_AVAILABLE_IN_ALL -gint64 sysprof_document_mark_get_duration (SysprofDocumentMark *self); +gint64 sysprof_document_mark_get_duration (SysprofDocumentMark *self); SYSPROF_AVAILABLE_IN_ALL -const char *sysprof_document_mark_get_group (SysprofDocumentMark *self); +const char *sysprof_document_mark_get_group (SysprofDocumentMark *self); SYSPROF_AVAILABLE_IN_ALL -const char *sysprof_document_mark_get_name (SysprofDocumentMark *self); +const char *sysprof_document_mark_get_name (SysprofDocumentMark *self); SYSPROF_AVAILABLE_IN_ALL -const char *sysprof_document_mark_get_message (SysprofDocumentMark *self); -SYSPROF_AVAILABLE_IN_ALL -void sysprof_document_mark_get_time_fraction (SysprofDocumentMark *self, - double *begin_fraction, - double *end_fraction); +const char *sysprof_document_mark_get_message (SysprofDocumentMark *self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMark, g_object_unref)