From: tip-bot for Jiri Olsa <tipbot@zytor.com> To: linux-tip-commits@vger.kernel.org Cc: mingo@kernel.org, tglx@linutronix.de, namhyung@kernel.org, linux-kernel@vger.kernel.org, acme@redhat.com, davem@davemloft.net, peterz@infradead.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, hpa@zytor.com Subject: [tip:perf/core] perf top: Set the 'session_done' volatile variable when exiting Date: Fri, 14 Dec 2018 12:48:55 -0800 [thread overview] Message-ID: <tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org> (raw) Commit-ID: 2e86f646dd68cfdb412efd1262ff75e25fbbe050 Gitweb: https://git.kernel.org/tip/2e86f646dd68cfdb412efd1262ff75e25fbbe050 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 7 Nov 2018 20:11:19 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.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@davemloft.net> Acked-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/n/tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.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(); } }
WARNING: multiple messages have this Message-ID (diff)
From: tip-bot for Jiri Olsa <tipbot@zytor.com> To: linux-tip-commits@vger.kernel.org Cc: mingo@kernel.org, alexander.shishkin@linux.intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, davem@davemloft.net, acme@redhat.com, peterz@infradead.org, jolsa@kernel.org, tglx@linutronix.de Subject: [tip:perf/core] perf top: Set the 'session_done' volatile variable when exiting Date: Tue, 18 Dec 2018 06:15:51 -0800 [thread overview] Message-ID: <tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org> (raw) Message-ID: <20181218141551.kSjevmcnWeNQOV0PEHMAMFKWor5ywvoKdNQdZV5nwqA@z> (raw) Commit-ID: c94cef4beb66d3e1f4ed0f3bf6c2663a9c3cf3c0 Gitweb: https://git.kernel.org/tip/c94cef4beb66d3e1f4ed0f3bf6c2663a9c3cf3c0 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Wed, 7 Nov 2018 20:11:19 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 17 Dec 2018 14:58:19 -0300 perf top: Set the 'session_done' volatile variable when exiting So we can get out of hist processing ASAP on user request. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/n/tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- 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(); } }
next reply other threads:[~2018-12-14 20:49 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-14 20:48 tip-bot for Jiri Olsa [this message] 2018-12-18 14:15 ` [tip:perf/core] perf top: Set the 'session_done' volatile variable when exiting tip-bot for Jiri Olsa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tip-r8aufbgbixr2f85s3wcoaw9v@git.kernel.org \ --to=tipbot@zytor.com \ --cc=acme@redhat.com \ --cc=alexander.shishkin@linux.intel.com \ --cc=davem@davemloft.net \ --cc=hpa@zytor.com \ --cc=jolsa@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tip-commits@vger.kernel.org \ --cc=mingo@kernel.org \ --cc=namhyung@kernel.org \ --cc=peterz@infradead.org \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).