linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Kees Cook <kees@kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: Getting PMU stats on specific syscalls
Date: Wed, 10 Jan 2024 16:40:57 -0800	[thread overview]
Message-ID: <202401101640.21C835A8A@keescook> (raw)
In-Reply-To: <ZZ32p0LRSt5-vFPX@kernel.org>

On Tue, Jan 09, 2024 at 10:45:11PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 09, 2024 at 05:04:54PM -0800, Kees Cook escreveu:
> > On January 9, 2024 3:30:32 PM PST, Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > >On Tue, Jan 9, 2024, 7:55 PM Kees Cook <keescook@chromium.org> wrote:
> > >> I'd like to get PMU stats only on specific syscalls. I haven't been able
> > >> to figure this out. i.e. how do I run:
> 
> > >>         perf stat -e some_syscall_name_here make -j128
> 
> > >> Try with the technique described here:
> 
> > >https://www.spinics.net/lists/linux-perf-users/msg09253.html
> 
> > >Using the syscalls:sys_enter_syscall_name and
> > >syscalls:sys_exit_syscall_name as on off switches.
>  
> > Yeah, I can get walk-clock time, but I'm trying to get much more
> > detailed stats (cache hits, cycle counts, etc).
>  
> > It seems I can only get PMU counts from a whole process. I was hoping
> > to avoid creating a synthetic workload that only exercises the one
> > syscall and instead get a view of the PMU counters under a real load
> > but only for the duration of the syscall...
> 
> This is the sequence I thought would do what you want:

Oh cool! Thanks for the example. I will give this a shot.

-- 
Kees Cook

  reply	other threads:[~2024-01-11  0:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 22:55 Getting PMU stats on specific syscalls Kees Cook
2024-01-09 23:52 ` Namhyung Kim
2024-01-10  1:01   ` Kees Cook
2024-01-10  1:52     ` Leo Yan
     [not found] ` <CA+JHD90kw0CX9=E18A7NBJrxdPDQuwrew355RV47oBhn_1s_QQ@mail.gmail.com>
2024-01-10  1:04   ` Kees Cook
2024-01-10  1:45     ` Arnaldo Carvalho de Melo
2024-01-11  0:40       ` Kees Cook [this message]
2024-01-11 15:53         ` Arnaldo Carvalho de Melo

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=202401101640.21C835A8A@keescook \
    --to=keescook@chromium.org \
    --cc=acme@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-perf-users@vger.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).