Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2079550pxb; Sun, 10 Jan 2021 23:32:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMXTuIl0L4zqqsrhCO5m8cwX4KcjOMEtW7D/kMpJ9NZ7gha7U6bcw6IkF5wRhGzoRmp+QO X-Received: by 2002:aa7:d784:: with SMTP id s4mr12956587edq.215.1610350355205; Sun, 10 Jan 2021 23:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610350355; cv=none; d=google.com; s=arc-20160816; b=YTnjYCJawR+shnjGV6XxccmpQjVF0VO9elDRdcuFAYTaQY0Nl2ArfEoCCu3ZnQjNJS O3A5v1DjRjjwuHWy1bgGSS6WnRfiKyDqKet3PTGCfRRTR5Dc4A2kGuYjuZlLKEycMQ7R CtU/Qo4MA+cHrR90mA+wgDT4sOy0A9dvgf4Uax0bIvRDwWorw2wlQ0wkPqkYVh5WdWk7 AbB7XwKVRld6AFGjXuEoyJ4OBdcpIz4ORFVjOr3nv4jc++8AEUpmQxflYtRFtSRDs4AO zjPBztGpsJWCysmNLEDjADJ3CA5FyVFZQoR7iTmNmfHVpWi9KKzPQqbnszC9+51BBtdD QK1g== 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 :to:subject; bh=spMf8IgIEHem6837R+p8AXiJHju695Py434oJ3Vv7Gw=; b=XpOxgRZMoD8ISkUHk/SI4B2Cv8pSR8NASCuX7vADvOXeMwt3njDWmMC5HbISAj4thK h2ncjjKBgApLVg4JAdG+8yV3hc+BdpJ6qEwMmnp748G2oTG8BjoLfinvRJXg6F/ldWwU lKkj7nVPComuuKvCqoXnU62x7D74bUVYFcIUSkHkmt5rISi9oVfxSVmTVQn9yalE8q2I f+4XKCpP6FEW6LzuOhNa1z68CRKftY/7XCdEiRfYUHXjx3TLUvqkNz7LRPSw1xSJLmgw 4fDk8+exhyju/ITGKT/q9OlZ5LKxxSIg4TKdgnT/5b2rg6FLf4NcPyn1coCXM+ja1m5v +UDA== 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si6734324eds.355.2021.01.10.23.32.11; Sun, 10 Jan 2021 23:32:35 -0800 (PST) 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbhAKH3y (ORCPT + 99 others); Mon, 11 Jan 2021 02:29:54 -0500 Received: from foss.arm.com ([217.140.110.172]:48438 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbhAKH3y (ORCPT ); Mon, 11 Jan 2021 02:29:54 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CFB1131B; Sun, 10 Jan 2021 23:29:08 -0800 (PST) Received: from [10.57.39.145] (unknown [10.57.39.145]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 50EC63F66E; Sun, 10 Jan 2021 23:29:05 -0800 (PST) Subject: Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size To: Leo Yan , Arnaldo Carvalho de Melo , Mathieu Poirier , Mike Leach , Alexander Shishkin , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Daniel Kiss , Denis Nikitin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210109074435.626855-1-leo.yan@linaro.org> <20210109074435.626855-4-leo.yan@linaro.org> From: Suzuki K Poulose Message-ID: <96ec434e-4103-02ac-a05a-761a9ca8cb0d@arm.com> Date: Mon, 11 Jan 2021 07:28:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210109074435.626855-4-leo.yan@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/9/21 7:44 AM, Leo Yan wrote: > The metadata array can be extended over time and the tool, if using the > predefined macro (like CS_ETMV4_PRIV_MAX for ETMv4) as metadata array > size to copy data, it can cause compatible issue within different > versions of perf tool. > > E.g. we recorded a data file with an old version tool, afterwards if > use the new version perf tool to parse the file, since the metadata > array has been extended and the macro CS_ETMV4_PRIV_MAX has been > altered, if use it to parse the perf data with old format, this will > lead to mismatch. > > To maintain backward compatibility, this patch calculates per CPU > metadata array size on the runtime, the calculation is based on the > info stored in the data file so that it's reliable. > > Signed-off-by: Leo Yan Looks good to me. Acked-by: Suzuki K Poulose