[sysprof] libsysprof-capture: update end time for marks
- From: Christian Hergert <chergert src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [sysprof] libsysprof-capture: update end time for marks
 
- Date: Wed, 29 May 2019 22:25:13 +0000 (UTC)
 
commit 7a0132ac927fde455d11dd7e1671ef89f83df747
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 13 14:50:22 2019 -0700
    libsysprof-capture: update end time for marks
 src/libsysprof-capture/sysprof-capture-reader.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/libsysprof-capture/sysprof-capture-reader.c b/src/libsysprof-capture/sysprof-capture-reader.c
index e43cea7..70e1757 100644
--- a/src/libsysprof-capture/sysprof-capture-reader.c
+++ b/src/libsysprof-capture/sysprof-capture-reader.c
@@ -487,6 +487,10 @@ sysprof_capture_reader_read_mark (SysprofCaptureReader *self)
   mark->name[sizeof mark->name - 1] = 0;
   self->buf[self->pos + mark->frame.len - 1] = 0;
 
+  /* Maybe update end-time */
+  if G_UNLIKELY ((mark->frame.time + mark->duration) > self->end_time)
+    self->end_time = mark->frame.time + mark->duration;
+
   return mark;
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]