Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1122514pxv; Thu, 22 Jul 2021 23:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0cFmTu6I/HdBNY5C+ZYBeDbn2polJXfQd2aAUJPBSUpIctPMLBllsydMJnhPTnS7Dcb1d X-Received: by 2002:a05:6402:b4e:: with SMTP id bx14mr3830209edb.158.1627022282452; Thu, 22 Jul 2021 23:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627022282; cv=none; d=google.com; s=arc-20160816; b=iFdOQjUWzcEHHlWmaddyfR3Mc02fQAlVroOZZx8tm0JizN5OLXGZ5q+xUXRn5uT8/J V5DfzyazK+BlPkJYK3ZhiCfvlxJgJM7JDjYgWwmFTUSnPGv2vJIyIr5hZIIPtL+T1m7r o+a8Fip65GQEgHn7WqXzg3LK7gaMGKcbIppOscx2noP9INks38aX2zzS12FTETP9Co1N A5P7jusk71NEBqqfz0wUojPpk8POVaRtwJuDiladkdAkYujGCFb1V6hQQAdUyct/K0nA 1oNPDnU90YcA/hTAVILEKAsH2BnWXkRwqwBF0f0i2IJuVpAxyhSHBrDiIcFn7Su9ljcb yNtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=K4LMLhVPzVDt3sHlcJmO/6SfkxiFcrysoU+OOSHPnys=; b=ys4rfygK/+NeU85L4GO7HFY6QHomEhyl6Y59XyHJy7jJHuunGSPNng9p9acgixBJ23 PYExlDKhnE8Dr3GD48+v/x8qN8QySbmQHAju4dqIvexRJN1zCO3jF2BZXWJGhrU2dN5a hKRuAvprJXq8css2mxq6N/OVvHx1LubWVjV86PeIEvrpOHeMw1widneBKpA2g1gV3xub CggaQIRdoPjfgrfj3EjPBJWOAaPdpgrHEVVyTl/zI/nu9jc984VPc7sbbMsUVpV4NqEo fOtlWH+7FFolg1X0gtybgodvXLssiWdCKgb2cYR7zwqPPvxADuHRSSJuF0lA80rwj9LU ZBpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x30si10050093edy.146.2021.07.22.23.37.38; Thu, 22 Jul 2021 23:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233988AbhGWFzc (ORCPT + 99 others); Fri, 23 Jul 2021 01:55:32 -0400 Received: from mga12.intel.com ([192.55.52.136]:50829 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbhGWFzc (ORCPT ); Fri, 23 Jul 2021 01:55:32 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10053"; a="191412009" X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="191412009" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2021 23:36:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="455002283" Received: from kbl-ppc.sh.intel.com ([10.239.159.163]) by orsmga007.jf.intel.com with ESMTP; 22 Jul 2021 23:36:03 -0700 From: Jin Yao To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH v4 0/3] perf tool: Enable cpu list for hybrid Date: Fri, 23 Jul 2021 14:34:30 +0800 Message-Id: <20210723063433.7318-1-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The perf-record and perf-stat have supported the option '-C/--cpus' to count or collect only on the list of CPUs provided. This option needs to be supported for hybrid as well. v4: --- Rename evlist__use_cpu_list to evlist__fix_hybrid_cpus Add comments to evlist__fix_hybrid_cpus. v3: --- Rebase to latest perf/core branch. v2: --- Automatically map to hybrid pmu. For example, If cpu0-7 are 'cpu_core' and cpu9-11 are 'cpu_atom', # perf stat -e cycles -C0,11 -- sleep 1 WARNING: use 0 in 'cpu_core' for 'cycles', skip other cpus in list. WARNING: use 11 in 'cpu_atom' for 'cycles', skip other cpus in list. Performance counter stats for 'CPU(s) 0,11': 1,914,704 cpu_core/cycles/ 2,036,983 cpu_atom/cycles/ 1.005815641 seconds time elapsed It automatically selects cpu0 for cpu_core/cycles/, selects cpu11 for cpu_atom/cycles/, also with some warnings output. Jin Yao (3): libperf: Add perf_cpu_map__default_new() perf tools: Create hybrid flag in target perf tools: Enable on a list of CPUs for hybrid tools/lib/perf/cpumap.c | 5 ++ tools/lib/perf/include/perf/cpumap.h | 1 + tools/perf/builtin-record.c | 7 +++ tools/perf/builtin-stat.c | 6 +++ tools/perf/util/evlist-hybrid.c | 73 ++++++++++++++++++++++++++++ tools/perf/util/evlist-hybrid.h | 1 + tools/perf/util/evlist.c | 3 +- tools/perf/util/pmu.c | 35 +++++++++++++ tools/perf/util/pmu.h | 4 ++ tools/perf/util/target.h | 1 + 10 files changed, 135 insertions(+), 1 deletion(-) -- 2.17.1