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=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 F340CC49EA5 for ; Thu, 24 Jun 2021 16:48:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BE14D613F9 for ; Thu, 24 Jun 2021 16:48:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE14D613F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=AROhqdj3fEfcz4jE+RwgS6dRszA90P+ddHE8zLrr1zw=; b=UFm3Gu/2MUsLCtZquy4AZRMCfk sdjh6n6G2bzIm5HyDaD3h9b/x0oJrrS3h6Jgkcj7MUsWO2n1Ici5jySKmNbwwAOqy3pEYolCzrW/r Iq6ogvHI9T6cI3EbJcl9yOyLojQQrZ4fMuCPlkBpJX275piyZeUZ+uEEHOY5vjQV+cQW4UwhDJXun wK5s8NI3o7Su7mqQ1xKJs1YwVF+sEmzPnxzlscFyY84yKZdsfhT+/mkzqEACXignz8mKHFftjVnis CsAn/iRiNoz7kwylDdQrS2A3vNIByplL4UJ9NXJl8STrq0fuZFNSkoqEYwTXBcyp/YFiQkNnl37r6 vjk6L/FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwSV0-00FXi4-EJ; Thu, 24 Jun 2021 16:46:42 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwSUv-00FXgs-Ip for linux-arm-kernel@lists.infradead.org; Thu, 24 Jun 2021 16:46:39 +0000 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 23092ED1; Thu, 24 Jun 2021 09:46:36 -0700 (PDT) Received: from [10.57.13.86] (unknown [10.57.13.86]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B88E03F719; Thu, 24 Jun 2021 09:46:33 -0700 (PDT) Subject: Re: [PATCH v1 3/3] perf cs-etm: Remove callback cs_etm_find_snapshot() To: Leo Yan , Arnaldo Carvalho de Melo , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Namhyung Kim , Daniel Kiss , Denis Nikitin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org References: <20210528161552.654907-1-leo.yan@linaro.org> <20210528161552.654907-4-leo.yan@linaro.org> From: James Clark Message-ID: <4aa2cfcc-0dc2-4884-2ae4-7e977d3c60ad@arm.com> Date: Thu, 24 Jun 2021 17:46:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210528161552.654907-4-leo.yan@linaro.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_094637_723284_E3924C70 X-CRM114-Status: GOOD ( 13.60 ) 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 On 28/05/2021 17:15, Leo Yan wrote: > The callback cs_etm_find_snapshot() is invoked for snapshot mode, its > main purpose is to find the correct AUX trace data and returns "head" > and "old" (we can call "old" as "old head") to the caller, the caller > __auxtrace_mmap__read() uses these two pointers to decide the AUX trace > data size. > > cs_etm_find_snapshot() should be removed with below reasons: > > - The first thing in cs_etm_find_snapshot() is to check if the head has > wrapped around, if it is not, directly bails out. The checking is > pointless, this is because the "head" and "old" pointers both are > monotonical increasing so they never wrap around. > For patch 3: Reviewed-by: James Clark Tested-by: James Clark I think it's a good simplification and it also fixes the duplicate buffers issue. And I agree with the reasoning about the pointer increasing monotonically. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel