diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-08-06 11:20:42 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-08-12 16:26:02 -0300 |
commit | 1205a2719e52b6b52e0f9c0011554419da0377a0 (patch) | |
tree | cde8b1a9d9e881e14ab54b731f4141bcaa8836e8 /tools/perf/builtin-top.c | |
parent | b115df076d337a727017538d11d7d46f5bcbff15 (diff) | |
download | lwn-1205a2719e52b6b52e0f9c0011554419da0377a0.tar.gz lwn-1205a2719e52b6b52e0f9c0011554419da0377a0.zip |
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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 1a4615a5f6c9..94e34853a238 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -601,6 +601,8 @@ static void *display_thread_tui(void *arg) */ unshare(CLONE_FS); + prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0); + perf_top__sort_new_samples(top); /* @@ -651,6 +653,8 @@ static void *display_thread(void *arg) */ unshare(CLONE_FS); + prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0); + display_setup_sig(); pthread__unblock_sigwinch(); repeat: |