[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org>
Date: Fri, 14 Dec 2018 12:48:55 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, tglx@...utronix.de, namhyung@...nel.org,
linux-kernel@...r.kernel.org, acme@...hat.com, davem@...emloft.net,
peterz@...radead.org, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, hpa@...or.com
Subject: [tip:perf/core] perf top: Set the 'session_done' volatile variable
when exiting
Commit-ID: 2e86f646dd68cfdb412efd1262ff75e25fbbe050
Gitweb: https://git.kernel.org/tip/2e86f646dd68cfdb412efd1262ff75e25fbbe050
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Wed, 7 Nov 2018 20:11:19 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 6 Dec 2018 14:12:33 -0300
perf top: Set the 'session_done' volatile variable when exiting
So we can get out of hist processing ASAP on user request.
Acked-by: David S. Miller <davem@...emloft.net>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: https://lkml.kernel.org/n/tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
tools/perf/builtin-top.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index aad58643102e..50ec01eb7f57 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -577,6 +577,12 @@ static void perf_top__sort_new_samples(void *arg)
perf_top__reset_sample_counters(t);
}
+static void stop_top(void)
+{
+ session_done = 1;
+ done = 1;
+}
+
static void *display_thread_tui(void *arg)
{
struct perf_evsel *pos;
@@ -613,13 +619,13 @@ static void *display_thread_tui(void *arg)
!top->record_opts.overwrite,
&top->annotation_opts);
- done = 1;
+ stop_top();
return NULL;
}
static void display_sig(int sig __maybe_unused)
{
- done = 1;
+ stop_top();
}
static void display_setup_sig(void)
@@ -672,7 +678,7 @@ repeat:
if (perf_top__handle_keypress(top, c))
goto repeat;
- done = 1;
+ stop_top();
}
}
Powered by blists - more mailing lists