Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp38748lqf; Tue, 26 Mar 2024 13:35:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXssK2ESZsstcu1oz+OCCnQL2kfySpo3+yB4Wkr6orkDmWiIPwtj1pdly+F6iJJbDlbC702yGFbfvf4OA7OYPuhNf0svlRcWH9YIC5q9Q== X-Google-Smtp-Source: AGHT+IEyg4le5nnmAKzDBePAWYFf7DqAyNQKHkmkR2E7fUMgOwByHcUhIYBk6Hkaj0j5RutJ99gn X-Received: by 2002:a17:902:e551:b0:1e0:b628:a752 with SMTP id n17-20020a170902e55100b001e0b628a752mr3792918plf.7.1711485345940; Tue, 26 Mar 2024 13:35:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711485345; cv=pass; d=google.com; s=arc-20160816; b=CKAlJkWe6/Pj/BBvCCCONR5po1fXiNRmJQa5nU5kOerKM9ovU2NJFdcycNBtptSMvF ydvyWg3WXo54xNe/iPgaw/cQ/rG5Zu099GTIu7I9mYJYk0KpzsTGFvif10bWAt9XDyKA LnQCccc+1b47Bg5ebDMN2eEefrLYJPKDBmjie20rU4/mGApeGYwdK5+dW1CjAWIGuEKG 9+ZtZMA8h8R3nmjGMqRD46wAdsQpfhSYGerTTDKjdoI6QPXg8sjcPTGaYQDvFbpfQUzV gV+kdAh/urzpoW7EVKsIvWkeo/1DeP6idq6dOYiowTGujIFPfYg41M+hV0WVSJW6pr7t SpZw== 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=Lf5rZxZDjftAd96uy3apnTqs+RODvX9lVXp6qhE54rY=; fh=7D8bWqELNqJM6KF7zbibUOya8038rGAdDMFXsJMRu8c=; b=cio1sYQekrlZGfhC8Z88rR2lAOq6ejK9DEPbv7pDKsk5bVilkpd0wFiEPl1geRWIGK voaCWTA0AOlEWSZdUx8aibxLqu3hsnHcJ8kbJfHPbMyMpNUz51yx3zGeZNGYfe+CD6Cp Vwafj8qsu1tI3sMJyL99QgyYOUWv9bUwAsJkmvI2CXEnLnc7dXScPkqulSKyu5DUot6/ eAliuUxD2KVAsnvGQ5RJDDvkSllMD+qoEobkFBParPsBuRTf8m1lqEz3RFaHXffliP+C IrWCDeg4FyrZIaX+/wMx9nK/CQN9QyIqWaQnWhKJfQgDCX41+aOt7cTkH3zGMENjDUlU H3oA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JbkNdxqa; 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-119916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id im16-20020a170902bb1000b001dee0e175c2si7644420plb.230.2024.03.26.13.35.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:35:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JbkNdxqa; 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-119916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119916-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D350340AF1 for ; Tue, 26 Mar 2024 20:35:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 682E113E89F; Tue, 26 Mar 2024 20:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JbkNdxqa" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 9F92013D60B; Tue, 26 Mar 2024 20:29:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711484974; cv=none; b=pYgq/dd0WZdJtk3It3qNsPGaKW9Fumg5cWfSLIhpQEHefEmFUtY0sFBA32PzavFBaLhGBMdL2qbIsEcgeVFDJLgfFw+WsqJ0y2K0fhccWnCq2vhXSIIFDJHoIUYHAepQslRAU4IXG97/MCBbnLGx08q/GF7jX0zsyVeHyUJhDE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711484974; c=relaxed/simple; bh=4hlpqAQd5tKpB941Bi5b5enQ2JvIR959aRQ4GT535tA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DPytmeoGTupailKPcVyru09mvjhIKMfE1osa+9+HaolP6oLnMtV1EJQ+qqOy8f5655r0Ma3fKa4X616Lqx5JDTY7Q9H9WJBDUG3Puvb4yO/zzLLHAPd7wDQ3a0DcFoEpL9qCQTze/C6Kkq7hv7Txz9EwiXGHJ8yaos4XHGIjUjo= 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=JbkNdxqa; arc=none smtp.client-ip=192.198.163.8 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=1711484972; x=1743020972; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4hlpqAQd5tKpB941Bi5b5enQ2JvIR959aRQ4GT535tA=; b=JbkNdxqaJXDHKXB2RlsqG/Sl19a6xawHf0eveWEHRQvGG2/VjkvH+ll+ sATfcsAN9pWBPXUd5eCNMhIJMEf8NCHvCcJ5+Y1gBkjvOF68/u0lMb6SR IVZ5/2rDRo6N1ywfMb5iZ/IFw3TZR4T2gmAOJp4ZFqA3PvCR7JoKuRVp/ 1peD9TwJ19yD+KUOHg6UiMlVnVJouwjwZlK6qCSlIlnpSUTnhiTUcUzNf b03R/3TfMyCsB0gFCyj5Zyp2aM49ZRKZKON10X8nYeVSfj/5xb/XFTULe /nMgac8Snv5KL0emBVhwcZFgt1ek1bTnlgv55lj1s4wNxZMrmik+mVjV7 A==; X-CSE-ConnectionGUID: R1d/17SyRReLnepekwL51g== X-CSE-MsgGUID: 6gZCgWe9RuKhutePbKSbEw== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="24049071" X-IronPort-AV: E=Sophos;i="6.07,157,1708416000"; d="scan'208";a="24049071" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 13:29:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,157,1708416000"; d="scan'208";a="16162994" Received: from fl31ca102ks0602.deacluster.intel.com (HELO gnr-bkc.deacluster.intel.com) ([10.75.133.163]) by fmviesa008.fm.intel.com with ESMTP; 26 Mar 2024 13:29:31 -0700 From: weilin.wang@intel.com To: weilin.wang@intel.com, Namhyung Kim , Ian Rogers , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , 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 v5 0/6] TPEBS counting mode support Date: Tue, 26 Mar 2024 16:28:53 -0400 Message-ID: <20240326202859.960577-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 v5: - Update code and add comments for better code quality [Ian] v4: https://lore.kernel.org/all/20240312234921.812685-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 | 211 +- .../arch/x86/meteorlake/metricgroups.json | 127 + .../arch/x86/meteorlake/mtl-metrics.json | 2551 +++++++++++++++++ tools/perf/util/data.c | 3 + tools/perf/util/data.h | 5 + tools/perf/util/metricgroup.c | 88 +- tools/perf/util/metricgroup.h | 22 +- tools/perf/util/stat-display.c | 65 + tools/perf/util/stat-shadow.c | 19 + tools/perf/util/stat.h | 4 + 10 files changed, 3076 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