From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161541AbcFHOJj (ORCPT ); Wed, 8 Jun 2016 10:09:39 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:35517 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232AbcFHOJh (ORCPT ); Wed, 8 Jun 2016 10:09:37 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Wed, 8 Jun 2016 10:09:28 -0400 (EDT) X-X-Sender: vince@macbook-air To: tglx@linutronix.de, brgerst@gmail.com, dave@sr71.net, kan.liang@intel.com, torvalds@linux-foundation.org, acme@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, peterz@infradead.org, dvlasenk@redhat.com, hpa@zytor.com, mingo@kernel.org, dave.hansen@linux.intel.com, luto@amacapital.net, bp@alien8.de cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events In-Reply-To: Message-ID: References: <20160603001929.C5F1C079@viggo.jf.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Jun 2016, tip-bot for Dave Hansen wrote: > Commit-ID: ef5f9f47d4ec4cf42bac48c7c4dafacc1b9f0630 > Gitweb: http://git.kernel.org/tip/ef5f9f47d4ec4cf42bac48c7c4dafacc1b9f0630 > Author: Dave Hansen > AuthorDate: Thu, 2 Jun 2016 17:19:29 -0700 > Committer: Ingo Molnar > CommitDate: Wed, 8 Jun 2016 12:05:58 +0200 > > perf/x86/intel: Use Intel family macros for core perf events > > Use the new model number macros instead of spelling things out > in the comments. ... > #include "../perf_event.h" > @@ -3319,11 +3320,11 @@ static int intel_snb_pebs_broken(int cpu) > u32 rev = UINT_MAX; /* default to broken for unknown models */ > > switch (cpu_data(cpu).x86_model) { > - case 42: /* SNB */ > + case INTEL_FAM6_SANDYBRIDGE: I personally find this a step backwards. Currently it's bad enough when someone reports a problem with PAPI/perf "my Xeon processor isn't detected properly" eventually you can get them to send /proc/cpuinfo so you can try to find out what processor they really have, and in that case you can get the family/model numbers in plain decimal, and you can easily look up if things are supported in the various files. Now I then need to go look in the source, then find that it says INTEL_FAM6_SANDYBRIDGE and then need to take the extra step to find whatever header file defines these values. Anway I doubt this will change anyone's mind but just wanted to register my complaint. Vince and don't get me started about trying to somehow match a model number to a code name using the AMD or intel documentation, without resorting to wikipedia or random tech sites. I'm looking at you AMD fam15h model 60h. Also "intel 6th generation i7"