Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4762007pxj; Tue, 22 Jun 2021 07:31:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9Y1bNH4L/jXwINXt4XRmKmPwiclyO97uz9UWRn3UzhgsYvDpVhiq67eNFAMQ0RrgMGj33 X-Received: by 2002:a17:906:3b13:: with SMTP id g19mr4236967ejf.360.1624372267410; Tue, 22 Jun 2021 07:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624372267; cv=none; d=google.com; s=arc-20160816; b=fIAFRyKFlm1BEWNCjxAKP/k3mZpSDS4u9rJhZub03VAYx+vHbkIg5J0DQmmjUYHWqF +mUGLf2RX0utZWAO2FFIjscEAu9GLafVElo4jOXqtFNV5d68gMKS+ZvOe6LQWl9VNvwc QKzrRhOPmUhDRZYlSk6zjNrYHpMcfRUeZOMvpaRvVOzOEQ7nhB0Bk0hUfsJ/DyYQXe4/ ciwuqq5vqTfc+fF438CEPRsXFBrSkCFfhZillR6v7xuR+6YSxWJEYsfYf4GFoo9xVgYU iXYEaCe7L0DwNN+VZHmuj8G2vn7jkWDsoUlRZ2WyJ+Fx/jEclFXMdsmWbgxMA+crl/mF 7NmA== 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 :to:subject; bh=sQjMlEJguItj8Nbil/j/Omv1Zd5ffwDifwrl6XNegJg=; b=zsveJv23xjMF2ph1LeF6vFZXlNpGVET3hytAe41pNsHgdwDcuDD1Ef+aD+ipwrT7Qc PTRzpDeUkRVtmr/zaJoV2URtpUkr7Z4bLMo4/Fk5wjG3bPFV1gFD9SHRN6m4xrA+3LJx CG526EiRieWPBwGbNFse0ZgmXKXXCaAQjyVgAbWl5ZrP91YPAWrgzWxkCR3t+iza18xb qRa7gIDdQ6IXT/bI8ybLzAYpKBRjAb5U0Ru317V/xNeLFPI33Z4r5WzBktRUE4iP+Ihy pCCsSGv6Uk8uCxmIuPtoDaw+RwthQ7YLG1N6DXFKdCoAmXen3jtNww9v9JNEZbkcmYyi RSCw== 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 jz1si13726380ejc.257.2021.06.22.07.30.43; Tue, 22 Jun 2021 07:31:07 -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 S231478AbhFVObz (ORCPT + 99 others); Tue, 22 Jun 2021 10:31:55 -0400 Received: from foss.arm.com ([217.140.110.172]:50316 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbhFVOby (ORCPT ); Tue, 22 Jun 2021 10:31:54 -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 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-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 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