perf top: Set display thread COMM to help with debugging

When we want to attach just to the thread that updates the display it
helps having its COMM stand out, so change it from the default "perf" to
"perf-top-UI".

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-5w0hmlk3zfvysxvpsh763k9w@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b115df07
...@@ -601,6 +601,8 @@ static void *display_thread_tui(void *arg) ...@@ -601,6 +601,8 @@ static void *display_thread_tui(void *arg)
*/ */
unshare(CLONE_FS); unshare(CLONE_FS);
prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0);
perf_top__sort_new_samples(top); perf_top__sort_new_samples(top);
/* /*
...@@ -651,6 +653,8 @@ static void *display_thread(void *arg) ...@@ -651,6 +653,8 @@ static void *display_thread(void *arg)
*/ */
unshare(CLONE_FS); unshare(CLONE_FS);
prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0);
display_setup_sig(); display_setup_sig();
pthread__unblock_sigwinch(); pthread__unblock_sigwinch();
repeat: repeat:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment