Received: by 2002:a17:90a:9307:0:0:0:0 with SMTP id p7csp5144016pjo; Tue, 11 Feb 2020 04:50:03 -0800 (PST) X-Google-Smtp-Source: APXvYqxHpo4KmKoY3DsJaBdiJ8uOin+1ws6cg4m4c5sFYyX+Q1JBsLHHaWy7lB0O+0tpsiYhITXN X-Received: by 2002:aca:1a06:: with SMTP id a6mr2618637oia.148.1581425403597; Tue, 11 Feb 2020 04:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581425403; cv=none; d=google.com; s=arc-20160816; b=BukU+YF4tyl8P7bVIsT5tBlX8zk08Uk8DXmAySweJjO1WyleE+oHnBp0LuD+WgORJD KservEuyWKWfpG3xylTHrGwNYIu31EOrLj4yIBD/Pqqe+2mwmF5SgrlV0cMeghVVF3d0 XKvu010O/mZbjsP7vDylOSLj9HtunZ9fCc3h62gIRLouBPRPiD2x9off4RjaIdXM5OR9 ryRa0byMtiAhO65JFdP92Y8V7XtK+FqSZVBIgwN45SQBUwgTQWhahMqU5JQDRDzFvP4M 9Hep4hSZ+GoVCiCK3A9ok43Bx0R0JXXC3RzUYg2HuKKh4e+o8Py/4eDIMO61MSk5nY0C N8qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=BxHP+u+aobfzlW7YYFOTNFG68MTYnRC4YXN6t3seuko=; b=wiozW8X7Z0z9FtaYRawYi7upiNUr3jXkqnHWTfqrH+1ChuW1iPxy3n1DwaAdwjSqGT PEjE3NQ8qE0RPHe5q2pjIVXe4dz0dkFjEX85W3JeqVkC1LGiXSJYt05+VHOg1A3JRuxL uqRDDNEPGpJq1+dd/8sqaz21NiwQbVI5fylRNpvs3UJcD7Rr/2NcQXQ6QBmxCzo8JqMG Fha1n4hJy6omZkR9kwREDZMjrJysQOrOK1ERizjdJLU+jjT1aySHh73n2ilQnRKHGBOz ehSDGiJJ+duCGNXSBhd6PZL9KHmf1l5DPYqRMXkpaH8qxlCCLDnwuj5jCHUw8EtDTGFZ XqlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w187si1729150oif.94.2020.02.11.04.49.51; Tue, 11 Feb 2020 04:50:03 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728652AbgBKMr6 (ORCPT + 99 others); Tue, 11 Feb 2020 07:47:58 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45983 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728481AbgBKMrx (ORCPT ); Tue, 11 Feb 2020 07:47:53 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j1Ux8-0007Yz-6r; Tue, 11 Feb 2020 13:47:46 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id CE64B1C2017; Tue, 11 Feb 2020 13:47:45 +0100 (CET) Date: Tue, 11 Feb 2020 12:47:45 -0000 From: "tip-bot2 for Kim Phillips" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map Cc: Babu Moger , Kim Phillips , "Peter Zijlstra (Intel)" , Ingo Molnar , stable@vger.kernel.org, x86 , LKML In-Reply-To: <20200121171232.28839-1-kim.phillips@amd.com> References: <20200121171232.28839-1-kim.phillips@amd.com> MIME-Version: 1.0 Message-ID: <158142526559.411.16112962778577638815.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 25d387287cf0330abf2aad761ce6eee67326a355 Gitweb: https://git.kernel.org/tip/25d387287cf0330abf2aad761ce6eee67326a355 Author: Kim Phillips AuthorDate: Tue, 21 Jan 2020 11:12:31 -06:00 Committer: Ingo Molnar CommitterDate: Tue, 11 Feb 2020 13:17:51 +01:00 perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map Commit 3fe3331bb285 ("perf/x86/amd: Add event map for AMD Family 17h"), claimed L2 misses were unsupported, due to them not being found in its referenced documentation, whose link has now moved [1]. That old documentation listed PMCx064 unit mask bit 3 as: "LsRdBlkC: LS Read Block C S L X Change to X Miss." and bit 0 as: "IcFillMiss: IC Fill Miss" We now have new public documentation [2] with improved descriptions, that clearly indicate what events those unit mask bits represent: Bit 3 now clearly states: "LsRdBlkC: Data Cache Req Miss in L2 (all types)" and bit 0 is: "IcFillMiss: Instruction Cache Req Miss in L2." So we can now add support for L2 misses in perf's genericised events as PMCx064 with both the above unit masks. [1] The commit's original documentation reference, "Processor Programming Reference (PPR) for AMD Family 17h Model 01h, Revision B1 Processors", originally available here: https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf is now available here: https://developer.amd.com/wordpress/media/2017/11/54945_PPR_Family_17h_Models_00h-0Fh.pdf [2] "Processor Programming Reference (PPR) for Family 17h Model 31h, Revision B0 Processors", available here: https://developer.amd.com/wp-content/resources/55803_0.54-PUB.pdf Fixes: 3fe3331bb285 ("perf/x86/amd: Add event map for AMD Family 17h") Reported-by: Babu Moger Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Babu Moger Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200121171232.28839-1-kim.phillips@amd.com --- arch/x86/events/amd/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c index 1f22b6b..39eb276 100644 --- a/arch/x86/events/amd/core.c +++ b/arch/x86/events/amd/core.c @@ -250,6 +250,7 @@ static const u64 amd_f17h_perfmon_event_map[PERF_COUNT_HW_MAX] = [PERF_COUNT_HW_CPU_CYCLES] = 0x0076, [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, [PERF_COUNT_HW_CACHE_REFERENCES] = 0xff60, + [PERF_COUNT_HW_CACHE_MISSES] = 0x0964, [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2, [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3, [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = 0x0287,