Linux Perf Users
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Athira Rajeev <atrajeev@linux.ibm.com>,
	Anubhav Shelat <ashelat@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	jolsa@kernel.org, adrian.hunter@intel.com, mpetlan@redhat.com,
	tmricht@linux.ibm.com, maddy@linux.ibm.com,
	linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	hbathini@linux.vnet.ibm.com, Tejas.Manhas1@ibm.com,
	Tanushree.Shah@ibm.com, Shivani.Nittor@ibm.com
Subject: Re: [PATCH] tools/perf/sched: Update process names of processes in zombie state for both -s and -S options
Date: Thu, 4 Jun 2026 11:17:31 -0300	[thread overview]
Message-ID: <aiGI--j2nJ_kas60@x1> (raw)
In-Reply-To: <ag8UFqPmRu8v4g_9@x1>

On Thu, May 21, 2026 at 11:17:58AM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, May 21, 2026 at 02:02:53PM +0530, Athira Rajeev wrote:
> > > On 27 Apr 2026, at 11:26 AM, Namhyung Kim <namhyung@kernel.org> wrote:
> > > On Sun, Apr 26, 2026 at 03:09:30PM +0530, Athira Rajeev wrote:
> > >> In redhat perftool testsuite, observed fail for this test:
> > >>    -- [ FAIL ] -- perf_sched :: test_timehist :: --with-summary (output regexp parsing)
> > >> 
> > >> This led to analysis of "perf sched timehist" summary options.
> > >> 
> > >>  # perf sched record -a -o ./perf.data -- sleep 0.1
> > >>   This will record using perf sched record
> > >> 
> > >> perf sched timeliest has two options "-s" and "-S"
> > >>  # perf sched -i ./perf.data timehist -S
> > >> -S : Captures summary also at the end
> > >> 
> > >>  # perf sched -i ./perf.data timehist -s
> > >> -s : Captures only summary
> > >> 
> > >> The test saves -s result which has only summary and compares with
> > >> summary which comes at the end from -S . Since there is a difference
> > >> in these two, test fails.
> > >> 
> > >> Checking the behaviour change in -S and -s results, difference is:
> > >> 
> > >>                  rcu_sched[16]       2          4        0.013      0.001       0.003       0.006   33.23       0
> > >>               migration/11[73]       2          1        0.006      0.006       0.006       0.006    0.00       0
> > >>                migration/3[33]       2          1        0.006      0.006       0.006       0.006    0.00       0
> > >> -               :216753[216753]      -1          1        0.041      0.041       0.041       0.041    0.00       0
> > >> +                 sleep[216753]      -1          1        0.041      0.041       0.041       0.041    0.00       0
> > >>                migration/8[58]       2          1        0.005      0.005       0.005       0.005    0.00       0
> > >>            NetworkManager[811]       1          2        0.089      0.028       0.044       0.060   36.06       0
> > >>               migration/13[83]       2          1        0.005      0.005       0.005       0.005    0.00       0
> > >> 
> > >> Here 216753 is pid for sleep which is a zombie process. This is
> > >> happening in latest kernel due to an update in "-S" result.
> > >> In -S, the process name appears in the results "sleep[216753]",
> > >> where as in the -s, only pid is present in the summary result
> > >> ":216753[216753]".
> > >> 
> > >> After commit 39f473f6d0b2 ("perf sched timehist: decode process names
> > >> of processes in zombie state")
> > >> for -S option, if process name is using pid, it uses different way to
> > >> set it. So that we get the process name and not just Pid.
> > >> 
> > >> This change went in only for timehist_print_sample() function.
> > >> Add this improvement in generic place so that even -s option (which
> > >> captures summary) also will have meaningful information.
> > >> 
> > >> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
> > > 
> > > Acked-by: Namhyung Kim <namhyung@kernel.org>
> > > 
> > > Thanks,
> > > Namhyung
> > Hi,
> > 
> > Can we please have this pulled in, if the patch looks fine ?
> 
> Can you please check applying it on top of current perf-tools-next?

So, this seems to be also addressed by:

commit 39f473f6d0b24cf375893f2110b1cc9d8a079a42
Author: Anubhav Shelat <ashelat@redhat.com>
Date:   Wed Jul 16 16:39:15 2025 -0400

    perf sched timehist: decode process names of processes in zombie state

    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>


No? It is not applying to perf-tools-next, a quick look found the patch
above.

- Arnaldo

  reply	other threads:[~2026-06-04 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-26  9:39 [PATCH] tools/perf/sched: Update process names of processes in zombie state for both -s and -S options Athira Rajeev
2026-04-27  5:56 ` Namhyung Kim
2026-05-21  8:32   ` Athira Rajeev
2026-05-21 14:17     ` Arnaldo Carvalho de Melo
2026-06-04 14:17       ` Arnaldo Carvalho de Melo [this message]
2026-06-04 15:08         ` Athira Rajeev
2026-06-04 15:26           ` Arnaldo Carvalho de Melo
2026-04-27  6:43 ` Venkat

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=aiGI--j2nJ_kas60@x1 \
    --to=acme@kernel.org \
    --cc=Shivani.Nittor@ibm.com \
    --cc=Tanushree.Shah@ibm.com \
    --cc=Tejas.Manhas1@ibm.com \
    --cc=adrian.hunter@intel.com \
    --cc=ashelat@redhat.com \
    --cc=atrajeev@linux.ibm.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=tmricht@linux.ibm.com \
    /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: link
Be 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