Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp175593lqp; Fri, 12 Apr 2024 14:12:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzckmrDhYqKUEqvMjBPLiAMkXTDFVo2n6vJzVmPe/ICCzBMDwZl4SEJ5W2yl7iUigkMSoTWTj5KMAyh7FLiU06i7iGoEb4Kn/yF0/WVA== X-Google-Smtp-Source: AGHT+IEN6iCg8gEMPNSqL9+KwxdEf41Kte44txuYyP3LrUwx4gJVX7dstc0/A5/ev1BApoYjv2vb X-Received: by 2002:a05:620a:8211:b0:78d:549a:c098 with SMTP id ow17-20020a05620a821100b0078d549ac098mr4153368qkn.19.1712956350759; Fri, 12 Apr 2024 14:12:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712956350; cv=pass; d=google.com; s=arc-20160816; b=AsXSrUKqcVb6p+sa4Ceb1WTN5Qu0NYoQmM5+n2+Newkvk1DnKEgxXIywu2YhgQOPHk N30W2OVf6wYrGjnnyZ3khQKOAYozdqW1xgOV81AtP3JuWHDBYQKagKa24A+9vbeCHKO4 0B+Eqg14plf7A1bbKoo4EtAIbrx4aXf/pbBhq6g20ZWkNZnk7kSLZExaT/hs3xkaufMz 9WFdjgjVuGM8erSTFKsG/wSGIijlmSj1+57degbDQn3rFeFplOZDN4NBFnXwZ9FmwBuc tJTuLy2+3nPbWAn7FCjM+we0qYmP0NHW1MDTDY3Yu8MbSwF5PznxY0r5JUfVscKSEBLR fsJA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pIb0B4JGUwYeP4jHJva+6J56VL5icUCumXAe3Oe4Z7Q=; fh=2mx6v3byCNS4RNMabLmfY6Bz0Xn6VvJsmk1bF8Vd49Q=; b=aJcEM8Nwv/sMf/hXx/2d8TctVyGM70H+Z31q3SDdwuvBbuWzMGMbddMbwOiT8iepEM UtOIMXaRoAUtVH5tupQR/lx79oVHdZgt+PJ12pjB8UBJ464zRzcX9ja9dYQzR1QZFivx KPDDmAsH+tUL3RuaptcDcxGOZKfJ9TFzFAvnEgOgj37xhxG84qPY9PmstI7o0ek/FnA+ nNZzXv80TaftyVvWdcfXf1WUW00nvw0bHWtJRIxedZzzaaWqAhj9ZZ59GgUrzho2FdxS NNq9rDzAUB1mfUC0nXfWXSoVT6LhL4UvRH9vf31Lps8R1u3iSAnAwkbrWwVVTt003YUs aMaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LsdAPOMw; 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-143369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143369-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f20-20020a05620a12f400b0078842405561si4552251qkl.734.2024.04.12.14.12.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 14:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143369-linux.lists.archive=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=@intel.com header.s=Intel header.b=LsdAPOMw; 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-143369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143369-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 E28381C23F2C for ; Fri, 12 Apr 2024 21:12:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFD0014F9EE; Fri, 12 Apr 2024 21:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LsdAPOMw" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 3FEB4153800; Fri, 12 Apr 2024 21:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712956101; cv=none; b=fvoi/ZynIMuRoDEI7X0VqmYij9ArSqYFaJ/v3BkGGUCIwoqEDMNb5Aor/w3jKgqeU9goMFYECcp4bbD7mX2SxNS7eO18QVPlnSKz2DMZQTt8Q2dDzbh636inXd6b44G1l+TAMjdALYeBWgXzMlkTNAHzRwVSh6yJq8qOh/oGyX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712956101; c=relaxed/simple; bh=bd4PQWlSFr0I9pEM8FxSoW1pVNhaL0iIOylEleDEVQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CAm2evZxmqlStTpTJo8z2nmu5iVyGhDVwLdpgKB7/ghyWvYEfu9YrvzS/BXAY70PKhZObgnMh44Q6kRm3H/bfuXpPUS7roJ7g/Um5dHAs+tdORgw7m8QmjVl9sydopuYVVLggCQ8T1FOGRuHFuo3IZ/djTWzg0cQJywZrm8Anck= 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=LsdAPOMw; arc=none smtp.client-ip=198.175.65.13 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=1712956100; x=1744492100; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bd4PQWlSFr0I9pEM8FxSoW1pVNhaL0iIOylEleDEVQU=; b=LsdAPOMwlG2FqUnspiBDu4qmStxwqYSF64I7icUgMDznGS03DVfCCb+J DSY3AwbWJhUr7w041ozjuKWUiYJpIlvKA7kY1/M4d6bnxRrlBZJOntf25 UwzZHS9E6LDCtjDyuWAG1BDPfbqZ6R/xh3xS0wLh0n8TptyIjaiFIKl03 U6qZfizK60M5Euf1flJg9SJssKPzPmosOiMPpSlKcQQYOcUc0MliKL0fP n4Lwuie5fGjXfxdQ5LiXqn+i1QFiO4vDTt2Q56GmXcfMJzqYMvRahFGIr a6Flbm+nt2oYWsNQFRQZMBOHYmndsi9RpLPWiBo1isk0re/sTKa6Ti2Ta Q==; X-CSE-ConnectionGUID: Ixi9ogX3Tbeprexk6qypeA== X-CSE-MsgGUID: ZJjArDDrQWeJqsvVbXcEvA== X-IronPort-AV: E=McAfee;i="6600,9927,11042"; a="19575508" X-IronPort-AV: E=Sophos;i="6.07,197,1708416000"; d="scan'208";a="19575508" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 14:08:12 -0700 X-CSE-ConnectionGUID: vZJWBqgWQ8yT8B2mIDpbHA== X-CSE-MsgGUID: dnWJWx1SSaqJwNi2OhIeqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,197,1708416000"; d="scan'208";a="21772126" Received: from b49691a74b80.jf.intel.com ([10.165.54.183]) by orviesa006.jf.intel.com with ESMTP; 12 Apr 2024 14:08:11 -0700 From: weilin.wang@intel.com To: weilin.wang@intel.com, Ian Rogers , Kan Liang , Namhyung Kim , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Perry Taylor , Samantha Alt , Caleb Biggers Subject: [RFC PATCH v5 16/16] perf stat: Add hardware-grouping cmd option to perf stat Date: Fri, 12 Apr 2024 14:07:56 -0700 Message-ID: <20240412210756.309828-17-weilin.wang@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240412210756.309828-1-weilin.wang@intel.com> References: <20240412210756.309828-1-weilin.wang@intel.com> 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 Add a cmd option to allow user to choose this new metric grouping method. $ perf stat -M TopdownL1 -a --hardware-grouping Reviewed-by: Ian Rogers Signed-off-by: Weilin Wang --- tools/perf/builtin-stat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index c4a5f0984295..8c33e3f8bc80 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1259,6 +1259,8 @@ static struct option stat_options[] = { "don't try to share events between metrics in a group"), OPT_BOOLEAN(0, "metric-no-threshold", &stat_config.metric_no_threshold, "disable adding events for the metric threshold calculation"), + OPT_BOOLEAN(0, "hardware-grouping", &stat_config.hardware_aware_grouping, + "Use hardware aware metric grouping method"), OPT_BOOLEAN(0, "topdown", &topdown_run, "measure top-down statistics"), OPT_UINTEGER(0, "td-level", &stat_config.topdown_level, -- 2.42.0