Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1400966lql; Tue, 12 Mar 2024 16:49:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKfabKerww42sVrv3qFVkwgg7gymdLWXM1m/fM7Ka7o6G3ibDm8vVt7JmHTubr9M3ky9cqZlSp4LMt9uADmELa4ssRVpBaplPShXsMVQ== X-Google-Smtp-Source: AGHT+IEk2Hm1hz5Y44kPSsyKOmjomJN83XykWtJ77XmDYByqvpx+Zi6948vQhNbiSnnoY8oL9cfc X-Received: by 2002:a17:902:ec81:b0:1dd:8ebd:8508 with SMTP id x1-20020a170902ec8100b001dd8ebd8508mr5756295plg.51.1710287382868; Tue, 12 Mar 2024 16:49:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710287382; cv=pass; d=google.com; s=arc-20160816; b=arKfIJ3MbuXEPajMBgD2xPUPHBk6i9tWfmUlABUa47OFI4PdSJTo2C4Zw2C+P684Py xzaahmLdbp60auvPYYrNXmFOOGUePeZehKqqAHy2zuTQ4iW5HVrmR0a+R7EKIemw9iPW PoVZZbtEcqGvIYnVXvvlWqQZ295xkx4qLUCE20mBh+z1/CMLzwy3J9BtSs4qtVJIxIeg hV2cFF26+H609hY8ELonRAvFX4CL1dJm67YCGPtYAewRI+K4MvKs2iYQm3Ned8oU4Qjx ccAmtnKB7pEnEPqWnEPPKZ6DKeYnqvEoRp5lTb0NmGoWjFlhM7yWjaMEKL7vpgf23CY2 LwnQ== 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=9yEu55Mu7QZlO7R8H20zmL8sHgpltgiMbDef9x2VvXs=; fh=7D8bWqELNqJM6KF7zbibUOya8038rGAdDMFXsJMRu8c=; b=IE0E9vHINZ0BTafCFzAvD8Y+Fi7joI3QpbDMhjhqdPt0vtaYP1KlccTYKb9g+h4C4l r0t8I+9yznRRI/C+J7FurWc8rsNxy3kRX5SgWspAPFqrjUR3tWHovI/fk/WdYh4efl+f bn47wdEni2+PFKwVKGjLB8g79t0311sdk8oEsedbn/YRDsrQRLSwuP0F+X5jmtpCQ8/S 7CXHFap1cqhYwQT7ZL4hu45WLX9dvft/vAkiIck06mJPz2ph4FXwOoE7HZ2sLaTc53G4 I4CsWZTpdKHU+i9nHqujtYOjzVNYSX783Od6DS19TRyk6mmP40FLWii2ABUPtx+gI+Kt VT7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="j/DoIPeG"; 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-100930-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100930-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 20-20020a170902ee5400b001db5a8f9316si7399310plo.152.2024.03.12.16.49.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 16:49:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100930-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="j/DoIPeG"; 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-100930-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100930-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 8C27C283512 for ; Tue, 12 Mar 2024 23:49:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44BD048CD4; Tue, 12 Mar 2024 23:49:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="j/DoIPeG" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 8105F482CD; Tue, 12 Mar 2024 23:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710287375; cv=none; b=oRsuI8fpKy9ZvwHw1Ird+ITzqvrS3pexaWFLh4e/nmlx0Ip7mhlGGMd0fM1HEY3RiVqyvYzP80exNVUdIf70+KvFiv2gFYF52mbLCSE7JtAiNGfsDDp6IUy/Em1LVU1fsMmXTxrZqPAQrjwSb5hvjjEVoLbgQBzSNvn3U9AAoIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710287375; c=relaxed/simple; bh=OtolE6CfIog4+s2OsadQub4oH1qqtGz/aAJ3MFhUzus=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UK0lI0Q/Pq0uDUb73uzumKJl2OyM85NGCIJn9lqdjgUQbi4+/qTMep99P4IbNAaB5evP+Qrq8RsGVs2JJmCHtLRYmri87l5u0332Rk3StWkNQOwlMVfo6MLgQjc/NQ0gM6U+/075XTEGHnA2SDtvQbCRu0yfKJzwdFmeY3H+DX4= 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=j/DoIPeG; arc=none smtp.client-ip=198.175.65.14 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=1710287373; x=1741823373; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OtolE6CfIog4+s2OsadQub4oH1qqtGz/aAJ3MFhUzus=; b=j/DoIPeGckomc2OAs4mRLh5J46Kory4DPegxTD75aaVrJXVjxIUdwHNi eIyRL6Vso54HEAPzal/N4bLTKe0Vmu1w1QbNsAolRCmrWQQykIIovqv0x aeaS75V4qz8g80nETxY84GXTwPzdLp1NVhiFEs2jtkxms6rVNRfjOLtq3 6oJ079kPr+k+5Z9ifa1leRVEAXrsB9jd9JAzw77lMTOpLBnTY7992rtO/ kJxeDfO938/BAYUKYgVvWrlYkePNfv2ww31D4C0dCacdAsPVichcxxvEY qEkGjYZcHQ96Ma9yfb5iws8KEfC4vvebgVlgO6eTFqButs46CqeZ9m8rU A==; X-IronPort-AV: E=McAfee;i="6600,9927,11011"; a="8847684" X-IronPort-AV: E=Sophos;i="6.07,119,1708416000"; d="scan'208";a="8847684" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2024 16:49:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,119,1708416000"; d="scan'208";a="42715663" Received: from fl31ca102ks0602.deacluster.intel.com (HELO gnr-bkc.deacluster.intel.com) ([10.75.133.163]) by fmviesa001.fm.intel.com with ESMTP; 12 Mar 2024 16:49:32 -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 v4 0/6] TPEBS counting mode support Date: Tue, 12 Mar 2024 19:49:15 -0400 Message-ID: <20240312234921.812685-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 v4: - Remove uncessary debug print and update code and comments for better readability and quality [Namhyung] - Update mtl metric json file with consistent TmaL1 and TopdownL1 metricgroup v3: https://lore.kernel.org/all/20240302001139.604829-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 | 4 + tools/perf/util/data.h | 1 + tools/perf/util/metricgroup.c | 88 +- tools/perf/util/metricgroup.h | 23 +- tools/perf/util/stat-display.c | 65 + tools/perf/util/stat-shadow.c | 19 + tools/perf/util/stat.h | 4 + 10 files changed, 3074 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