[gnome-builder/wip/chergert/visualizers: 18/19] sysprof: use whole-system profiling



commit 98930ff1ce3dc368b48230a33e3616b4e1bcfb81
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 10 01:24:09 2016 -0700

    sysprof: use whole-system profiling
    
    Because we are often going to be launched via a helper process,
    the profiler does not work very well in non-whole-system mode.
    For example, right now it would only profile the jhbuild
    parent process if lauanching with jhbuild. Not very useful.

 plugins/sysprof/gbp-sysprof-workbench-addin.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plugins/sysprof/gbp-sysprof-workbench-addin.c b/plugins/sysprof/gbp-sysprof-workbench-addin.c
index fda459f..c4b8398 100644
--- a/plugins/sysprof/gbp-sysprof-workbench-addin.c
+++ b/plugins/sysprof/gbp-sysprof-workbench-addin.c
@@ -154,7 +154,13 @@ profiler_run_handler (IdeRunManager *run_manager,
 
   gtk_widget_hide (GTK_WIDGET (self->zoom_controls));
 
-  sp_profiler_set_whole_system (SP_PROFILER (self->profiler), FALSE);
+  /*
+   * Currently we require whole-system because otherwise we can get a situation
+   * where we only watch the spawning process (say jhbuild, flatpak, etc).
+   * Longer term we either need a way to follow-children and/or limit to a
+   * cgroup/process-group.
+   */
+  sp_profiler_set_whole_system (SP_PROFILER (self->profiler), TRUE);
 
   proc_source = sp_proc_source_new ();
   sp_profiler_add_source (self->profiler, proc_source);


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