mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
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>
This commit is contained in:
parent
94ad6e7e36
commit
c94cef4beb
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user