[sysprof/wip/chergert/sysprof-3] sysprof-cli: add symbol rollup unless --no-decode



commit aeb485ec8da332d65749482b66022d7a2f817e6a
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 28 23:03:30 2019 -0700

    sysprof-cli: add symbol rollup unless --no-decode

 src/tools/sysprof-cli.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/tools/sysprof-cli.c b/src/tools/sysprof-cli.c
index 69a5c59..af1a46a 100644
--- a/src/tools/sysprof-cli.c
+++ b/src/tools/sysprof-cli.c
@@ -80,6 +80,7 @@ main (gint   argc,
   gboolean gjs = FALSE;
   gboolean no_memory = FALSE;
   gboolean no_cpu = FALSE;
+  gboolean no_decode = FALSE;
   gboolean version = FALSE;
   gboolean force = FALSE;
   gboolean use_trace_fd = FALSE;
@@ -91,6 +92,7 @@ main (gint   argc,
     { "command", 'c', 0, G_OPTION_ARG_STRING, &command, N_("Run a command and profile the process"), 
N_("COMMAND") },
     { "force", 'f', 0, G_OPTION_ARG_NONE, &force, N_("Force overwrite the capture file") },
     { "no-cpu", 0, 0, G_OPTION_ARG_NONE, &no_cpu, N_("Disable recording of CPU statistics") },
+    { "no-decode", 0, 0, G_OPTION_ARG_NONE, &no_decode, N_("Do not append symbol name information from local 
machine") },
     { "no-memory", 0, 0, G_OPTION_ARG_NONE, &no_memory, N_("Disable recording of memory statistics") },
     { "use-trace-fd", 0, 0, G_OPTION_ARG_NONE, &use_trace_fd, N_("Set SYSPROF_TRACE_FD environment for 
subprocess") },
     { "gjs", 0, 0, G_OPTION_ARG_NONE, &gjs, N_("Set GJS_TRACE_FD environment to trace GJS processes") },
@@ -232,6 +234,16 @@ main (gint   argc,
   sysprof_profiler_add_source (profiler, source);
   g_object_unref (source);
 
+  if (!no_decode)
+    {
+      /* Add __symbols__ rollup after recording to avoid loading
+       * symbols from the maching viewing the capture.
+       */
+      source = sysprof_symbols_source_new ();
+      sysprof_profiler_add_source (profiler, source);
+      g_object_unref (source);
+    }
+
   if (!no_cpu)
     {
       source = sysprof_hostinfo_source_new ();


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