Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2577216pxj; Mon, 10 May 2021 06:16:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcwTP8yGlb9esArW3/6a6c5xhf0FnllXwTNZxxYFyXnuqhDcuCYZDeXtFcq0UN46DisyyX X-Received: by 2002:adf:ea4d:: with SMTP id j13mr30607203wrn.238.1620652597118; 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=gwxgye36wcmsbvxGu2ShcoDRzcGIViNLWI4NkPlpQCzAZukyQpkPbDCF/eiqcOM4ZM cfLen/3Pi7Me+IVr161UkXHTkDjdsl+7i9NgGvodhRx2o5XCIXnUMR5wPW9EiuolmQTb brXGARRcNKC9u+Ww4XuqwVEzZLvpkXy8WSdjUw2kEp5DXA8Rl5pE7IzEaDsA09Rk2qnD 7iMhVuQaM4BuDJt2z3TMpbCsCSNYZ+rO4tW3IOebUfchxajwv8/84JO4/zhLEfiyUuI2 n4Gtf4VNB3i3vXIN7BdvD0oKK/QyD5Euo85cwD64OzmiZRjv0VEaGvCG5lP0MLScWMsq Kmwg== 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=uWguGrclwEnEpjCWx9hkfnX3Pd9bynv9MmA0sKIv9Go=; b=jC/wGiZG/TtmUI91Lgcl02t7hpO9fuCcad71xwG5qpdQAB9NqFDsGOx2yXMEBESUNN jbuxvbDBl8q+8pnFFaJivLSSMBf+C6MkSYMG1ETULvxi+Hi+6yVoHwmdiNMl8fJatgqA Qpar0iUKQC5cyCnLUDc21ZELctNDcz3qvcXkxLl8UuBlgvIYIl+pxLMRSDl8Ty0cvs5Y Ff6oZikltyzW+8OteN7Udjurbouc1bmO1vRCJYBnkMST/8OUl5lKsW+MyuwY28bn/oJO /IeObqaOXAtaY9ZbHYtBRR/uP9xbiTNive0tPq8D2Pv0xl57B1SaIIoNhEQbHhklUcPC imBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e8pi3fCG; 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 m17si10578022eds.264.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=e8pi3fCG; 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 S234989AbhEJNPD (ORCPT + 99 others); Mon, 10 May 2021 09:15:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57390 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351739AbhEJNMz (ORCPT ); Mon, 10 May 2021 09:12:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620652310; 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=uWguGrclwEnEpjCWx9hkfnX3Pd9bynv9MmA0sKIv9Go=; b=e8pi3fCGtEt8iKIW2yYCDLX7tItv1pgXbl3ArNPkGRqZOmTKA4M5Xdn7gq668UPGp3/09P TpUXMlSGxR7JwxWvqKt152oYjWYHnt2HcidM/3PSp6d5JYBZAqlJvM2OpCLWGPEf2wGJtG CKbyc7gCZAmom3BxxkVm/XbMLbZe8S8= 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-188-0veEja26NrCMkoNz6DhVhA-1; Mon, 10 May 2021 09:11:48 -0400 X-MC-Unique: 0veEja26NrCMkoNz6DhVhA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4CDCF106BB3E; Mon, 10 May 2021 13:11:47 +0000 (UTC) Received: from krava (unknown [10.40.194.219]) by smtp.corp.redhat.com (Postfix) with SMTP id ED0B45F9B0; Mon, 10 May 2021 13:11:44 +0000 (UTC) Date: Mon, 10 May 2021 15:11:44 +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 v1 2/2] perf header: Support hybrid CPU_PMU_CAPS Message-ID: References: <20210430074602.3028-1-yao.jin@linux.intel.com> <20210430074602.3028-2-yao.jin@linux.intel.com> <5cafb729-1dcd-ad4a-507b-1155c16a785e@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5cafb729-1dcd-ad4a-507b-1155c16a785e@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 10:43:39PM +0800, Jin, Yao wrote: SNIP > > > 'nr of rest pmus', we know that all pmus have been processed. > > > > > > Otherwise, we have to continue reading data file till we find something > > > incorrect and then finally drop the last read data. > > > > you have the size of the feature data right? I think we use > > it in other cases to check if there are more data > > > > The challenge for us is if we need to compatible with the old perf.data > which was generated by old perf tool. > > For the old perf.data, the layout in header is: > > nr of caps > caps string 1 > caps string 2 > ... > caps string N > > It doesn't carry with any other fields such as size of caps data. > > To be compatible with old perf.data, so I have to extend the layout to: > > nr of caps for pmu 1 > caps string 1 > caps string 2 > ... > caps string N > name of pmu 1 > nr of rest pmus > > nr of caps for pmu2 > caps string 1 > caps string 2 > ... > caps string N > name of pmu 2 > nr of rest pmus > > When the new perf tool detects the string such as "cpu_", it can know that > it's the pmu name field in new perf.data, otherwise it's the old perf.data. what if the cap string starts with 'cpu_' ? I think it might be better to create new feature that stores caps for multiple pmus in generic way > > If we add new field such as "size" to the layout, I'm afraid the new perf > tool can not process the old perf.data correctly. > > If we don't need to support old perf.data, that makes things easy. we need to jirka