Skip to content

Commit c409cbc

Browse files
committed
perf sched timehist: decode process names of processes in zombie state
JIRA: https://issues.redhat.com/browse/RHEL-68347 upstream ======== commit 39f473f Author: Anubhav Shelat <ashelat@redhat.com> Date: Wed Jul 16 16:39:15 2025 -0400 description =========== Previously when running perf trace timehist --state, when recording processes in the zombie state the process name would not be decoded properly and appears with just the PID: 1140057.412177 [0006] Mutter Input Th[3139/3104] 0.956 0.019 0.041 S 1140057.412222 [0012] :1248612[1248612] 0.000 0.000 0.332 Z 1140057.412275 [0004] <idle> 0.052 0.052 0.953 I 1140057.412284 [0008] <idle> 0.070 0.070 0.932 I 1140057.412333 [0004] KMS thread[3126/3104] 0.953 0.112 0.058 S Now some extra processing has been added to decode the process name: 1140057.412177 [0006] Mutter Input Th[3139/3104] 0.956 0.019 0.041 S 1140057.412222 [0012] sleep[1248612] 0.000 0.000 0.332 Z 1140057.412275 [0004] <idle> 0.052 0.052 0.953 I 1140057.412284 [0008] <idle> 0.070 0.070 0.932 I 1140057.412333 [0004] KMS thread[3126/3104] 0.953 0.112 0.058 S Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Link: https://lore.kernel.org/r/20250716203914.45772-2-ashelat@redhat.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
1 parent d00855d commit c409cbc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/perf/builtin-sched.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,11 @@ static void timehist_print_sample(struct perf_sched *sched,
21742174
printf(" ");
21752175
}
21762176

2177+
if (!thread__comm_set(thread)) {
2178+
const char *prev_comm = evsel__strval(evsel, sample, "prev_comm");
2179+
thread__set_comm(thread, prev_comm, sample->time);
2180+
}
2181+
21772182
printf(" %-*s ", comm_width, timehist_get_commstr(thread));
21782183

21792184
if (sched->show_prio)

0 commit comments

Comments
 (0)