mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lin Ming <ming.m.lin@intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Robert Richter <robert.richter@amd.com>
Subject: Re: [PATCH 1/4] perf: Add memory load/store events generic code
Date: Thu, 07 Jul 2011 10:01:27 +0800	[thread overview]
Message-ID: <1310004087.18875.138.camel@minggr.sh.intel.com> (raw)
In-Reply-To: <1309960302.3282.283.camel@twins>

On Wed, 2011-07-06 at 21:51 +0800, Peter Zijlstra wrote:
> On Wed, 2011-07-06 at 13:53 +0800, Lin Ming wrote:
> 
> > Do you mean to use the "impossible combinations" to express the inverse?
> 
> Nah, impossible would be things like having neither LOAD nor STORE set.
> 
> > MEM_STORE_DCU_MISS as: store-l2-l3-dram
> > MEM_STORE_STLB_MISS as: store-itlb-dtlb
> > 
> > How about below code?
> 
> Right, something like that. Robert can the IBS data source data be
> mapped onto this as well?
> 
> > #define PERF_MEM_LOAD                   (1ULL << 0)
> > #define PERF_MEM_STORE                  (1ULL << 1)
> > #define PERF_MEM_ATOMIC                 (1ULL << 2)
> > #define PERF_MEM_L1                     (1ULL << 3)
> > #define PERF_MEM_L2                     (1ULL << 4)
> > #define PERF_MEM_L3                     (1ULL << 5)
> > #define PERF_MEM_RAM                    (1ULL << 6)
> > #define PERF_MEM_UNKNOWN                (1ULL << 7)
> > #define PERF_MEM_IO                     (1ULL << 8)
> > #define PERF_MEM_UNCACHED               (1ULL << 9)
> > #define PERF_MEM_RESERVED               (1ULL << 10)
> > #define PERF_MEM_LOCAL                  (1ULL << 11)
> > #define PERF_MEM_REMOTE                 (1ULL << 12)
> > #define PERF_MEM_SNOOP                  (1ULL << 13)
> > #define PERF_MEM_MODIFIED               (1ULL << 14)
> > #define PERF_MEM_EXCLUSIVE              (1ULL << 15)
> > #define PERF_MEM_SHARED                 (1ULL << 16)
> > #define PERF_MEM_INVALID                (1ULL << 17)
> 
> > #define PERF_MEM_ITLB                   (1ULL << 18)
> > #define PERF_MEM_DTLB                   (1ULL << 19)
> > #define PERF_MEM_STLB                   (1ULL << 20)
> 
> Are these TLB hit or miss?

I meant hit, but that's not correct.
How about more complete definition as below?

#define PERF_MEM_L1D_HIT           
#define PERF_MEM_L1D_MISS               
#define PERF_MEM_L1I_HIT                
#define PERF_MEM_L1I_MISS              
#define PERF_MEM_L2_HIT                
#define PERF_MEM_L2_MISS                
#define PERF_MEM_L3_HIT                 
#define PERF_MEM_L3_MISS                

#define PERF_MEM_ITLB_HIT               
#define PERF_MEM_ITLB_MISS              
#define PERF_MEM_DTLB_HIT               
#define PERF_MEM_DTLB_MISS              
#define PERF_MEM_STLB_HIT               
#define PERF_MEM_STLB_MISS              

#define PERF_MEM_STORE_L1D_HIT  \
        (PERF_MEM_STORE | PERF_MEM_L1D_HIT)

#define PERF_MEM_STORE_L1D_MISS \
        (PERF_MEM_STORE | PERF_MEM_L1D_MISS)

#define PERF_MEM_STORE_STLB_HIT \
        (PERF_MEM_STORE | PERF_MEM_STLB_HIT)

#define PERF_MEM_STORE_STLB_MISS \
        (PERF_MEM_STORE | PERF_MEM_STLB_MISS)

#define PERF_MEM_STORE_ATOMIC \
        (PERF_MEM_STORE | PERF_MEM_ATOMIC)

#define PERF_MEM_LOAD_STLB_HIT  \
        (PERF_MEM_LOAD | PERF_MEM_STLB_HIT)

#define PERF_MEM_LOAD_STLB_MISS \
        (PERF_MEM_LOAD | PERF_MEM_STLB_MISS)

#define PERF_MEM_LOAD_ATOMIC \
        (PERF_MEM_LOAD | PERF_MEM_ATOMIC)

Lin Ming

> 
> > #define PERF_MEM_STORE_L1D_HIT  \
> >         (PERF_MEM_STORE | PERF_MEM_L1)
> > 
> > #define PERF_MEM_STORE_L1D_MISS \
> >         (PERF_MEM_STORE | PERF_MEM_L2 | PERF_MEM_L3 | PERF_MEM_RAM)
> > 
> > #define PERF_MEM_STORE_STLB_HIT \
> >         (PERF_MEM_STORE | PERF_MEM_STLB)
> >       
> > #define PERF_MEM_STORE_STLB_MISS \
> >         (PERF_MEM_STORE | PERF_MEM_ITLB | PERF_MEM_DTLB)
> 
> Going by the definition in table 30-22 neither of these seem correct, a
> STLB_HIT was defined as DTLB|STLB whereas a STLB_MISS was missing both
> (resulting in a full page-table walk I presume).
> 
> > #define PERF_MEM_STORE_ATOMIC \
> >         (PERF_MEM_STORE | PERF_MEM_ATOMIC)
> > 
> > #define PERF_MEM_LOAD_STLB_HIT  \
> >         (PERF_MEM_LOAD | PERF_MEM_STLB)
> >    
> > #define PERF_MEM_LOAD_STLB_MISS \
> >         (PERF_MEM_LOAD | PERF_MEM_ITLB | PERF_MEM_DTLB)
> 
> idem
> 
> > #define PERF_MEM_LOAD_ATOMIC \
> >         (PERF_MEM_LOAD | PERF_MEM_ATOMIC)
> > 
> 



  reply	other threads:[~2011-07-07  1:55 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04  8:02 [PATCH 0/4] perf: memory load/store events generalization Lin Ming
2011-07-04  8:02 ` [PATCH 1/4] perf: Add memory load/store events generic code Lin Ming
2011-07-04  8:33   ` Peter Zijlstra
2011-07-04  8:44     ` Peter Zijlstra
2011-07-05 12:03       ` Peter Zijlstra
2011-07-05 23:02         ` Paul Mackerras
2011-07-06 13:58           ` Peter Zijlstra
2011-07-08  7:18             ` Anton Blanchard
2011-07-08 15:18               ` Peter Zijlstra
2011-08-08 11:57                 ` Peter Zijlstra
2011-08-08 11:59                 ` Peter Zijlstra
2011-07-04 22:01     ` Andi Kleen
2011-07-05  8:43       ` Peter Zijlstra
2011-07-04 11:08   ` Peter Zijlstra
2011-07-04 11:16   ` Peter Zijlstra
2011-07-04 21:52     ` Andi Kleen
2011-07-05 11:54     ` Lin Ming
2011-07-05 14:17       ` Peter Zijlstra
2011-07-06  5:53         ` Lin Ming
2011-07-06 13:51           ` Peter Zijlstra
2011-07-07  2:01             ` Lin Ming [this message]
2011-07-04  8:02 ` [PATCH 2/4] perf, x86: Add Intel Nhm/Wsm/Snb load latency support Lin Ming
2011-07-05 13:17   ` Peter Zijlstra
2011-07-05 13:34     ` Lin Ming
2011-07-22 18:58   ` Stephane Eranian
2011-07-04  8:02 ` [PATCH 3/4] perf, x86: Add Intel SandyBridge pricise store support Lin Ming
2011-07-11  8:32   ` Peter Zijlstra
2011-07-11  8:57     ` Lin Ming
2011-07-11  8:52       ` Peter Zijlstra
2011-07-04  8:02 ` [PATCH 4/4] perf, tool: Add new command "perf mem" Lin Ming
2011-07-04 22:00   ` Andi Kleen
2011-07-05  1:35     ` Lin Ming
2011-07-22 18:55 ` [PATCH 0/4] perf: memory load/store events generalization Stephane Eranian
2011-07-22 21:01   ` Andi Kleen
2011-07-22 21:14     ` Stephane Eranian
2011-07-22 21:43       ` Andi Kleen
2011-07-22 21:59         ` Stephane Eranian

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=1310004087.18875.138.camel@minggr.sh.intel.com \
    --to=ming.m.lin@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robert.richter@amd.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

Powered by JetHome