From: Adam Borowski <kilobyte@angband.pl>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Stephane Eranian <eranian@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH] perf/x86/amd: Explicitly define PERF_COUNT_HW_REF_CPU_CYCLES as undefined.
Date: Wed, 27 Apr 2016 11:32:51 +0200 [thread overview]
Message-ID: <20160427093251.GA13534@angband.pl> (raw)
In-Reply-To: <20160427080345.GB16991@gmail.com>
On Wed, Apr 27, 2016 at 10:03:45AM +0200, Ingo Molnar wrote:
> * Adam Borowski <kilobyte@angband.pl> wrote:
> > diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
> > index 86a9bec..5fa1b8e 100644
> > --- a/arch/x86/events/amd/core.c
> > +++ b/arch/x86/events/amd/core.c
> > @@ -125,6 +125,7 @@ static const u64 amd_perfmon_event_map[] =
> > [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3,
> > [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = 0x00d0, /* "Decoder empty" event */
> > [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = 0x00d1, /* "Dispatch stalls" event */
> > + [PERF_COUNT_HW_REF_CPU_CYCLES] = 0,
> > };
>
> Hm, I think it would be cleaner and more robust to change this (and all other
> similar, if any) arrays to [PERF_COUNT_HW_MAX] instead.
Good idea! Both of Intel's copies (one for p4, one for core+) already set
the size this way.
--
A tit a day keeps the vet away.
next prev parent reply other threads:[~2016-04-27 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 1:19 [PATCH] perf/x86/amd: Explicitly define PERF_COUNT_HW_REF_CPU_CYCLES as undefined Adam Borowski
2016-04-27 8:03 ` Ingo Molnar
2016-04-27 9:32 ` Adam Borowski [this message]
2016-04-27 9:35 ` [PATCH] perf/x86/amd: Set the size of event map array to PERF_COUNT_HW_MAX Adam Borowski
2016-04-28 8:24 ` [tip:perf/urgent] " tip-bot for Adam Borowski
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=20160427093251.GA13534@angband.pl \
--to=kilobyte@angband.pl \
--cc=bp@suse.de \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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