mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: eranian@google.com
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	ming.m.lin@intel.com, paulus@samba.org, davem@davemloft.net,
	fweisbec@gmail.com, perfmon2-devel@lists.sf.net,
	eranian@gmail.com, robert.richter@amd.com, acme@redhat.com
Subject: Re: [PATCH] perf_events: update PEBS event constraints
Date: Tue, 01 Mar 2011 16:37:27 +0100	[thread overview]
Message-ID: <1298993847.5226.872.camel@laptop> (raw)
In-Reply-To: <4d6d079f.9104df0a.5a71.ffffda78@mx.google.com>

On Tue, 2011-03-01 at 15:50 +0200, Stephane Eranian wrote:
> +static void intel_ds_init_pebs_constraints(void)
> +{
> +       /*
> +        * we only know hwo to deal with Family 6
> +        */
> +       if (boot_cpu_data.x86 != 6) {
> +               x86_pmu.pebs = 0;
> +               return;
> +       }
> +
> +       switch (boot_cpu_data.x86_model) {
> +       case 14: /* 65 nm core solo/duo, "Yonah" */
> +               /* do not have PEBS */
> +               x86_pmu.pebs = 0;
> +               break;
> +
> +       case 15: /* original 65 nm celeron/pentium/core2/xeon, "Merom"/"Conroe" */
> +       case 22: /* single-core 65 nm celeron/core2solo "Merom-L"/"Conroe-L" */
> +       case 23: /* current 45 nm celeron/core2/xeon "Penryn"/"Wolfdale" */
> +       case 29: /* six-core 45 nm xeon "Dunnington" */
> +               x86_pmu.pebs_constraints = intel_core_pebs_events;
> +               pr_cont("(Core2), ");
> +               break;
> +
> +       case 26: /* 45 nm nehalem, "Bloomfield" */
> +       case 30: /* 45 nm nehalem, "Lynnfield" */
> +       case 46: /* 45 nm nehalem-ex, "Beckton" */
> +               x86_pmu.pebs_constraints = intel_nehalem_pebs_events;
> +               pr_cont("(Nehalem), ");
> +               break;
> +
> +       case 28: /* Atom */
> +               x86_pmu.pebs_constraints = intel_atom_pebs_events;
> +               pr_cont("(Atom), ");
> +               break;
> +
> +       case 37: /* 32 nm nehalem, "Clarkdale" */
> +       case 44: /* 32 nm nehalem, "Gulftown" */
> +               x86_pmu.pebs_constraints = intel_westmere_pebs_events;
> +               pr_cont("(Westmere), ");
> +               break;
> +
> +       default:
> +               printk(KERN_CONT "PEBS not yet supported for model %d,",
> +                      boot_cpu_data.x86_model);
> +               x86_pmu.pebs = 0;
> +       }
> +} 

Right so you mentioned you had something like this, but could we please
use the one model switch in perf_event_intel.c and not replicate that,
otherwise its too easy to miss a model someplace.




      reply	other threads:[~2011-03-01 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 13:50 Stephane Eranian
2011-03-01 15:37 ` Peter Zijlstra [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=1298993847.5226.872.camel@laptop \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    --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

all inboxes | Powered by JetHome®