From f89d5830f2cfc7266d5093931a545a3ed7affda0 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 1 Jul 2019 14:46:43 -0700 Subject: [PATCH] cli: add diskstat data source recording --- src/tools/sysprof-cli.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/sysprof-cli.c b/src/tools/sysprof-cli.c index 384e65fd..21e3076d 100644 --- a/src/tools/sysprof-cli.c +++ b/src/tools/sysprof-cli.c @@ -82,6 +82,7 @@ main (gint argc, gboolean no_battery = FALSE; gboolean no_cpu = FALSE; gboolean no_decode = FALSE; + gboolean no_disk = FALSE; gboolean no_memory = FALSE; gboolean no_network = FALSE; gboolean no_perf = FALSE; @@ -98,6 +99,7 @@ main (gint argc, { "force", 'f', 0, G_OPTION_ARG_NONE, &force, N_("Force overwrite the capture file") }, { "no-battery", 0, 0, G_OPTION_ARG_NONE, &no_cpu, N_("Disable recording of battery statistics") }, { "no-cpu", 0, 0, G_OPTION_ARG_NONE, &no_cpu, N_("Disable recording of CPU statistics") }, + { "no-disk", 0, 0, G_OPTION_ARG_NONE, &no_disk, N_("Disable recording of Disk statistics") }, { "no-perf", 0, 0, G_OPTION_ARG_NONE, &no_perf, N_("Do not record stacktraces using Linux perf") }, { "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") }, @@ -247,6 +249,13 @@ main (gint argc, } #endif + if (!no_disk) + { + source = sysprof_diskstat_source_new (); + sysprof_profiler_add_source (profiler, source); + g_object_unref (source); + } + if (!no_decode) { /* Add __symbols__ rollup after recording to avoid loading