Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1738364yba; Thu, 25 Apr 2019 05:04:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIYRqTLmBHOLy++n1B6pKPDZpklwftdDuxqiRnRdARj2NkLAZy0sMuILAKsmBgY9cdLwPv X-Received: by 2002:a63:4620:: with SMTP id t32mr14463326pga.363.1556193870842; Thu, 25 Apr 2019 05:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556193870; cv=none; d=google.com; s=arc-20160816; b=ZvcSKe6+W2cBW9g4v2F3iH7liaDXthVbzR4ftq9fIUHooglYY6SsLajpYeKg7zkGtq gE0yNIKX1mpvfD60oUNQTyp9JZjjrEXt01p/7a/GqhrYhZ3kO+rnBC5CnldTS7juSzUf VAk2WdGn2HTEfxG6/fpGIHKaF1UqYALeczgWDt4KVksKp9URtrNwlMC67HzyaGJU7EDD UdF6xEqNEyrj0vQKib+sVgdLWBNPqIYrhqsN4RtIZX/jShg8krCYFYc9LRk1XO5bdALg FBp4rMmafY7wsOnim/rCM35ecmcYJ6hUoaY/HBDNFynY4IdywTbGjNbsDcLUoB8zeYBC 67FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=+y5O02seYWvyi7uK3maG/+koBY8R02+qho6c9u3I2vY=; b=qpTHHT8AWj+wqBTPIyI0Y/boRGwkcfvLZwKRHKxyn017/xQV5HADG5zgP6UnqwdLei xQ/4Hy21dclW4JnqVhiaqRa4L60BtBwH4HZPfXKboO175TMnbMxFkexVZDbwFDP6xgFo fHVGhuhmGIMJD87PO5u1VVc5OvIxBNlVQrIiV3E5USma8UYe/QTYoq9l4oafEvgG9I8u EIqz5EeQoDMkLQLn9nscTGVF42enBL7/j8PAn75XF9s+00jv15yv8+wmIJpmylu6p5GC /lWhOUzkSMue8NchzBXvdfJkUV3ku5+PdINN8pPKYXnGdVpTtp6vstfCUYOpKpf5V1xl Y/bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019041745 header.b=vR4XG8B1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l25si23122092pfi.9.2019.04.25.05.04.12; Thu, 25 Apr 2019 05:04:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2019041745 header.b=vR4XG8B1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388535AbfDYHFy (ORCPT + 99 others); Thu, 25 Apr 2019 03:05:54 -0400 Received: from terminus.zytor.com ([198.137.202.136]:42791 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387520AbfDYHFy (ORCPT ); Thu, 25 Apr 2019 03:05:54 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x3P744UE2994038 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Apr 2019 00:04:04 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x3P744UE2994038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019041745; t=1556175845; bh=+y5O02seYWvyi7uK3maG/+koBY8R02+qho6c9u3I2vY=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=vR4XG8B1kySt745GNcWJjzJoR8bzpNJVUeirIGAsBYzL+v4qM69uvwXvgazwtH+RU 4Py8HvIZOwAJCrOYAJwFJzLTdC8841NDbap74v/LX5giXoJa4g7gEbUyYhZ1gtggYi th/NAVzpPvGjLIQrQ45hPPnhr3WhHo93qhlnrY6VmyKqHBFEUiigs5zQE17qe/0bHZ TE5mCtb2eyPfnVLlnt2PZ1lZpMaGYAMUhczAOeqX102SC50gnGLoqvd4I1+lBHGARq DWEeZ9Q4gO/Bn5lRVpITvGeoDGueoENy+s+HE84pJpmUJCD1/MUTobkrIY3ZVP6OS9 xQBLZ2OzicQIQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x3P7430G2993998; Thu, 25 Apr 2019 00:04:03 -0700 Date: Thu, 25 Apr 2019 00:04:03 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Harry Pan Message-ID: Cc: torvalds@linux-foundation.org, eranian@google.com, tglx@linutronix.de, vincent.weaver@maine.edu, harry.pan@intel.com, linux-kernel@vger.kernel.org, bp@alien8.de, peterz@infradead.org, mingo@kernel.org, alexander.shishkin@linux.intel.com, acme@redhat.com, hpa@zytor.com, stable@vger.kernel.org, jolsa@redhat.com Reply-To: eranian@google.com, tglx@linutronix.de, torvalds@linux-foundation.org, harry.pan@intel.com, vincent.weaver@maine.edu, linux-kernel@vger.kernel.org, peterz@infradead.org, bp@alien8.de, alexander.shishkin@linux.intel.com, acme@redhat.com, mingo@kernel.org, hpa@zytor.com, jolsa@redhat.com, stable@vger.kernel.org In-Reply-To: <20190424145033.1924-1-harry.pan@intel.com> References: <20190424145033.1924-1-harry.pan@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters Git-Commit-ID: 82c99f7a81f28f8c1be5f701c8377d14c4075b10 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 82c99f7a81f28f8c1be5f701c8377d14c4075b10 Gitweb: https://git.kernel.org/tip/82c99f7a81f28f8c1be5f701c8377d14c4075b10 Author: Harry Pan AuthorDate: Wed, 24 Apr 2019 22:50:33 +0800 Committer: Ingo Molnar CommitDate: Thu, 25 Apr 2019 08:59:31 +0200 perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters Kaby Lake (and Coffee Lake) has PC8/PC9/PC10 residency counters. This patch updates the list of Kaby/Coffee Lake PMU event counters from the snb_cstates[] list of events to the hswult_cstates[] list of events, which keeps all previously supported events and also adds the PKG_C8, PKG_C9 and PKG_C10 residency counters. This allows user space tools to profile them through the perf interface. Signed-off-by: Harry Pan Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: gs0622@gmail.com Link: http://lkml.kernel.org/r/20190424145033.1924-1-harry.pan@intel.com Signed-off-by: Ingo Molnar --- arch/x86/events/intel/cstate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index 94a4b7fc75d0..d41de9af7a39 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c @@ -76,15 +76,15 @@ * Scope: Package (physical package) * MSR_PKG_C8_RESIDENCY: Package C8 Residency Counter. * perf code: 0x04 - * Available model: HSW ULT,CNL + * Available model: HSW ULT,KBL,CNL * Scope: Package (physical package) * MSR_PKG_C9_RESIDENCY: Package C9 Residency Counter. * perf code: 0x05 - * Available model: HSW ULT,CNL + * Available model: HSW ULT,KBL,CNL * Scope: Package (physical package) * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. * perf code: 0x06 - * Available model: HSW ULT,GLM,CNL + * Available model: HSW ULT,KBL,GLM,CNL * Scope: Package (physical package) * */ @@ -566,8 +566,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates), X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_X, snb_cstates), - X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_MOBILE, snb_cstates), - X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_DESKTOP, snb_cstates), + X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_MOBILE, hswult_cstates), + X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_DESKTOP, hswult_cstates), X86_CSTATES_MODEL(INTEL_FAM6_CANNONLAKE_MOBILE, cnl_cstates),