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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 10874C2B9F4 for ; Tue, 22 Jun 2021 14:31:28 +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 C0DE5611BF for ; Tue, 22 Jun 2021 14:31:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0DE5611BF 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=UWrIAtwdzcfmb9jYEwydrB+3F3lIZd+CkrYZ71IGGK0=; b=lP/mlp56MRc5xADCxgfs20uxs/ 2VoVjXTAEK3hK0ZeAHp/qn83bUCGTbha0+8zCbrwZvkHk5y9jiKZ+8E0Fxpl+udeqbkl1WPDcBV4c XHe/feBZJWkk/HEz5NHLn/7Rx/86RN5Ul35GmgKUrRUb+y9Y+5HnsBF/wGedNB/3UxBCeC/wuPE/H 1BIdK28aDHULwCsIr62FjQ6E+9Ihlui2BF0KiRvlTDDJGT7cMzy6NYrQWACVH+Q9JgqeQwgtCfge5 4oh4mM2b1gE546ysBJzPj6q3xT2s9fVCduI8f9x7yIkAs+4BtET510LxfqVaYMPQTLGNyHxnpgJ9g rCgjXbfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvhPP-007VnB-0F; Tue, 22 Jun 2021 14:29:47 +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 1lvhPL-007Vlw-9Q for linux-arm-kernel@lists.infradead.org; Tue, 22 Jun 2021 14:29:44 +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 C6DAE31B; Tue, 22 Jun 2021 07:29:38 -0700 (PDT) Received: from [10.57.13.57] (unknown [10.57.13.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 68B1C3F694; Tue, 22 Jun 2021 07:29:36 -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: <05442998-05f6-c41c-5a78-3f6723558825@arm.com> Date: Tue, 22 Jun 2021 15:29:35 +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-20210622_072943_445430_D9299E9A X-CRM114-Status: GOOD ( 14.17 ) 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: Hi Leo, I came across this other comment in coresight-tmc-etr.c that should probably be fixed up if we remove cs_etm_find_snapshot(). The same is duplicated in a few other files: /* * In snapshot mode we simply increment the head by the number of byte * that were written. User space function cs_etm_find_snapshot() will * figure out how many bytes to get from the AUX buffer based on the * position of the head. */ if (etr_perf->snapshot) handle->head += size; I'm still reviewing patch 1 and 2 as well. James _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel