From patchwork Thu Feb 29 00:15:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 21117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp87881dyb; Wed, 28 Feb 2024 16:16:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWv5zK8+R9NH2UtxE7E7m0KH6Wj+r4hPjPz3k85sI9aOXMewkVK0u1q751G6H+U2v4dCSGkoLGE3a7B2RJDj8jG25Di+A== X-Google-Smtp-Source: AGHT+IHHfE4lrxtLwyOlTaWnMfNIAZ0aPSGOQv7/jbJD2OVpkC0eRhlTeKGBnmySqaiuONORCpAf X-Received: by 2002:a05:6102:d90:b0:472:7429:5d14 with SMTP id d16-20020a0561020d9000b0047274295d14mr490328vst.10.1709165774301; Wed, 28 Feb 2024 16:16:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709165774; cv=pass; d=google.com; s=arc-20160816; b=nIQWJB1BqOcq/BX+vPbqA/W9ZrDRIww9uDuVpivQqJ4wacme/R1nMk6ToDI1Hx2H93 uRBRMtgvCtQQFTp63KqyYG+E5oD0xmq2Aq9G+AglAYeR/wcim+WwkN/Jea3eXqJjKdTg GKssu0z5VXbvhmMyfDVVdkwMct5+cCKs6KBjrjOHQSOwbz+KN5s0ElJ1RCPBeucrIqWj tMAslSIUExGo3ETAJjLGeJsTltEHNoq7CoXlXnhhXB5LfqOke5ZrSZvaAWeFH9lXfWvD 5T/IiyLfVSt9I04wgNmIzPlTYzzROUp1OlTYOXG0AxOce9g73k6edQCqULpa6O/Xrexl YaNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=dcL9AcUcVelYgbT04eVXrPkevsg/BMkfHE93xGttlPQ=; fh=aUTm3OhtCStwPR+zYSTqIYABJrwiWk7g5v9Ev+UtvaE=; b=s2o9Q5sG6uKWjONlqocnUkGmhwa8dtChoWQ7g8uOVyyUEHZ8NBUMseZ4mIpYh1WJ9r FOu09EzR694EQBgSp/uhZpt8MK1fsyC5CetHGn57/DcHRN1cGlrF8dg/tZ72r61j00+g Eef9kt7qqTPcpi9u2Otl40jwVSor1D+f7DFqgeb5sIa48On8HFYfFDRPGnDnOTOcPjkT Uavq8iDycGkFQNz/A1LhD5sjIr9JO0IbonRWJNr/eZfj2oCHkpf+vafDz3Fq2pHLutHS 0ljqEzYXO5LH3jvyL0P+QHkL/2UzrggqvTdS4O1kwRuTkkAkBNgnWmEVlryeayS8bDxW 4Qdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=c8EToDgm; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-85877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85877-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e5-20020a05622a110500b0042da96c1c18si312455qty.551.2024.02.28.16.16.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 16:16:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=c8EToDgm; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-85877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85877-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C89E1C21538 for ; Thu, 29 Feb 2024 00:16:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C48E11DDDB; Thu, 29 Feb 2024 00:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="c8EToDgm" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4C9107B3 for ; Thu, 29 Feb 2024 00:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709165745; cv=none; b=Wkw7nfvTCcSarGrVobsc0V7VJK0cqv2WCBXDfm9NxA8IamZmKO5doSEAsx4zdXqNdeXv5ki3NDcYWOSWuePy1amsdOy5O7jJxUazpCNCqnZ407Lthh1kmwJZloiA9l8HfqhXrsnPeb7vDN6PtoNQMz07Y9AMwMwvb/mHoXocFU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709165745; c=relaxed/simple; bh=w/dBhGtqOiet87mj9CIQnP4Eds9GW8q+8jq3/Y99j+Q=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=Iaoo1ZhHF0dc5gdvm3hUGhxxSzuvhGkovxipTUyCxaEmUEC8vU+QrQRN7yK+IZxfxbFCTjvnIztHTRBkke4M0P7pSWdBNWdKbGVKnBzgJfm6T2FafXeeWcMEIaunr3n151+wNL+EE2X2BRjqu5rqJkojHor1gnRVoQsNvBc+Dvs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=c8EToDgm; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc64b659a9cso695073276.3 for ; Wed, 28 Feb 2024 16:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709165742; x=1709770542; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=dcL9AcUcVelYgbT04eVXrPkevsg/BMkfHE93xGttlPQ=; b=c8EToDgm3weolB5MosjoVzxiKMjJhwCczhCLU6c4JRdhkzC+UTLpnTzNV5ofHhZxCh n3VM45pP3GyRjTswNoq8WK3EJSISyzG550UXdZXecDQUJofvpuWWzznR0aLx/6pvlAhl mdrHq5dSkDTTSjGQvyCbSB2X8wy2mFReBpe7OEsI4g0LzRuGX+BhAMEUjtGUzdbnxrpX 5DL9wlB4X4Vy0upWgubY3KYcjtRcx+jvR3mYvjcNw2pT8NDsTJDPNiZs4moGrm+GP7J/ BZXYNjzx/ZePPvtbkzSmG2xWPsdn1rSM6nPA01zAoV8vyG7STB6c0/E+uBDXpnrHQRi9 bTlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709165742; x=1709770542; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dcL9AcUcVelYgbT04eVXrPkevsg/BMkfHE93xGttlPQ=; b=sTmb2bqdHudN7RhVyuvGJt5cJHUPC/zx8HP4kHNPYEyx4MJEEZl5Srq9GsXBEl9xlj Anjo3KAip/kC6F0nIyR9HwgSmgWBsYFkgyhD77D73xOD9Axr5mTOigm66A9LbzszuBi7 dQf/lVBolXnIsDpNVukkZiRQoLE/DGd4C/HED5SHlUXSIsiayzrEqtd7fUBvYAqVMr+2 iAEC/OHA9jBY4zb4TVt3/jZTuuOJ5Vg+pE/H0YacVQErWD/XuMdA2lQIhQpqByNd2tDs LUm9eEwuPZCYDnTWSiMyEmrAH8MGij7cBfkPrvO+DnITBJixIx4ibDxCafEyzFVgSZ6F V0jA== X-Forwarded-Encrypted: i=1; AJvYcCVDR0DxS5fTSQ9xfHabPwtMlVNpQt6m2TC5BWNULCGoTZJ/mb8VV5vpqBLRCVQWB7+ekYyCUndnlpX5bgXiXuuvCEhpWk759s8BsvXX X-Gm-Message-State: AOJu0YwP41dNKWsLsrAoGm6SV75pfMQ9qO+ijMmcGdGK2es68k6vwbFP NN1nXEE/hjTCgHppQAps/aXy54+Y961DN5lGklJsobLZWs+iZbGUw02d2WJ68Bb2PQGzSnBTgD2 ZzloLGw== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:77dc:144c:334e:e2dd]) (user=irogers job=sendgmr) by 2002:a05:6902:250d:b0:dc6:f877:ea7b with SMTP id dt13-20020a056902250d00b00dc6f877ea7bmr198122ybb.9.1709165742694; Wed, 28 Feb 2024 16:15:42 -0800 (PST) Date: Wed, 28 Feb 2024 16:15:24 -0800 Message-Id: <20240229001537.4158049-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 00/13] Python generated AMD Zen metrics From: Ian Rogers To: Sandipan Das , Ravi Bangoria , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Kan Liang , Jing Zhang , Thomas Richter , James Clark , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Stephane Eranian X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792190210610232765 X-GMAIL-MSGID: 1792190210610232765 Generate thirteen sets of additional metrics for AMD zen. Rapl and Idle metrics aren't specific to AMD but are placed here for ease and convenience. Uncore L3 metrics are added along with the majority of core metrics. The patches should be applied on top of: https://lore.kernel.org/lkml/20240228175617.4049201-1-irogers@google.com/ Ian Rogers (13): perf jevents: Add RAPL event metric for AMD zen models perf jevents: Add idle metric for AMD zen models perf jevents: Add upc metric for uops per cycle for AMD perf jevents: Add br metric group for branch statistics on AMD perf jevents: Add software prefetch (swpf) metric group for AMD perf jevents: Add hardware prefetch (hwpf) metric group for AMD perf jevents: Add itlb metric group for AMD perf jevents: Add dtlb metric group for AMD perf jevents: Add uncore l3 metric group for AMD perf jevents: Add load store breakdown metrics ldst for AMD perf jevents: Add ILP metrics for AMD perf jevents: Add context switch metrics for AMD perf jevents: Add cycles breakdown metric for AMD tools/perf/pmu-events/amd_metrics.py | 642 ++++++++++++++++++++++++++- 1 file changed, 639 insertions(+), 3 deletions(-)