[sysprof] libsysprof: check for time series after extracting processes



commit b6dc058d62fc413d89a2ff8e66b5ddb73414b6dd
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 18 13:17:49 2020 -0800

    libsysprof: check for time series after extracting processes

 src/libsysprof/sysprof-memprof-profile.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libsysprof/sysprof-memprof-profile.c b/src/libsysprof/sysprof-memprof-profile.c
index 7f9b0c5..2dfe962 100644
--- a/src/libsysprof/sysprof-memprof-profile.c
+++ b/src/libsysprof/sysprof-memprof-profile.c
@@ -218,11 +218,7 @@ cursor_foreach_cb (const SysprofCaptureFrame *frame,
   g_assert (frame->type == SYSPROF_CAPTURE_FRAME_ALLOCATION ||
             frame->type == SYSPROF_CAPTURE_FRAME_PROCESS);
 
-  /* Short-circuit if we don't care about this frame */
-  if (!sysprof_selection_contains (g->selection, frame->time))
-    return TRUE;
-
-  if (frame->type == SYSPROF_CAPTURE_FRAME_PROCESS)
+  if G_UNLIKELY (frame->type == SYSPROF_CAPTURE_FRAME_PROCESS)
     {
       const SysprofCaptureProcess *pr = (const SysprofCaptureProcess *)frame;
       g_autofree gchar *cmdline = g_strdup_printf ("[%s]", pr->cmdline);
@@ -234,6 +230,10 @@ cursor_foreach_cb (const SysprofCaptureFrame *frame,
       return TRUE;
     }
 
+  /* Short-circuit if we don't care about this frame */
+  if (!sysprof_selection_contains (g->selection, frame->time))
+    return TRUE;
+
   if (frame->type == SYSPROF_CAPTURE_FRAME_ALLOCATION)
     {
       const SysprofCaptureAllocation *ev = (const SysprofCaptureAllocation *)frame;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]