From: Balbir Singh <bsingharora@gmail.com>
To: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/perf: Add PROBENOP macro for debug
Date: Thu, 2 Mar 2017 16:38:57 +1100 [thread overview]
Message-ID: <20170302053857.GB7613@balbir.ozlabs.ibm.com> (raw)
In-Reply-To: <1487447914-7094-1-git-send-email-maddy@linux.vnet.ibm.com>
On Sun, Feb 19, 2017 at 01:28:34AM +0530, Madhavan Srinivasan wrote:
> From PowerISA v2.07, architecture provides a special NOP
> instruction called "Probe-Nop" defined as "and 0,0,0".
> This form of "and" is reserved for use exclusively by the
> Performance Monitor.
>
> Usage example:
>
> Add PROBENOP() macro to __tlbie() in hash_native_64.c to
> verify the number of TLBIE. Power8 provides "PM_TLBIE_FIN"
> PMU event (r30058) to count "tlbie finished".
>
> Power8 PMU event "PM_PROBE_NOP_DISP" (r40014) counts the
> "ProbeNops dispatched".
>
> With modified kernel booted, output from perf:
>
> # ./perf stat -e r30058,r40014 ls
> ....
> Performance counter stats for 'ls':
>
> 7 r30058
> 7 r40014
>
> 0.003296959 seconds time elapsed
>
> Macro comes handy when want to count specific instructions
> which may or may not have a PMU event.
>
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
Acked-by: Balbir Singh <bsingharora@gmail.com>
prev parent reply other threads:[~2017-03-02 5:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 19:58 [PATCH] powerpc/perf: Add PROBENOP macro for debug Madhavan Srinivasan
2017-03-02 5:38 ` Balbir Singh [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=20170302053857.GB7613@balbir.ozlabs.ibm.com \
--to=bsingharora@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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).