Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp840988pxb; Thu, 15 Apr 2021 07:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1wVj+fm3BBKR9pBIKCiyKgN+PyoUCrMCQTO/8ZZb6A+X30gorggtlD/1AeA+1xfzfLl+/ X-Received: by 2002:a62:7793:0:b029:23d:f8f4:73c9 with SMTP id s141-20020a6277930000b029023df8f473c9mr3699774pfc.61.1618498290284; Thu, 15 Apr 2021 07:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618498290; cv=none; d=google.com; s=arc-20160816; b=wF+m/EX7QXslGwOq2cg4q07k/9jhAefYCekXbCKUIf3rf9nYWbqPdjFvq/uNV56GeU BSBMZlJD+fIvGzVwaWh+xCK9sQzBcyglBMTcwGnIYXAmLUZ31JPHo5Ty6s5vcq4PzeGu lYpfhRVPAEc77NZLVCCODSBFA5qW9todImzhGtIztpRmbVC0v3xEdC0cxFLEKP1I4ShA +kxkRfJY8wl0AGW+rvo7xInOJr2Cl8LSEOetvP01fEdBHASusVh8ZOLt/QXPurISbQ9F boVxvfE8WIs8wUJeQ1Q9bJ4itGhY1flnsOfsEtbLJifltstBCSq+YP4X7LEZRbl3OWFY ayLg== 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 :cc:to:subject; bh=YaFWTi9T86AtHmeRrOHC9hJbd/yE1bfY5a4GKfSBLuE=; b=vQ72creuoyyj8Qo9QcTLONhbwQWmY+uf4FFNZwmezXb5do0ZEzhg2hcoTjj+3n83ll XX5wvu7pdynIP8ect0sHZhjjJi8MiP9qDQWDeugcMep4077C7PdnESpE80i3u7sOlXM9 9s1CrujvrAq0gWjv8OTka5PP/3jzRISq3LolXMbMIeNI5+YDijfcqR0huAOzgJjkbLXu JyBhYsAvw4RNzJUxamJzob7yZTMyx++yXMCYpWQnG2vrwOxzT6XfLHUsX5WSEMJRXIM8 WlvYtpc48BmdqUZ1qGFkoWDia9LI/SWL2RhOpoykX9KXZhsQOo5f8PcDUwFlP4rUtlby fkZA== 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 t3si3323798pfh.274.2021.04.15.07.51.18; Thu, 15 Apr 2021 07:51:30 -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; 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 S233680AbhDOOun (ORCPT + 99 others); Thu, 15 Apr 2021 10:50:43 -0400 Received: from foss.arm.com ([217.140.110.172]:48066 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233865AbhDOOuM (ORCPT ); Thu, 15 Apr 2021 10:50:12 -0400 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 0FFBF106F; Thu, 15 Apr 2021 07:49:49 -0700 (PDT) Received: from [10.57.57.112] (unknown [10.57.57.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F147F3F73B; Thu, 15 Apr 2021 07:49:46 -0700 (PDT) Subject: Re: [PATCH v4 1/6] perf arm-spe: Remove unused enum value ARM_SPE_PER_CPU_MMAPS To: Leo Yan 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 References: <20210412091006.468557-1-leo.yan@linaro.org> <20210412091006.468557-2-leo.yan@linaro.org> <882e13d1-c793-88c6-0b1e-629462fb99ac@arm.com> <20210415144158.GD1011890@leoy-ThinkPad-X240s> From: James Clark Message-ID: Date: Thu, 15 Apr 2021 17:49:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210415144158.GD1011890@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/04/2021 17:41, Leo Yan wrote: > 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. > Personally, I can easily imagine sending a file to someone to open with an older version and it causing friction where it could be easily avoided. And it even made testing a bit more difficult because I wanted to compare opening the same file with the patched and un-patched version. But if there is no hard requirement I can't really put too much pressure to not remove it. > Thanks a lot for the reviewing and testing! > Leo >