Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp343426pxb; Fri, 15 Jan 2021 14:49:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3Lue9BKv6XqG/EpKdC66xhhGJCwckjKZyRQopoSicTptREqWeFQ8uForNoW55C4PYSTwb X-Received: by 2002:a05:6402:3074:: with SMTP id bs20mr11471332edb.365.1610750985476; Fri, 15 Jan 2021 14:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610750985; cv=none; d=google.com; s=arc-20160816; b=OBGQekPDt6Bq1rVfylf3vKRQu7d0LfM9yFK1MYudnAaaI2SpZWLJ0aMkXgiQdoZTi8 2YtFVFnMgTEwQcJbC5a2TRVOZVnpKyTQpzLC60QihFRHZs2v3Mt7qOGs4qz8I5j3rzjR 1AmVa6qN7NnGn+DysBMkCvCoVw/O/PKXKerBNC3snDB0kPu1/RbPHp2My78fyukfJcgh UM0KQqXWTsIAPi5sXNsvE+7BgKCXfsSkWGxyoMrmZK4smQBucBvAbIAesU5nS266QdIt rBOMzHKdxqAY2vhGwgQ+5gJb0u++4IIeR8yJXGszWoCU+haZmLOhKiHJdU7dMMIs1Cyh G9/Q== 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=JScurv9s+g/j4cSgsjSfeApqRxZJVnspOC9oDDMdzV8=; b=z17j0ScFcwqmY8R3wwdbUSd1prTKTpvGWyARTlTSAs3DpV1nKaOB0WSmF+P5zvEvFC VNKN7iEn5hvC6LEFJaGyOo8UxZZlHVOlSD79pWoTpclR8fjEwKB3MRwB8TblINjOJrqm 5eKqtb6BgoSFD0P8rYo1rKZOlIu6sc3atMkoJLkGW3cmz0FMaY7EQb5DzRHUEO97Tku0 6x2w6PjmEJ6AUN/9lOkq2QDrliTh8qtY3NjV/1S7+S241ZkMCBHkjJpcqASP5tSq6EW5 rNBXD0UQ8vQBe9KbLQ6juaC2/wAL7omcfG7Ad+FQYc19y3XMzGUKY13pi9+n7ubYCjgg KH4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QIYx26id; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh14si4547974ejb.45.2021.01.15.14.49.22; Fri, 15 Jan 2021 14:49:45 -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; dkim=pass header.i=@linaro.org header.s=google header.b=QIYx26id; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727782AbhAOWrn (ORCPT + 99 others); Fri, 15 Jan 2021 17:47:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbhAOWrm (ORCPT ); Fri, 15 Jan 2021 17:47:42 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27D3EC0613D3 for ; Fri, 15 Jan 2021 14:47:02 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id cq1so5886980pjb.4 for ; Fri, 15 Jan 2021 14:47:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JScurv9s+g/j4cSgsjSfeApqRxZJVnspOC9oDDMdzV8=; b=QIYx26ideOsBXsSY4n1u+JFURQ+CW4hUm/VKt7rCaz66a7+EuABzbDsJpmuYribIr1 hpYawTby4rQkczz+szEfDnaKwsmFE15Mulm0O5lmQFiyzfPIDfXMzDHDtOIJvVWajEvs 4GUi2m1XJFwEqpuJHwty+GD0mlo6lLUj5QNR71lqJXeVokiIQPvS9WdBulPAJN8Azy0G 6fN8D9XgNFqfyZmSYEzQHtKEmlDDWS5J3FwYUwhnjzWYVURe8d1u+Dngq4/BZ7QE76IR 17reMI+/p0wR8eVk7kou+m8DA69KTwszMp8sUyaG52kKG4Oaju2vgUBH6YJqWszgHFRR X80w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JScurv9s+g/j4cSgsjSfeApqRxZJVnspOC9oDDMdzV8=; b=WXCPZl4ITceD9ylVBGUAo/RcJt7lFALG85pZ5iUWCpPRY4KRJF5c1u6J5TVpPu7aOW Od+hsfCMIOJ+3DG9z30KEYMzoJsbTA99W2fBJakyq3Vy3qwTcoTTvEykWRMR6KJiz0EU 1Z/FpflYYyKVwu6Pb7qMS7gSt5MLsV6YMbDFLvOyYfSTF5EPJwdSkIDOrWqbriWP7YXQ zjjH8ZygGF5LaVb0Vw9vjqqzXAEP3Xj0L2/gtjwiw0DMfndYw1TRJSK7OCiJueXc0YaX wk6xdK9R/b6BHRSQTMcQURkitpTFwc7deU8yKZlfvBaiI1Zbo8Hz62nM1UqDXBRblmfM ruCA== X-Gm-Message-State: AOAM531qvHLTrKff+FZO30CnFRt5fJGrR9vt33/rOb5DwlN4UCjB0TJV X+3iXqBRnZ4RxDpKJN80lLC5eQ== X-Received: by 2002:a17:90a:a88e:: with SMTP id h14mr12649790pjq.59.1610750821674; Fri, 15 Jan 2021 14:47:01 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id l197sm9165931pfd.97.2021.01.15.14.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 14:47:00 -0800 (PST) Date: Fri, 15 Jan 2021 15:46:58 -0700 From: Mathieu Poirier To: Mike Leach Cc: Suzuki K Poulose , Leo Yan , Arnaldo Carvalho de Melo , Alexander Shishkin , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Daniel Kiss , Denis Nikitin , Coresight ML , linux-arm-kernel , Linux Kernel Mailing List Subject: Re: [PATCH v1 3/7] perf cs-etm: Calculate per CPU metadata array size Message-ID: <20210115224658.GC375055@xps15> References: <20210109074435.626855-1-leo.yan@linaro.org> <20210109074435.626855-4-leo.yan@linaro.org> <96ec434e-4103-02ac-a05a-761a9ca8cb0d@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 12:09:12PM +0000, Mike Leach wrote: > Hi Leo, > > I think there is an issue here in that your modification assumes that > all cpus in the system are of the same ETM type. The original routine > allowed for differing ETM types, thus differing cpu ETM field lengths > between ETMv4 / ETMv3, the field size was used after the relevant > magic number for the cpu ETM was read. > > You have replaced two different sizes - with a single calculated size. I usually go through an entire patchset before looking at the comments people have made. In this case Mike and I are coming to the exact same conclusion. I will look at Mike's patch on Monday. > > Moving forwards we are seeing the newer FEAT_ETE protocol drivers > appearing on the list, which will ultimately need a new metadata > structure. > > We have had discussions within ARM regarding the changing of the > format to be more self describing - which should probably be opened > out to the CS mailing list. > > Regards > > Mike > > > On Mon, 11 Jan 2021 at 07:29, Suzuki K Poulose wrote: > > > > 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 > > > > > -- > Mike Leach > Principal Engineer, ARM Ltd. > Manchester Design Centre. UK