Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2577225pxj; Mon, 10 May 2021 06:16:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMAIAlJw42AIwQHk9QVXZwgpRqdWsZzHuGgRlGh2YH3P37r4/v3bGQ0pEq9ykmrpPc7BT7 X-Received: by 2002:a17:906:d969:: with SMTP id rp9mr26047968ejb.516.1620652597648; Mon, 10 May 2021 06:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620652597; cv=none; d=google.com; s=arc-20160816; b=i9gy5c0M0xnZeMOKySMuOX4IQDSMInKCnInqZm4B2cPCyQwS0InbBxB17NCSxpQdtj E8UyvVgn0LcAhFG6GPIu+e9juSK+31VL3H9CsX6IC7OpMBofFcz1W3k5eZe8QjECGP7C 7zIZsaE297Hc+xUwattIc/3qsovrVEWRbXP+pubt8EUzl6IU++wUG/2B0ySxH5gS8E+n 9zq/GRXu1I3rRxWhV7OrdChr7KKF8H9MC7KRh/IJAIxnYpmWs/aaaEIRAIVwHFfCUE7u ABCoGJ4cLsesfWCv7+b6Fsib5zsY5c7fiGnmdvqDAhYqp+ejTR3MLaXDDAi5umATXm2m 7Dww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BU9c48EzWCgdtReLzeaB/8ggIHyNTNlUbhBRF189oGw=; b=DN81ONltI0txyveCQsTsgP+jcOkeh+QMPxOChKL+dv2wHZUsXi7iorLmXjm2bVFYqo CSlIkW4NVIJ4uo8+eIXXeXWvFL2Vuobtjdn7uCUqBITMVV4SKb+COB3M2Dy6FAzOFRAF +g22KmmDYhOxZZe0KcUnur4/ajomFNx2ksKzVlIH8hYQqdXzdDOTOe/CVfKpONUmXkuS W2awkbjPqqXmxyFkgqKtptdDCq307tHpTCDhOZDGG+5AdxANwlttMOihgc+TRfh2zomf Rs5W4HXI8928Qy0csHRi9362fxqsa+UZq3hUyrQJMWUfhwdLC/v+2JtI6PxeBqkzItkQ fwrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LYB365bT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si11616077ejc.193.2021.05.10.06.16.11; Mon, 10 May 2021 06:16:37 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LYB365bT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236715AbhEJNPi (ORCPT + 99 others); Mon, 10 May 2021 09:15:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32782 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351768AbhEJNND (ORCPT ); Mon, 10 May 2021 09:13:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620652318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BU9c48EzWCgdtReLzeaB/8ggIHyNTNlUbhBRF189oGw=; b=LYB365bTzYOBaTbZjwKFqTYLuobOUoBDf3FQYRDCC12QBOIkoxV5Yhr8W2lggo2FhEXuWK WtacfmHoa+lzQdb+L0E4Q5g84PjPiNepc896+7InBwGoncdNV5y6I9iBDn/YaFolgqi1KL ZrT7jTmBvwzIETPDlGJqgMsbu7Fv0Qg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-510-JmzA4M1zPqe3Nv9Z0_sWlA-1; Mon, 10 May 2021 09:11:57 -0400 X-MC-Unique: JmzA4M1zPqe3Nv9Z0_sWlA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A481E1922053; Mon, 10 May 2021 13:11:54 +0000 (UTC) Received: from krava (unknown [10.40.194.219]) by smtp.corp.redhat.com (Postfix) with SMTP id A784560FC2; Mon, 10 May 2021 13:11:52 +0000 (UTC) Date: Mon, 10 May 2021 15:11:51 +0200 From: Jiri Olsa To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v2 1/3] perf header: Support HYBRID_TOPOLOGY feature Message-ID: References: <20210507035230.3079-1-yao.jin@linux.intel.com> <20210507035230.3079-2-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210507035230.3079-2-yao.jin@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 07, 2021 at 11:52:28AM +0800, Jin Yao wrote: > It would be useful to let user know the hybrid topology. > Adding HYBRID_TOPOLOGY feature in header to indicate the > core cpus and the atom cpus. > > With this patch, > > For the perf.data generated on hybrid platform, > reports the hybrid cpu list. > > root@otcpl-adl-s-2:~# perf report --header-only -I > ... > # hybrid cpu system: > # cpu_core cpu list : 0-15 > # cpu_atom cpu list : 16-23 > > For the perf.data generated on non-hybrid platform, > reports the message that HYBRID_TOPOLOGY is missing. > > root@kbl-ppc:~# perf report --header-only -I > ... > # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CLOCK_DATA HYBRID_TOPOLOGY > > Signed-off-by: Jin Yao > --- > .../Documentation/perf.data-file-format.txt | 14 +++ > tools/perf/util/cputopo.c | 80 +++++++++++++++++ > tools/perf/util/cputopo.h | 13 +++ > tools/perf/util/env.c | 6 ++ > tools/perf/util/env.h | 7 ++ > tools/perf/util/header.c | 87 +++++++++++++++++++ > tools/perf/util/header.h | 1 + > tools/perf/util/pmu-hybrid.h | 11 +++ > 8 files changed, 219 insertions(+) > > diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt > index 9ee96640744e..d9d82ca8aeb7 100644 > --- a/tools/perf/Documentation/perf.data-file-format.txt > +++ b/tools/perf/Documentation/perf.data-file-format.txt > @@ -402,6 +402,20 @@ struct { > u64 clockid_time_ns; > }; > > + HEADER_HYBRID_TOPOLOGY = 30, > + > +Indicate the hybrid CPUs. The format of data is as below. > + > +struct { > + char *pmu_name; > + char *cpus; > +}; this is missing the nr count, should be like: struct { u32 nr; struct { char *pmu_name; char *cpus; } [nr] } jirka