linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: rainkin <rainkin1993@gmail.com>
Cc: linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [Question] How to sample PERF_TYPE_HARDWARE
Date: Fri, 19 Feb 2021 16:09:51 +0900	[thread overview]
Message-ID: <CAM9d7cjX-ZaNfR-ObpeaWQXkLkxzWrYt9Szdrh1=Kaz+UhDK9w@mail.gmail.com> (raw)
In-Reply-To: <CAHb-xau-HhbuLL0aKyzmHjCixETcMNV7xGxGj_bBYoSVQd_R2w@mail.gmail.com>

On Thu, Feb 18, 2021 at 11:05 AM rainkin <rainkin1993@gmail.com> wrote:
>
> Hi Namhyung,
> Thanks for your reply.
> Let me make my goal more clear: record the number of occurring branch
> instructions (PERF_COUNT_HW_BRANCH_INSTRUCTIONS) every N cycles
> (PERF_COUNT_HW_CPU_CYCLES).

Please try this:

  perf record -c N -e '{cycles,branches}:S'
  perf script

Thanks,
Namhyung

      reply	other threads:[~2021-02-19  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  3:47 [Question] How to sample PERF_TYPE_HARDWARE rainkin
2021-02-16  7:50 ` Namhyung Kim
2021-02-18  1:22   ` rainkin
2021-02-18  2:04   ` rainkin
2021-02-19  7:09     ` Namhyung Kim [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='CAM9d7cjX-ZaNfR-ObpeaWQXkLkxzWrYt9Szdrh1=Kaz+UhDK9w@mail.gmail.com' \
    --to=namhyung@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=rainkin1993@gmail.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;
as well as URLs for NNTP newsgroup(s).