Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp622308lqg; Fri, 1 Mar 2024 16:11:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVA83USLgJcnc5igjg3DcKfpqqprkBfpdmRvK3Cay8NOJqqpZTNxPTJiooh7K8Iq55DVADdrrE+EhQKopatLKK6zpnoLlEnLUvPhb+nSA== X-Google-Smtp-Source: AGHT+IG5fFHbwhGrE9o31FM/TlyK5Dle3JYpobSd6OFoPKEluwRWnWnJB6fDwNpKSKAepZOWoUgL X-Received: by 2002:ad4:5762:0:b0:68f:2f2d:d01 with SMTP id r2-20020ad45762000000b0068f2f2d0d01mr4704347qvx.10.1709338315618; Fri, 01 Mar 2024 16:11:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709338315; cv=pass; d=google.com; s=arc-20160816; b=FXUynvR3MPEL2+WyvxMWNldZMERa8sAKQRZZRy8/VazCGKrbQkBnUl3gCm67GXTKMK NXvaK/uiMWOJXcFvHb/nplBqDVFEq6IMZ4YPbpo6Z3BjgdbaJ/HehNZjoWfzfnq52PQ/ 46mQEmAzZMVrORtE0xjKGXurxkq6AgW6Zc3IAfjbQAGXEptuVXk9X7bHsCMq6szD9umy pGebDUKXTEgo7siC3eGCTjIRQKOMWl77iDBPACxLndyvt+xK5ArBCeHJLWXZlfV3kg9X 8vwGKfNUnwObFk0XWr4tjsbACW0olKbghsUJk4va4lwKZew2V60NGFtJaEBK1iEpKGmX jV9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=zhZlMVHPbz3iQL+fTkxjmZHFZfkpEZdB+EvBtTxd8W0=; fh=D8N1uhCLBRzbbRgEj9aMJ2/kVuNqnMf8W9VxSJOfqPA=; b=KU0T/0Wrv8p8MDuN+0GZ9wWZ8a9mrzmWNODWIpaKIwllEC2Jg1gDatZrC3T8Lg9lzn O4QS0VSg12r8992FF6LzsyKtQY6uu8T0zt/Fjr325hC9vwkg/x8BJwRlSzPftEXp08y3 Brp5Vf8iFNDkrKF+uYbpHR+Ys6NVVMxwGMCQnvZws/gz+MNq+rT+jjwS3rhAfz7XEVxj pBWLoURmIBZ8WvA2qqaN5D1r7WntAGRXq2xJoibh8icIFaP5KU6PjF3mCVHogsL+R3kb tzk2Doyx4G8ZiDZCtBuvsI7l//m9XhoCsTbX8K9auFLBcQfgviMpTerVuqyJpyTemTC6 w3ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K2MZNme9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-89249-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q15-20020a05621419ef00b0068fb26a9f72si4607555qvc.447.2024.03.01.16.11.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 16:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89249-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K2MZNme9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-89249-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 577BD1C21CFF for ; Sat, 2 Mar 2024 00:11:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79C69EC3; Sat, 2 Mar 2024 00:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K2MZNme9" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6F6818E; Sat, 2 Mar 2024 00:11:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709338308; cv=none; b=FNHm1A1Q/iBjrC3gtOHC9E/8rGbE3hFTJ3x4K2nCuwJd1+v54f9fAhOqy5+LcWpZfGJk9oQ0Dxkd2scQkg5rPDZAjkYqpH3SS3PcVe2SRHDECHoD99nTuYSsVtCJ7B1A5a63EeHPpszcIymms7xQAG7HQw2gwbujSm4Oy2OzScA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709338308; c=relaxed/simple; bh=YbbN4/2I6FjwwqjnWSCQGvc02IAtIL2K9ffSxBw2VkM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OhixWz56PBZSUnGS4sKS1+6CmElG4eSTxq7jr3XyMCVcgkTuCZjrEOzKXMQL03kIdsEk+UhIswycv7NAeyVJIndsX/2TKZN4tc06ljFWyDnBkV54lNQ1hdcQobEJY9a0sj11rsJqNkxrLi4b1Zf90DJHRJMW8okWjkp1RjX55EU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K2MZNme9; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709338307; x=1740874307; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YbbN4/2I6FjwwqjnWSCQGvc02IAtIL2K9ffSxBw2VkM=; b=K2MZNme9CbbvPA4m3l/Y3hT5tB9qzsAXrSCbVYZnT9APuYGwm6YmNnDC lWgkHRPxfRsuhKP4bvhjHdgGtCQH7QFe5S17lPNplL7UdvAIRE6QhDKxB tGyFnzLgdcTpVTXjk8odzgpbVECPjvLfuFMv5JN2y7nha/v7Tl1ndbxSm LENh+ge3KVqyfMMz5VlMtIEPoekChp6AP3tbjmzWE7KPk9z1hwi01lNy2 yCAneM3cazhkOHCGteO0TWiR9wTuUcwckvabBLXQP7wCYSbwkYTyPVhHl nPWZaVOI3CLaUX5Rii1zhdzsQXlrnkqghOZ8cY4mio/MW7X81q4/bQO69 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11000"; a="4476129" X-IronPort-AV: E=Sophos;i="6.06,197,1705392000"; d="scan'208";a="4476129" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 16:11:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,197,1705392000"; d="scan'208";a="13054628" Received: from fl31ca102ks0602.deacluster.intel.com (HELO gnr-bkc.deacluster.intel.com) ([10.75.133.163]) by orviesa005.jf.intel.com with ESMTP; 01 Mar 2024 16:11:45 -0800 From: weilin.wang@intel.com To: weilin.wang@intel.com, Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Perry Taylor , Samantha Alt , Caleb Biggers Subject: [RFC PATCH v3 0/6] TPEBS counting mode support Date: Fri, 1 Mar 2024 19:11:32 -0500 Message-ID: <20240302001139.604829-1-weilin.wang@intel.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Weilin Wang Changes in v3: - Remove ':' when event name has '@' [Ian] - Use 'R' as the modifier instead of "retire_latency" [Ian] v2: https://lore.kernel.org/all/20240228161227.484886-1-weilin.wang@intel.com/ Weilin Wang (6): perf stat: Parse and find tpebs events when parsing metrics to prepare for perf record sampling perf stat: Fork and launch perf record when perf stat needs to get retire latency value for a metric. perf stat: Add retire latency values into the expr_parse_ctx to prepare for final metric calculation perf stat: Create another thread for sample data processing perf stat: Add retire latency print functions to print out at the very end of print out perf vendor events intel: Add MTL metric json files tools/perf/builtin-stat.c | 222 +- .../arch/x86/meteorlake/metricgroups.json | 127 + .../arch/x86/meteorlake/mtl-metrics.json | 2547 +++++++++++++++++ tools/perf/util/data.c | 4 + tools/perf/util/data.h | 1 + tools/perf/util/metricgroup.c | 81 +- tools/perf/util/metricgroup.h | 18 +- tools/perf/util/stat-display.c | 65 + tools/perf/util/stat-shadow.c | 18 + tools/perf/util/stat.h | 5 + 10 files changed, 3069 insertions(+), 19 deletions(-) create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/metricgroups.json create mode 100644 tools/perf/pmu-events/arch/x86/meteorlake/mtl-metrics.json -- 2.43.0