[sysprof/wip/chergert/control-fd] cli: use sysprof_profiler_stop()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/control-fd] cli: use sysprof_profiler_stop()
- Date: Tue, 11 Feb 2020 22:50:44 +0000 (UTC)
commit e8d9fa33fa98904223e2b0c6213eb59758828f66
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 11 14:50:21 2020 -0800
cli: use sysprof_profiler_stop()
This ensures we get supplimental data merged into the final result.
src/tools/sysprof-cli.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/tools/sysprof-cli.c b/src/tools/sysprof-cli.c
index 72b94e7..77f46cc 100644
--- a/src/tools/sysprof-cli.c
+++ b/src/tools/sysprof-cli.c
@@ -44,7 +44,15 @@ static int exit_code = EXIT_SUCCESS;
static gboolean
sigint_handler (gpointer user_data)
{
- g_main_loop_quit (main_loop);
+ static int count;
+
+ if (count == 0)
+ sysprof_profiler_stop (profiler);
+ else if (count > 2)
+ g_main_loop_quit (main_loop);
+
+ count++;
+
return G_SOURCE_REMOVE;
}
@@ -52,7 +60,7 @@ static void
profiler_stopped (SysprofProfiler *profiler_,
GMainLoop *main_loop_)
{
- g_main_loop_quit (main_loop_);
+ g_main_loop_quit (main_loop);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]