From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Dmitry Vyukov <dvyukov@google.com>,
Ingo Molnar <mingo@kernel.org>, Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [RFC/PATCH] perf report: Support latency profiling in system-wide mode
Date: Wed, 7 May 2025 16:51:20 -0700 [thread overview]
Message-ID: <aBvx-J-ISifmw0NS@google.com> (raw)
In-Reply-To: <aBuAjt5PyBsN65R9@x1>
On Wed, May 07, 2025 at 12:47:26PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, May 07, 2025 at 11:58:10AM +0200, Dmitry Vyukov wrote:
> > On Tue, 6 May 2025 at 18:58, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > > So maybe when we notice that cycles was used 'perf report/top' should
> > > > use the term 'wall-clock' for the column name?
>
> > > > So instead of having a --latency we could have a hint that would tell
> > > > the user that if this knob was set:
>
> > > > $ perf config report.wall-clock=true
>
> > I am not sure it can be as simple as a single global knob.
>
> > First, record needs to collect additional info and that may be
> > somewhat expensive.
>
> > Second, report now has several modes:
> > - it can show latency, but order by the current overhead
> > - it can also show latency, and order by latency
> > A user wants one or another depending on what they are optimizing
> > (possibly looking at both).
>
> > I also feel that global config switches are even less discoverable by
> > median users (read -- ~nobody will know about that). If these things
> > are normal flags with a help description, then some users may
> > eventually discover them.
>
> So, the addition of:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e9cbc854d8b148e3491291fb615e94261970fb54
>
> perf config: Add a function to set one variable in .perfconfig
>
> To allow for setting a variable from some other tool, like with the
> "wallclock" patchset needs to allow the user to opt-in to having
> that key in the sort order for 'perf report'.
>
> Cc: Dmitriy Vyukov <dvyukov@google.com>
>
>
> Was to tell the user about the new possibilities of profiling, once,
> with something like:
>
> root@number:~# perf report
> ┌─────────────────────────────────────────────────────┐
> │Do you want to use latency mode? │
> │That will add a 'Latency' column that would mean │
> │'wall-clock' time when used with cycles, for instance│
> │ │
> │ │
> │Enter: Yes, ESC: No │
> └─────────────────────────────────────────────────────┘
>
> The working should inform if the current perf.data has what is needed
> and thus this would take immediate effect, and if not, inform that as
> well and what is needed to be able to use that, things like you
> described above:
Looks useful! Maybe we want to add it to interactive TUI only..
>
> > First, record needs to collect additional info and that may be
> > somewhat expensive.
>
> If the user says that the feature is desired by pressing Enter, follow
> up questions can be asked as well, like you described:
I'm afraid it can have a long chain of questions when a new user starts
to use the perf tool with any config. Maybe we need to limit it somehow.
>
> > Second, report now has several modes:
>
> > - it can show latency, but order by the current overhead
> > - it can also show latency, and order by latency
>
> > A user wants one or another depending on what they are optimizing
> > (possibly looking at both).
>
> Once these are answered, the questions goes away, as they are now
> recorded in the user's ~/.perfconfig file and will be used when what is
> needed is present in perf.data file.
Sounds good.
>
> The user should also be informed that to change that knob, 'perf config'
> is your friend.
>
> Additionally some hotkey could be made available to change that
> behaviour, on the fly, with the option of turning the new mode the new
> default, again writing to ~/.perfconfig.
>
> Sometimes this "on the fly" needs reprocessing of the whole perf.data
> file, sometimes it may be a matter of just showing extra available
> fields, like the 'V' key now, that goes on bumping the verbosity in the
> 'perf report' and 'perf top' browsers (they share the hists browser), or
> 'j' that toogles showing the lines from jump sources to jump targets in
> the annotate browser, 'J' to show how many jumps target a particular
> jump target, also in the annotate browser, etc.
>
> This could help experimenting with the various modes of doing profiling,
> interactively, to see the problem from different angles, without having
> to restart the whole process by exiting the 'perf report' to add new
> command line options, then restart, etc, reusing computation sometimes
> when switching views, etc.
>
> To get default behaviour its just a matter of renaming ~/.perfconfig to
> ~/.perfconfig.some_suitabe_name_for_later_use.
>
> This way interesting new features like this don't get buried behind
> either command line options nor man pages, giving the user at least an
> opportunity to be informed about it.
>
> That is what the patch below barely starts sketching, not doing all I
> just described.
Sounds like a good idea.
Thanks,
Namhyung
next prev parent reply other threads:[~2025-05-07 23:51 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 0:36 [RFC/PATCH] perf report: Support latency profiling in system-wide mode Namhyung Kim
2025-05-04 8:22 ` Ingo Molnar
2025-05-04 19:52 ` Namhyung Kim
2025-05-05 8:03 ` Dmitry Vyukov
2025-05-06 14:57 ` Arnaldo Carvalho de Melo
2025-05-06 16:58 ` Arnaldo Carvalho de Melo
2025-05-07 9:58 ` Dmitry Vyukov
2025-05-07 15:47 ` Arnaldo Carvalho de Melo
2025-05-07 23:51 ` Namhyung Kim [this message]
2025-05-05 8:08 ` Dmitry Vyukov
2025-05-06 5:30 ` Namhyung Kim
2025-05-06 5:55 ` Dmitry Vyukov
2025-05-06 6:43 ` Namhyung Kim
2025-05-06 6:46 ` Dmitry Vyukov
2025-05-06 7:09 ` Namhyung Kim
2025-05-06 7:40 ` Dmitry Vyukov
2025-05-07 23:43 ` Namhyung Kim
2025-05-08 12:24 ` Dmitry Vyukov
2025-05-16 16:33 ` Namhyung Kim
2025-05-19 6:00 ` Dmitry Vyukov
2025-05-20 1:43 ` Namhyung Kim
2025-05-20 6:45 ` Dmitry Vyukov
2025-05-20 22:50 ` Namhyung Kim
2025-05-21 7:30 ` Dmitry Vyukov
2025-05-27 7:14 ` Dmitry Vyukov
2025-05-28 18:38 ` Namhyung Kim
2025-05-30 5:50 ` Dmitry Vyukov
2025-05-30 22:05 ` Namhyung Kim
2025-05-31 6:31 ` Dmitry Vyukov
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=aBvx-J-ISifmw0NS@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=dvyukov@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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