linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Anton Blanchard <anton@au1.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	sukadev@us.ibm.com, Linux PPC dev <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>,
	ellerman@au1.ibm.com,
	Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: Re: [RFC][PATCH 1/3][v2] perf: Move PERF_MEM*SHIFT macros up the block
Date: Tue, 2 Jul 2013 23:26:57 +0200	[thread overview]
Message-ID: <CABPqkBRo2iecP5AcSYi4D1GBFUT55QJpqMQTL51gcYPWtrKCkQ@mail.gmail.com> (raw)
In-Reply-To: <20130626074106.GA3741@us.ibm.com>

On Wed, Jun 26, 2013 at 9:41 AM, Sukadev Bhattiprolu
<sukadev@linux.vnet.ibm.com> wrote:
>
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Date: Fri, 21 Jun 2013 14:03:01 -0700
> Subject: [RFC][PATCH 1/3][v2] perf: Move PERF_MEM*SHIFT macros up the block
>
> Values for the PERF_MEM_*SHIFT macros depend on the block before
> them, so it would be more readable if they are in the beginning
> of the block.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>

Reviewed-by: Stephane Eranian <eranian@google.com>

> ---
>  include/uapi/linux/perf_event.h |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index fb104e5..52697a3 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -632,14 +632,15 @@ union perf_mem_data_src {
>  };
>
>  /* type of opcode (load/store/prefetch,code) */
> +#define PERF_MEM_OP_SHIFT      0
>  #define PERF_MEM_OP_NA         0x01 /* not available */
>  #define PERF_MEM_OP_LOAD       0x02 /* load instruction */
>  #define PERF_MEM_OP_STORE      0x04 /* store instruction */
>  #define PERF_MEM_OP_PFETCH     0x08 /* prefetch */
>  #define PERF_MEM_OP_EXEC       0x10 /* code (execution) */
> -#define PERF_MEM_OP_SHIFT      0
>
>  /* memory hierarchy (memory level, hit or miss) */
> +#define PERF_MEM_LVL_SHIFT     5
>  #define PERF_MEM_LVL_NA                0x01  /* not available */
>  #define PERF_MEM_LVL_HIT       0x02  /* hit level */
>  #define PERF_MEM_LVL_MISS      0x04  /* miss level  */
> @@ -654,22 +655,22 @@ union perf_mem_data_src {
>  #define PERF_MEM_LVL_REM_CCE2  0x800 /* Remote Cache (2 hops) */
>  #define PERF_MEM_LVL_IO                0x1000 /* I/O memory */
>  #define PERF_MEM_LVL_UNC       0x2000 /* Uncached memory */
> -#define PERF_MEM_LVL_SHIFT     5
>
>  /* snoop mode */
> +#define PERF_MEM_SNOOP_SHIFT   19
>  #define PERF_MEM_SNOOP_NA      0x01 /* not available */
>  #define PERF_MEM_SNOOP_NONE    0x02 /* no snoop */
>  #define PERF_MEM_SNOOP_HIT     0x04 /* snoop hit */
>  #define PERF_MEM_SNOOP_MISS    0x08 /* snoop miss */
>  #define PERF_MEM_SNOOP_HITM    0x10 /* snoop hit modified */
> -#define PERF_MEM_SNOOP_SHIFT   19
>
>  /* locked instruction */
> +#define PERF_MEM_LOCK_SHIFT    24
>  #define PERF_MEM_LOCK_NA       0x01 /* not available */
>  #define PERF_MEM_LOCK_LOCKED   0x02 /* locked transaction */
> -#define PERF_MEM_LOCK_SHIFT    24
>
>  /* TLB access */
> +#define PERF_MEM_TLB_SHIFT     26
>  #define PERF_MEM_TLB_NA                0x01 /* not available */
>  #define PERF_MEM_TLB_HIT       0x02 /* hit level */
>  #define PERF_MEM_TLB_MISS      0x04 /* miss level */
> @@ -677,7 +678,6 @@ union perf_mem_data_src {
>  #define PERF_MEM_TLB_L2                0x10 /* L2 */
>  #define PERF_MEM_TLB_WK                0x20 /* Hardware Walker*/
>  #define PERF_MEM_TLB_OS                0x40 /* OS fault handler */
> -#define PERF_MEM_TLB_SHIFT     26
>
>  #define PERF_MEM_S(a, s) \
>         (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
> --
> 1.7.1
>

      parent reply	other threads:[~2013-07-02 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130626074106.GA3741@us.ibm.com>
2013-06-26  7:41 ` [RFC][PATCH 2/3][v2] perf/Power7: Export MDTLB_SRC fields to userspace Sukadev Bhattiprolu
2013-07-02 21:26 ` Stephane Eranian [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=CABPqkBRo2iecP5AcSYi4D1GBFUT55QJpqMQTL51gcYPWtrKCkQ@mail.gmail.com \
    --to=eranian@google.com \
    --cc=anton@au1.ibm.com \
    --cc=ellerman@au1.ibm.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sukadev@linux.vnet.ibm.com \
    --cc=sukadev@us.ibm.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).