Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp681396rdb; Thu, 8 Feb 2024 19:19:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO68lKk2vQ9yrAU48xAYTb6ZOhDmsL+DZRRBQGaAY2gK1qeTUQc5uVRllgBFQ2OBzx3pgo X-Received: by 2002:a2e:7a12:0:b0:2d0:9e44:1af2 with SMTP id v18-20020a2e7a12000000b002d09e441af2mr298325ljc.24.1707448741427; Thu, 08 Feb 2024 19:19:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707448741; cv=pass; d=google.com; s=arc-20160816; b=qwB3a59FBN9D2QzR7M41q1OLzl3/jsRoHLLUGY0O2ayxQLRbrcmGPYJog/VMWDMQ8j Lr4Q2nyMQmw0JQvDL+No6XmIZ7Qn10Z/dM/lJwYSflvLIWm2ubDW8Sg2E4XwftcpWEFe F6BXVRdcQjGW1C7UlRaGWksDtjQ9V5fK7NaoxY0Jcm2pPDCcnRC7PKlLZYJ9AnN2N8EC R7zPUbSu+laRtnSXontlNdmbBQcxeJ7QV53fwKI8x/zfMDNstF1SxkuxsYYQNxp6KiGk s22sT3t0i6qxD7fkjgLyG1JaUT+BVErQYlR21iAgb+nQKgb/jlNalFXcDe5bhGHjfd3R uIfA== 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=O8vfh9AdzWzoQSOI9FHtdsUgg5XT6y5eCsn97EyqRNI=; fh=KMGUxOlHPZH8Rf/nHts2yitj50hqK26ea3nYXxhKW6I=; b=xW+n90mibcaBTEL/sRHQ3OKRXMLrfn3dbmF/+hE2bFza5AmAI4+nCVcOWB82Q7YDQb XL9+bXu4AMkP2bUugrz6e3VBbzBZfGMpS2TNttC9qa6nzMY9HBjEpbQQltVR2t8f0sg3 9SX0PSF492UXCQyRqrS3C8zteHwYUNEbKKjnNrbsBj4busMGzNXP2nX0SZVCsqeSq3HL UK7VzGIKf/d/YLA5QfmitsgO0CvkF4UXHcG2JqUUkU8hECBiL7/rlkHSjDK95ccdaizS 4v6FZSp1Kt+ypuBuGpdTpLUcpiyiHAFz9D3mx2yaZVbixYMMGw5+dH508YZCXjV+PlGP IBvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MvnuPpkT; 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-58980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVUQoORpHb+IWVugzma2MeuXqlMbjUO1o1UGAFJ8Z4ncIwz4enG9SIzS72SC4I92kNgWbLCzVVCatl9ztYMeNIZjoSvnPnURuD3fkJZfQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j4-20020aa7c0c4000000b0055ea89cd819si388125edp.83.2024.02.08.19.19.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 19:19:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MvnuPpkT; 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-58980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58980-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2CEB41F22E32 for ; Fri, 9 Feb 2024 03:19:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D500F38DDF; Fri, 9 Feb 2024 03:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MvnuPpkT" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 0C53D25610; Fri, 9 Feb 2024 03:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707448501; cv=none; b=nQkAPqIHakcMJTnv2TOIk0oHQ5VQ2G96HowL3fIfgm6yfZiQ1EzWeWXf3TRrNoBe3PB0a17Y21LeSDCm2J2YxqApBBl68WU9AI0d2RUAIKjHCsUBv+RHlv5mNSnvXLNEsYQN6ZwU32Yp3/XR6c5oK+wb92x/eeFylf76O+CEkdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707448501; c=relaxed/simple; bh=UHYv/wd8Tx2Q5u/rY/pti40zJf3hKXnFNuJLdQgtOuo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eG03dlf1P2vqToihW3g+2L0micwUf83CTGGbb6cDXVo8trX8+xa83Ub26FjFw5bjf5Zki6p9QP2iLXOUVYVMD4opfLTIzR5DqkAGcPu/BEux6KlBQjwSMEKVUg9pUdInnBfrBHeF4dxhwhXXVjEuHTU0zye0Myai/LvELv9kZqY= 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=MvnuPpkT; arc=none smtp.client-ip=192.198.163.19 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=1707448499; x=1738984499; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UHYv/wd8Tx2Q5u/rY/pti40zJf3hKXnFNuJLdQgtOuo=; b=MvnuPpkT2/KZ6zS4y8pvDvbb3cDm/0MOALVBKWSpREpLkoKfwRKwsRZV p6GXRuv6sFMhPfGdxQzDaR1xcR+yc9Jlf9F4slSBDmbe9GYbw0SpM5kAS RTilMKcykHgID+m2T2lpLs8dMWj7qyjgnoN6TWCpsVHwGrBcYt1/7Fd1W ga/L1VQH5H2rMsiBaGnzBko2+QzJtNtrVsVP4UyvaVkrRGHSblnSeXZe1 wOvbcWu68Iu1oubh9YMxzlKJr3Cur+u678p3NeGbvWv3fZeEXSzhIlyGp F4++1DbtKg6GSdAldW3yUdqNpRnaVsf5xWezLvO/MF/v1U3X/66iTVEAd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="1257954" X-IronPort-AV: E=Sophos;i="6.05,255,1701158400"; d="scan'208";a="1257954" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 19:14:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,255,1701158400"; d="scan'208";a="32631469" Received: from b49691a74b80.jf.intel.com ([10.165.54.183]) by orviesa002.jf.intel.com with ESMTP; 08 Feb 2024 19:14:48 -0800 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 , Mark Rutland Subject: [RFC PATCH v4 15/15] perf stat: Add hardware-grouping cmd option to perf stat Date: Thu, 8 Feb 2024 19:14:41 -0800 Message-ID: <20240209031441.943012-16-weilin.wang@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240209031441.943012-1-weilin.wang@intel.com> References: <20240209031441.943012-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 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 d08a40c4bae1..e30f7a856122 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1257,6 +1257,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