From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH v2] perf sched timehist: Fix use of CPU list with summary option
Date: Tue, 18 Aug 2020 08:51:55 -0300 [thread overview]
Message-ID: <20200818115155.GA2667554@kernel.org> (raw)
In-Reply-To: <CAM9d7chxJ9hkCsL+PnJSFfKHwbjg6=D+RVDT6E7GWKwedwzGiQ@mail.gmail.com>
Em Tue, Aug 18, 2020 at 10:29:29AM +0900, Namhyung Kim escreveu:
> Hi David,
>
> On Tue, Aug 18, 2020 at 2:09 AM David Ahern <dsahern@kernel.org> wrote:
> >
> > Do not update thread stats or show idle summary unless CPU is in
> > the list of interest.
> >
> > Fixes: c30d630d1bcf ("perf sched timehist: Add support for filtering on CPU")
> > Signed-off-by: David Ahern <dsahern@kernel.org>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks, applied.
- Arnaldo
> Thanks
> Namhyung
>
> > ---
> > v2
> > - check that cpu_list is set before checking cpu_bitmap in timehist_print_summary
> >
> > tools/perf/builtin-sched.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> > index 0c7d599fa555..e6fc297cee91 100644
> > --- a/tools/perf/builtin-sched.c
> > +++ b/tools/perf/builtin-sched.c
> > @@ -2584,7 +2584,8 @@ static int timehist_sched_change_event(struct perf_tool *tool,
> > }
> >
> > if (!sched->idle_hist || thread->tid == 0) {
> > - timehist_update_runtime_stats(tr, t, tprev);
> > + if (!cpu_list || test_bit(sample->cpu, cpu_bitmap))
> > + timehist_update_runtime_stats(tr, t, tprev);
> >
> > if (sched->idle_hist) {
> > struct idle_thread_runtime *itr = (void *)tr;
> > @@ -2857,6 +2858,9 @@ static void timehist_print_summary(struct perf_sched *sched,
> >
> > printf("\nIdle stats:\n");
> > for (i = 0; i < idle_max_cpu; ++i) {
> > + if (cpu_list && !test_bit(i, cpu_bitmap))
> > + continue;
> > +
> > t = idle_threads[i];
> > if (!t)
> > continue;
> > --
> > 2.17.1
> >
--
- Arnaldo
prev parent reply other threads:[~2020-08-18 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 17:09 [PATCH v2] perf sched timehist: Fix use of CPU list with summary option David Ahern
2020-08-18 1:29 ` Namhyung Kim
2020-08-18 11:51 ` Arnaldo Carvalho de Melo [this message]
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=20200818115155.GA2667554@kernel.org \
--to=acme@kernel.org \
--cc=dsahern@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).