From: Ingo Molnar <mingo@elte.hu>
To: Lin Ming <ming.m.lin@intel.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH 2/2] x86,perf: add cache events in p4 PMU
Date: Thu, 18 Mar 2010 16:56:10 +0100 [thread overview]
Message-ID: <20100318155610.GA28061@elte.hu> (raw)
In-Reply-To: <1268908392.13901.128.camel@minggr.sh.intel.com>
* Lin Ming <ming.m.lin@intel.com> wrote:
> Add cache events in p4 PMU.
>
> Move the HT bit setting code from p4_pmu_event_map to p4_hw_config.
> So the cache events can get HT bit set correctly.
>
> Tested on my P4 desktop, below 6 cache events work.
> L1-dcache-load-misses
> LLC-load-misses
> dTLB-load-misses
> dTLB-store-misses
> iTLB-loads
> iTLB-load-misses
>
> Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> ---
> arch/x86/include/asm/msr-index.h | 2 +
> arch/x86/include/asm/perf_event_p4.h | 10 ++
> arch/x86/kernel/cpu/perf_event_p4.c | 153 ++++++++++++++++++++++++++++++++--
> 3 files changed, 159 insertions(+), 6 deletions(-)
i tried it on a Pentium-D box, and it works pretty well:
rhea:/home/mingo/tip> perf stat -a sleep 1
Performance counter stats for 'sleep 1':
2003.237268 task-clock-msecs # 2.000 CPUs
11 context-switches # 0.000 M/sec
2 CPU-migrations # 0.000 M/sec
174 page-faults # 0.000 M/sec
47361 cycles # 0.024 M/sec (scaled from 52.83%)
430 instructions # 0.009 IPC (scaled from 74.58%)
23873 branches # 0.012 M/sec (scaled from 96.70%)
193 branch-misses # 0.808 % (scaled from 49.64%)
867 cache-references # 0.000 M/sec (scaled from 49.69%)
504 cache-misses # 0.000 M/sec (scaled from 49.58%)
1.001411586 seconds time elapsed
So i've applied your patches. Cyrill, what do you think?
Ingo
next prev parent reply other threads:[~2010-03-18 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 10:33 [RFC][PATCH 2/2] x86,perf: add cache events in p4 PMU Lin Ming
2010-03-18 15:56 ` Ingo Molnar [this message]
2010-03-18 16:01 ` Cyrill Gorcunov
2010-03-18 20:59 ` Cyrill Gorcunov
2010-03-18 17:38 ` [tip:perf/core] perf, x86: Add cache events for the Pentium-4 PMU tip-bot for Lin Ming
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=20100318155610.GA28061@elte.hu \
--to=mingo@elte.hu \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=peterz@infradead.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