From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E24CFC433B4 for ; Thu, 15 Apr 2021 14:43:49 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D7C861139 for ; Thu, 15 Apr 2021 14:43:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D7C861139 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=096ODeEEmQ+vEt5Zuh1b7xYwvHQ5Phs0uNAUIEx9o5k=; b=DRMxyInL3KYE1KUrjzUvPJyII CGKGqbYwtkzPirmQC+BQO39OZ8D/2uB85Q6f6bSIcmxEkVTqx+YCEGOowaRtMUCNHjn8PWQKiyAr7 /23vBuudx9DWPEsYjIvPDhwAE2Ay6anVztE4fQA5ZfpQpyEGxl34k3rVVXWaU5zU0fGkfyUZ4wXIB vgoMnT9ywfHGO4uTDXJkfWBdB0XDr1nAWl8ZqAiXUk7NDieXbTval629yiNMXhv9WMCJMqNN7ySgx AvY07Wg3ssyocQUPCQung1LXzFUCoF2oCkp1Op9fVXcmuJhG2ULJmVCZl2M+cazekG9eRn6Rw6uVN oWkoYUAcg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX3C7-00GTtu-2b; Thu, 15 Apr 2021 14:42:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX3C5-00GTtj-Ed for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 14:42:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hatUuIhFi7CMwOdtJnGcgxnJeKk201WCNig0Migkokc=; b=n9wZ1P9jiAVfcGU0oa93rNhE2+ VF2E0NeF+DeaqmArWTe+kOJt5lvNcz1ENeJbGjXR9KNw4NI3WUCmMdOOmSNxD5GVpWajTLCj46fno IwKVa4dmLY+1O6IGvOYWBe9nOsLfvjBTP9z9bOHTboeNPPcV4F3JVjBK5gX5a4yXrCv84PgFRWaM0 srsrixkUxHRS5evLLeF8YYXir2SBo4A3vWPpDKh56WNTNxVKGZ/jO4mAvmjvCUDKSo2GUelqDQx+f sbEMYJRf2wwntJnMlSIOOjnnWCVpL+ES6UNdiZtcHyeVkB8Ok5Yl4ebVi/y1ld+7xzAvE8xCcTxrS ftfB8BZg==; Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX3C2-008f0l-QI for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 14:42:08 +0000 Received: by mail-pg1-x535.google.com with SMTP id b17so17055655pgh.7 for ; Thu, 15 Apr 2021 07:42:06 -0700 (PDT) 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=hatUuIhFi7CMwOdtJnGcgxnJeKk201WCNig0Migkokc=; b=WWvQUtlCtm3XADW/zB82p0+6Hb5UM6F14J4u3VKgtfXypsgmQ9OUwXGOUQklu3RSqZ +R6Yu1xwTw+VRqAt1W9KDznQETO7wmMLiN5E3jC8sRmIqBYebwSFH5P7e4mln4VQ9cqT vyOLwyPpClX8h+xkfB+LMtuM170wDldyjrIs9mRugpcXU/Hh4BcY6TgQI7ES9THgOEaD vkedDhegu0iRrjDHjc7N93ZiGPFl1yQ8yVrspF3kbMTc3KdV+PxKJ7tuR4BE5HMaHz7F nxwpwufQqt2cyGBLOYZtD+E5k3hXj91R2eheqFLaUE193ta3anEpLwwx4G5K5xF6niky zVwA== 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=hatUuIhFi7CMwOdtJnGcgxnJeKk201WCNig0Migkokc=; b=uIe+WzVouBAYZi/61TANibMf8erLrwBLtOv++X9tYowUttOwpsTCcMALEx/dtLi43v OrEbx5msO6A1vcwC+Dj3/XQoEszbJMQ9xEEntP2tH6lwCX6YvyB78RNhiInhBlSsEQKk b+lS5Dn3W/Xpqv9EcNjlXda4pDQfY2yd1BgNh/z9Ea7JAa6bn479uWjuPOmqo2F3229r e/hXLrQb8bJmiprRg8CR7MKlrcT5ffvdUZgxx01FQzoGPlt+zEDvlgg/cUfC3lq74MKq h4H9hEnZh4sFnkqwdrK85IW3Q/19hKor7eGv2gojFGFx97f5k5dbwBVyBRJ8EUBfxGky 8jcQ== X-Gm-Message-State: AOAM53054ud6S76n2FoDSBwKmGou2dx3ppZum9Y0LT3diWbPd4ClJatM XGUwVDQiwhqS7sIVWbVgurz0mA== X-Google-Smtp-Source: ABdhPJzOVlfOiUa73d5LlzAx57mYNgnY2nwgWDcJlPxpK8barrG8CUwSkXJPPE6FSKXQTMAjqBm4Vg== X-Received: by 2002:aa7:86c9:0:b029:245:1c62:3499 with SMTP id h9-20020aa786c90000b02902451c623499mr3489516pfo.74.1618497725486; Thu, 15 Apr 2021 07:42:05 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([116.206.101.232]) by smtp.gmail.com with ESMTPSA id t10sm2719605pjy.16.2021.04.15.07.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 07:42:04 -0700 (PDT) Date: Thu, 15 Apr 2021 22:41:58 +0800 From: Leo Yan To: James Clark Cc: Arnaldo Carvalho de Melo , Al Grant , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/6] perf arm-spe: Remove unused enum value ARM_SPE_PER_CPU_MMAPS Message-ID: <20210415144158.GD1011890@leoy-ThinkPad-X240s> References: <20210412091006.468557-1-leo.yan@linaro.org> <20210412091006.468557-2-leo.yan@linaro.org> <882e13d1-c793-88c6-0b1e-629462fb99ac@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <882e13d1-c793-88c6-0b1e-629462fb99ac@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_074206_874865_EFCA23B8 X-CRM114-Status: GOOD ( 21.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi James, On Thu, Apr 15, 2021 at 05:13:36PM +0300, James Clark wrote: > On 12/04/2021 12:10, Leo Yan wrote: > > The enum value 'ARM_SPE_PER_CPU_MMAPS' is never used so remove it. > > Hi Leo, > > I think this causes an error when attempting to open a newly recorded file > with an old version of perf. The value ARM_SPE_AUXTRACE_PRIV_MAX is used here: > > size_t min_sz = sizeof(u64) * ARM_SPE_AUXTRACE_PRIV_MAX; > struct perf_record_time_conv *tc = &session->time_conv; > struct arm_spe *spe; > int err; > > if (auxtrace_info->header.size < sizeof(struct perf_record_auxtrace_info) + > min_sz) > return -EINVAL; > > And removing ARM_SPE_PER_CPU_MMAPS changes the value of ARM_SPE_AUXTRACE_PRIV_MAX. > > At least I think that's what's causing the problem. I get this error: > > ./perf report -i per-thread-spe-time.data > 0x1c0 [0x18]: failed to process type: 70 [Invalid argument] > Error: > failed to process sample > # To display the perf.data header info, please use --header/--header-only options. > # Yes, when working on this patch I had concern as well. I carefully thought that the perf tool should be backwards-compatible, but there have no requirement for forwards-compatibility. This is the main reason why I kept this patch. If you or anyone could confirm the forwards-compatibility is required, it's quite fine for me to drop this patch. Thanks a lot for the reviewing and testing! Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel