Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3704620pxy; Tue, 4 May 2021 08:10:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOH2bqQUEydjTZGZlFTOf6Z5t9w52Mz8bHdv1pUtDv+8D1yhR/aHzxMi1Rx0PxClyGswD6 X-Received: by 2002:a17:90b:1a8b:: with SMTP id ng11mr5674092pjb.93.1620141000795; Tue, 04 May 2021 08:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620141000; cv=none; d=google.com; s=arc-20160816; b=wXWuQ972F9mXKz+Un8AZYDlkCMkutAGEF5pfDlGoGg43Uqe7UUZFtWNUy/r1AQ7F7T XMB2sCPnOkd6u5r1IsywgC1dH3DyBti5QOAlgVu19hO+snudLmTRTUaca5QNWQ6vBFC+ 5yFpM/h46a6SDxpbDl1m5hFwUgO/3pUmBAwtCmI/O+6QXK7NFMElUAbgCZ4FJsBXl+VQ 4rxMI0mG7OHDYeokd0lb3JPt+93/fWKtpG7K91LFt42wnPZHZ/m9lZODP8P6iInhRP2R Mmpx19KsPli0p7zNyFr/bj+9XtgzMyn9bUQSgS/STfsWWM1IHtyAOjdC90+lOdSCBwha chzg== 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=GxqMjtSqo6UrPkylZIMzzPAOqGJHe0mXIntTdhhqWP4=; b=NcLePHusGinIBqLaIGlxknRVNYexQsO2xA7Tnlt6t8aLjy1wN7jvnQrS5UW7DOJI3v Z73t1uonm9D6FwOpvkPjd7xlDg9iYNVjh24rBX+cnl5wn4VcjuzDvdfpiQNDhA24mo1N qZ6/OCaHJDh6uUwQBOo30U8m0KPkVXKgH+Q3PB4KS1NGFJMIcsFCL6S+bOQvlxAlWsP5 M28RMHWAJDiz7ZomMvcdn9/J0/OFb7h1g7PqbaAx5d8sKrUpFR8lW4ShwzpmHc5Hg9mG nk93vBmI7ZRuq+8rDuo/JDDO4ebYHeWYFXTtuiTA6GzqcAa+mR4kGUlXeHxRLcpLzO4v lSmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="LcEX/yDB"; 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 d19si16419311pjr.127.2021.05.04.08.09.44; Tue, 04 May 2021 08:10:00 -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="LcEX/yDB"; 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 S230246AbhEDPI6 (ORCPT + 99 others); Tue, 4 May 2021 11:08:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35775 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbhEDPI5 (ORCPT ); Tue, 4 May 2021 11:08:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620140882; 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=GxqMjtSqo6UrPkylZIMzzPAOqGJHe0mXIntTdhhqWP4=; b=LcEX/yDB78tqYjqOP3pdkzew5q4f1+fEbvzCdtO3PNtyI7/T9ouH14yJUzaCkdpcv8MLLs xoIgbejzk62Vf2EsIxyADy1BXKOpG+JuNUyaPXt1vj2gDsKLcj5tw1pbQI+H31NiBB2Ftj NoezB4YM8176KI/2rZyLTc430GhZgUc= 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-240-KysDyyTGNYefwM_iafrb4Q-1; Tue, 04 May 2021 11:08:00 -0400 X-MC-Unique: KysDyyTGNYefwM_iafrb4Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F203F18BA280; Tue, 4 May 2021 15:07:58 +0000 (UTC) Received: from krava (unknown [10.40.192.136]) by smtp.corp.redhat.com (Postfix) with SMTP id F3BC85D6B1; Tue, 4 May 2021 15:07:56 +0000 (UTC) Date: Tue, 4 May 2021 17:07:56 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210430074602.3028-2-yao.jin@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 03:46:02PM +0800, Jin Yao wrote: > On hybrid platform, it may have several cpu pmus, such as, > "cpu_core" and "cpu_atom". The CPU_PMU_CAPS feature in perf > header needs to be improved to support multiple cpu pmus. > > The new layout in header is defined as: > > > > > > not sure why is the 'nr of rest pmus' needed the current format is: u32 nr_cpu_pmu_caps; { char name[]; char value[]; } [nr_cpu_pmu_caps] I guess we could extend it to: u32 nr_cpu_pmu_caps; { char name[]; char value[]; } [nr_cpu_pmu_caps] char pmu_name[] u32 nr_cpu_pmu_caps; { char name[]; char value[]; } [nr_cpu_pmu_caps] char pmu_name[] ... and we could detect the old format by checking that there's no pmu name.. but maybe I'm missing something, I did not check deeply, please let me know also would be great to move the format change and storing hybrid pmus in separate patches thanks, jirka