Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3229623pxt; Mon, 9 Aug 2021 21:21:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymvf6QNXI3ZSNGWHpdX0kNon+LKT91kidhDdX1NqjLUnseEcFH+JDRF6gtdDQgfDFCcsgH X-Received: by 2002:a17:906:16cb:: with SMTP id t11mr25326537ejd.16.1628569301971; Mon, 09 Aug 2021 21:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628569301; cv=none; d=google.com; s=arc-20160816; b=HWEMAyjeL7oAApaE2lzmkweg4r7fhU6AhmzeJJdH0+mOr3l0dLbPmRRZnoHITVVrMb S4f8AE5FNwbMXTGngZzPTp4TBwzL4IB2R0an8BlmVRnBsldSXgYXayfwbtQtqzQmZfwx 6B4E6aFL83xJlWBktPOnwce4zxd5RRId/N4M0fnKd/0KqfVFqJ+PcxUkBfuBlRY/ZxGL RIADZ5DwadbMDM7pmW3hQT9hVc2BqIrdaKUE2fUomZDvZoWfiV3y6i598YqCwMalesan qbrhs+zbkMXYq1jbP3+cn5oB5olwLyvjo7rWfh64bGeC+4fAZmi2Q19I1mMIFF00BmcU N6gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=YAEenl9uKI3iHcM9NjKuNfE5u18D6gHdIgPO78cDF84=; b=DfJ29VJg3SQZUiGrM4YywBGvtzYtWeOICZErrT8dNYKkHpNbotBCzslIA6QlEZNcRl SN+tEEdZJjZarHsvD/1YZwky/905Nto5hdZRF27WZs8zNUihPUV0OWB/C1idBrTjGVcU /adqrEskHw2NmB1JsPm6O9pVHgQvAxeMECB2a4RwlNQZHveCMmbII1jd3xFintrJqehD LWAvgiB47RXsvLxEFdR2MDZ5BD1CQZmHrQhGz134/laGmwr2UmbB1djXb0MYYj9KZoHB 0WjZ5/ObAWrm3RlZ3122xhCf9DpHguwe9uHPtmoiscT7OCF3fFf9i4YFIOFtTHFSzvA+ TA/g== 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 a25si6693190edj.71.2021.08.09.21.21.18; Mon, 09 Aug 2021 21:21:41 -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 S237107AbhHJAhK (ORCPT + 99 others); Mon, 9 Aug 2021 20:37:10 -0400 Received: from mga14.intel.com ([192.55.52.115]:31820 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233500AbhHJAhJ (ORCPT ); Mon, 9 Aug 2021 20:37:09 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="214540545" X-IronPort-AV: E=Sophos;i="5.84,308,1620716400"; d="scan'208";a="214540545" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 17:36:48 -0700 X-IronPort-AV: E=Sophos;i="5.84,308,1620716400"; d="scan'208";a="525721020" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.238.4.147]) ([10.238.4.147]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 17:36:43 -0700 Subject: Re: [PATCH v4 0/3] perf tool: Enable cpu list for hybrid 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 References: <20210723063433.7318-1-yao.jin@linux.intel.com> From: "Jin, Yao" Message-ID: <2a179676-05af-8e4c-d7e1-210076eb3b08@linux.intel.com> Date: Tue, 10 Aug 2021 08:36:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210723063433.7318-1-yao.jin@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, Any comments for v4 series? Thanks Jin Yao On 7/23/2021 2:34 PM, Jin Yao wrote: > 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(-) >