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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 BB523C49EA6 for ; Mon, 28 Jun 2021 01:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95EFB61370 for ; Mon, 28 Jun 2021 01:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbhF1Bdy (ORCPT ); Sun, 27 Jun 2021 21:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231739AbhF1Bdx (ORCPT ); Sun, 27 Jun 2021 21:33:53 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E7CC061766 for ; Sun, 27 Jun 2021 18:31:27 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id d12so13982112pgd.9 for ; Sun, 27 Jun 2021 18:31:27 -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=XY1v4wQPZXeUEo4/Ib4mftoEqzCDn6DSUGjjwDuyBRE=; b=FQ9lPlRpChEJNBV1I2n07ASVhvbA4e/+UW2OaF0a95J/WR4CZsFgIHlqTQP7bs1KoP PBBh/9jthXzZvfPY9kmZFR1MwQgvX7JGxRKK0nCqbr0qwUFSglMwTJbbH4BIoCa3BjLV AZEY/vnzjxAID0P7ckWHvJqTXFNW+VLNUbMJ2DaeYRtzsFEiHPq8aXjhO7IVmOkPKMfn 7lLf9Ms77XCPQp469oRPKqNzZq/20iNGjjL/7Y75RnQyvum6ARDZD43tFirnYsE/xsLe KJku0ieyxGoSmDxwRWQDu2vQiN0XAOlfStmWwoCcmcVepNhDwA4r+rzOrUmLGHMNIJC5 B0aA== 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=XY1v4wQPZXeUEo4/Ib4mftoEqzCDn6DSUGjjwDuyBRE=; b=FnbPsY5M2dlAms3ZdfS/Cc/+zDSlX+djMREbG0BpuUe0cjCmcmPfY9CDOA4ljYN8HA IViuAUUGcq5hDHg4xbUSIPDhMnoUdDVg/mdjlMVIZFUcGZ1FsZQn+RxtRuT1oMC/3nUz 47edV92PpUHj01azAOy3ccEDFHR1+jxJ7gme5UZNmpnvWacqLHm41W+DZBVS9ScvfO60 fh8Wv1ak0vMIHNIA09HhsW8B0bCfgp2+GKhobskdvW9uq5VXnlvcFPD7oKqDIAC3wzS1 IUL8P/BtKJey4PsMxXQA59nndqrUBiNZWhSOdo7vWF2+gbuuFKQsWOv5O89LrSNZY0eH QQYg== X-Gm-Message-State: AOAM531eNgHrTsXFm6AydrrPoF2LS8CtUsF9FE7Hi//J2OufYIY9/idV jibkXVJJdBSbMaMrnSeFprHf4g== X-Google-Smtp-Source: ABdhPJwbluA4O/54AMZ1I1l5jNnR1ZVwqNEM2VriU8rA5cXtdQHddLL5iz3dG/aJx1cdsWqjy/SD9g== X-Received: by 2002:a63:d909:: with SMTP id r9mr21255556pgg.285.1624843887047; Sun, 27 Jun 2021 18:31:27 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id l12sm11884145pff.105.2021.06.27.18.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Jun 2021 18:31:26 -0700 (PDT) Date: Mon, 28 Jun 2021 09:31:19 +0800 From: Leo Yan To: James Clark Cc: 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 Subject: Re: [PATCH v1 3/3] perf cs-etm: Remove callback cs_etm_find_snapshot() Message-ID: <20210628013119.GB158794@leoy-ThinkPad-X240s> References: <20210528161552.654907-1-leo.yan@linaro.org> <20210528161552.654907-4-leo.yan@linaro.org> <05442998-05f6-c41c-5a78-3f6723558825@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05442998-05f6-c41c-5a78-3f6723558825@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On Tue, Jun 22, 2021 at 03:29:35PM +0100, James Clark wrote: > > > 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; Good finding! I will fix the comments in next version. Thanks a lot for the reviewing and testing! Leo 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=-4.4 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 5CEF1C48BC2 for ; Mon, 28 Jun 2021 01:32:55 +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 1327561423 for ; Mon, 28 Jun 2021 01:32:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1327561423 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=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: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=17nre+MIk/FHRQv2aaSVM7axUqs1FC4LYFOGdPm9KFg=; b=NJZwqosRLCXM2Y Yff+7K1yxDnWzsJNhrhb7VjaPBb7t2PVbo8ceRvhi621aAJ3gchLz645sii/cC+CRCl1TS+VwcEQC rZTelyTjr8hi5/3MFkLM4gfYaGDBnihHzBxvGF47rbMsOsksZfu6gTZppB4UA67EfKnDj3TYeGPNi BgMcoitT/GPvsZiNsfnQEsAl/Q74knUHwK6WltwvOVcjljiDdY6j5OEFXwgw9oQf8iSSbNhNWU4lE EkFBMFSq4ioEOjdP+C2MHiXMV8lyd7ehfWbOfibdKTJe+hFc2F+6RYNYfjmLObFuPNnU+xOZYUasJ H6M2Wc10U6XNF44m7VzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxg7X-006Oy7-SZ; Mon, 28 Jun 2021 01:31:32 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxg7U-006Ovh-Ae for linux-arm-kernel@lists.infradead.org; Mon, 28 Jun 2021 01:31:29 +0000 Received: by mail-pg1-x530.google.com with SMTP id u190so14007905pgd.8 for ; Sun, 27 Jun 2021 18:31:27 -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=XY1v4wQPZXeUEo4/Ib4mftoEqzCDn6DSUGjjwDuyBRE=; b=FQ9lPlRpChEJNBV1I2n07ASVhvbA4e/+UW2OaF0a95J/WR4CZsFgIHlqTQP7bs1KoP PBBh/9jthXzZvfPY9kmZFR1MwQgvX7JGxRKK0nCqbr0qwUFSglMwTJbbH4BIoCa3BjLV AZEY/vnzjxAID0P7ckWHvJqTXFNW+VLNUbMJ2DaeYRtzsFEiHPq8aXjhO7IVmOkPKMfn 7lLf9Ms77XCPQp469oRPKqNzZq/20iNGjjL/7Y75RnQyvum6ARDZD43tFirnYsE/xsLe KJku0ieyxGoSmDxwRWQDu2vQiN0XAOlfStmWwoCcmcVepNhDwA4r+rzOrUmLGHMNIJC5 B0aA== 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=XY1v4wQPZXeUEo4/Ib4mftoEqzCDn6DSUGjjwDuyBRE=; b=Gbmhn5phMid92m1+ttYtPm1uL0frApnzNuGI3bu8OFlgFbgD6LTFq4UTHgYiXpRbJj XT+LPHFjQ6/WJ8wNDL7CbQ3DMWrPXhlik6/CLOzgI86WtAGBV4GQPDA1PYNYa0cIrpvh 9h8RaKaJ3F+GexXrsuq/QlybP2Q28l+95Q8l44Omfgh0lG636cGZRBY8DitrjJqSJvRX 5uxPdHk7r4FG0hk9mJ7/yiRB1nNI8g3VF4ZXXEewAXZtelaYHd1JdHQMrVZG5/4E9jbb SKyx6ewWwohv+ktzOBviwc3QVg/RB+RcTHPYY9udoFWOSiws24qewlHJnKBcJSezKQcF GQKw== X-Gm-Message-State: AOAM530M/VS/MRFUyNbcEu5JfhIw5ctOTQdmMLpE6T8KWeBeGq75cEyL fsT9f+eoYEpFRKj5gEjTbNHgmA== X-Google-Smtp-Source: ABdhPJwbluA4O/54AMZ1I1l5jNnR1ZVwqNEM2VriU8rA5cXtdQHddLL5iz3dG/aJx1cdsWqjy/SD9g== X-Received: by 2002:a63:d909:: with SMTP id r9mr21255556pgg.285.1624843887047; Sun, 27 Jun 2021 18:31:27 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id l12sm11884145pff.105.2021.06.27.18.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Jun 2021 18:31:26 -0700 (PDT) Date: Mon, 28 Jun 2021 09:31:19 +0800 From: Leo Yan To: James Clark Cc: 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 Subject: Re: [PATCH v1 3/3] perf cs-etm: Remove callback cs_etm_find_snapshot() Message-ID: <20210628013119.GB158794@leoy-ThinkPad-X240s> References: <20210528161552.654907-1-leo.yan@linaro.org> <20210528161552.654907-4-leo.yan@linaro.org> <05442998-05f6-c41c-5a78-3f6723558825@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <05442998-05f6-c41c-5a78-3f6723558825@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210627_183128_458291_C5408A0C X-CRM114-Status: GOOD ( 19.07 ) 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 Tue, Jun 22, 2021 at 03:29:35PM +0100, James Clark wrote: > > > 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; Good finding! I will fix the comments in next version. 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