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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 05EB5C433FE for ; Thu, 23 Sep 2021 14:41:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D55D7611C6 for ; Thu, 23 Sep 2021 14:41:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241711AbhIWOmc (ORCPT ); Thu, 23 Sep 2021 10:42:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241670AbhIWOm1 (ORCPT ); Thu, 23 Sep 2021 10:42:27 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECC6EC061756 for ; Thu, 23 Sep 2021 07:40:55 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id m21so6507503pgu.13 for ; Thu, 23 Sep 2021 07:40:55 -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=ZVVMJVPFsNXmZGKzivyU4QHm7thdKZguG8bvbRK2DOs=; b=P7UvALqxYFavU1TphCxKmENJ/2iPpRlOl/QmYzMMvXYOHsDD1dqp/P0ahXgLz0TkI3 mHmIkVdLM4katXdOUk41wy6qf+dj/5S4AHHDXa5foihlpS5P/fgozIKDAp4pt4tB7hq1 IWOZ3Fwz1SDwMY7BBf5VtWyGsI3ZHEN4rXhDzQJHKdngJ/ywyBG55XBU6u/BoEpxEEoM wE21gZ4l8ZjZwvp4U4N7oxJJtmkKPdzkMQazs8W7Z5qWdK1uHJWbczmN+d0W1vhnzf9/ +Axn868G1Plo9aWuipufakzEtdvy47SBkVUq3nxNDDzKeGDpt0/W1coZfclyDom4wlMb HBgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZVVMJVPFsNXmZGKzivyU4QHm7thdKZguG8bvbRK2DOs=; b=jd5XyaqAUbuy5ujaN7d39DSpB3Yb/3Gpi/soF++LKlH5+D1kuDuV/QDxh3/jSv+8Fr WHZkRoMtFKLPPvJZ1k1aXEY1OkkKoOPnhfWeT2SBWgJRkmKPc3b1LK4KW9sEZxLbBMNR iniNwuBtQpyEhb7tYxjmg60klqQcA1SuRUgWUieyMf9Y1PDG/YvQ8BTilaGY9D90Umfo gPcgtRJB5V2wbIOLXfLpefgjdIwa/ZB/82k5KWOYTilvilf1vKI6mCWVy0hLuKjl/XUy wTijygwskbFjqgklUiJDCoy3QrUYeD1Qw4RU6/KHlqgYqwxrBF8gaIIBLQJUwW7q12QK szMw== X-Gm-Message-State: AOAM532TeqUor/UxZ3NmsHkuR6w/LVmh+Er3TS5qM6blwKJWEBAYngHt OY5+bDPaZLWQsETFdXi3WqXRWA== X-Google-Smtp-Source: ABdhPJxJA0nGspazLI8+ZUM60xIDNYcbqDjq+DbuNpYFOISL1AgZ+BLdMdGRbFWZw3qMvFVrhaKSKg== X-Received: by 2002:a63:4301:: with SMTP id q1mr2098898pga.430.1632408055121; Thu, 23 Sep 2021 07:40:55 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([213.173.35.225]) by smtp.gmail.com with ESMTPSA id x1sm6212112pfc.53.2021.09.23.07.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 07:40:54 -0700 (PDT) Date: Thu, 23 Sep 2021 22:40:48 +0800 From: Leo Yan To: German Gomez Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mathieu Poirier , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Mike Leach , linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: Re: [PATCH 4/5] perf arm-spe: Implement find_snapshot callback Message-ID: <20210923144048.GB603008@leoy-ThinkPad-X240s> References: <20210916154635.1525-1-german.gomez@arm.com> <20210916154635.1525-4-german.gomez@arm.com> <20210923135016.GG400258@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210923135016.GG400258@leoy-ThinkPad-X240s> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 09:50:16PM +0800, Leo Yan wrote: [...] > > @@ -336,6 +480,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err, > > sper->itr.pmu = arm_spe_pmu; > > sper->itr.snapshot_start = arm_spe_snapshot_start; > > sper->itr.snapshot_finish = arm_spe_snapshot_finish; > > + sper->itr.find_snapshot = arm_spe_find_snapshot; > > If I understand correctly, this patch copies the code from cs-etm for > snapshot handling. About 2 months ago, we removed the Arm cs-etm's > specific snapshot callback function and directly use perf's function > __auxtrace_mmap__read() to handle 'head' and 'tail' pointers. Please > see the commit for details: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f01c200d4405c4562e45e8bb4de44a5ce37b217 > > Before I review more details for snapshot enabling in patches 03 and > 04, could you confirm if Arm SPE can use the same way with cs-etm for > snapshot handling? From my understanding, this is a better way to > handle AUX buffer's 'head' and 'tail'. In other words, if we can only apply patch 03 and can pass the testing in patch 05, then it would be a very neat implementation. I will try to verify these patches and will get back result. Thanks, 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=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 3A80FC433F5 for ; Thu, 23 Sep 2021 14:43:22 +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 0CDCD610C9 for ; Thu, 23 Sep 2021 14:43:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0CDCD610C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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=VcE578FdEx6aUg8P3U9F7tycEU7ulgvh04j1TM3HN24=; b=CcBR8DBOz1pZmM 08+H/URgF/PR2HSg0LZfmeA+9W1WMjjFqS5INeu3mDTgZEeMdSwyuayQi36n8HS0rCzyOlmet0OLG Vo/4ZY1kiDIcHBdVHS2Ajr3PjbbCjGfKyAahoBTWyqTdfWdeDbNVmfJpCgfi2qsAVMWUro05E0YNy biTMN60PZlO9YAqv6Gl9e1Ee+QC/3zSFfEh+5oAlsK84kWj8J1XaLeTaRWytXpZIGwGwsCGJRRBb4 1DK2nDosBCQAUnmzjNqY2bSpE+9prKVYNjtZNH9buHlbrHDv7v7Nstyz/L+feoQV1RURzWUfu7zfs 9cOBltoW39MuOL6Gzjsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTPup-00BrsL-Ld; Thu, 23 Sep 2021 14:41:35 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTPuD-00BrWj-69 for linux-arm-kernel@lists.infradead.org; Thu, 23 Sep 2021 14:40:58 +0000 Received: by mail-pg1-x52f.google.com with SMTP id h3so6552957pgb.7 for ; Thu, 23 Sep 2021 07:40:56 -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=ZVVMJVPFsNXmZGKzivyU4QHm7thdKZguG8bvbRK2DOs=; b=P7UvALqxYFavU1TphCxKmENJ/2iPpRlOl/QmYzMMvXYOHsDD1dqp/P0ahXgLz0TkI3 mHmIkVdLM4katXdOUk41wy6qf+dj/5S4AHHDXa5foihlpS5P/fgozIKDAp4pt4tB7hq1 IWOZ3Fwz1SDwMY7BBf5VtWyGsI3ZHEN4rXhDzQJHKdngJ/ywyBG55XBU6u/BoEpxEEoM wE21gZ4l8ZjZwvp4U4N7oxJJtmkKPdzkMQazs8W7Z5qWdK1uHJWbczmN+d0W1vhnzf9/ +Axn868G1Plo9aWuipufakzEtdvy47SBkVUq3nxNDDzKeGDpt0/W1coZfclyDom4wlMb HBgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZVVMJVPFsNXmZGKzivyU4QHm7thdKZguG8bvbRK2DOs=; b=Yerya9ZU6Cg8csecjLfRw1irSsWfZpTARALWvb3c95RAkP8IV7SVzVJp2J8ZMgBd8H iYM9gIzGwpKrbNxBpoUIiEw0/knI9FeOSHq7xHVnPQAWFdXcxc6pT5JXmmde+ItFEhQC W/iyqsWnEoSCt6Ww2+bhnqe3KqW22xCanJQbccS/4O6aVQkih5fgZPJ7LLQOHDEzbLbf QRS5GNLL6MRngUbtLiZRosa4NZMl1fWVpNlUrS6ySUezG+jIb7Xb5+kEoOSv0hxpy0mb 71iwyyP9xl2MXrMwI6BuyYSPooHH7sBVYA0J/ws8EV3epq2l3iX0We0CS+gHj57hj3Jq Nv/w== X-Gm-Message-State: AOAM531VbYPgwM5jWTH0ogruoJYVl4JBYfonwzTdcbSJGT56uuQsAWvE IiPnEhUDQCQnR/Xg+EVN5QtiOg== X-Google-Smtp-Source: ABdhPJxJA0nGspazLI8+ZUM60xIDNYcbqDjq+DbuNpYFOISL1AgZ+BLdMdGRbFWZw3qMvFVrhaKSKg== X-Received: by 2002:a63:4301:: with SMTP id q1mr2098898pga.430.1632408055121; Thu, 23 Sep 2021 07:40:55 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([213.173.35.225]) by smtp.gmail.com with ESMTPSA id x1sm6212112pfc.53.2021.09.23.07.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 07:40:54 -0700 (PDT) Date: Thu, 23 Sep 2021 22:40:48 +0800 From: Leo Yan To: German Gomez Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mathieu Poirier , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Mike Leach , linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: Re: [PATCH 4/5] perf arm-spe: Implement find_snapshot callback Message-ID: <20210923144048.GB603008@leoy-ThinkPad-X240s> References: <20210916154635.1525-1-german.gomez@arm.com> <20210916154635.1525-4-german.gomez@arm.com> <20210923135016.GG400258@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210923135016.GG400258@leoy-ThinkPad-X240s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_074057_268853_94746342 X-CRM114-Status: GOOD ( 13.46 ) 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 Thu, Sep 23, 2021 at 09:50:16PM +0800, Leo Yan wrote: [...] > > @@ -336,6 +480,7 @@ struct auxtrace_record *arm_spe_recording_init(int *err, > > sper->itr.pmu = arm_spe_pmu; > > sper->itr.snapshot_start = arm_spe_snapshot_start; > > sper->itr.snapshot_finish = arm_spe_snapshot_finish; > > + sper->itr.find_snapshot = arm_spe_find_snapshot; > > If I understand correctly, this patch copies the code from cs-etm for > snapshot handling. About 2 months ago, we removed the Arm cs-etm's > specific snapshot callback function and directly use perf's function > __auxtrace_mmap__read() to handle 'head' and 'tail' pointers. Please > see the commit for details: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f01c200d4405c4562e45e8bb4de44a5ce37b217 > > Before I review more details for snapshot enabling in patches 03 and > 04, could you confirm if Arm SPE can use the same way with cs-etm for > snapshot handling? From my understanding, this is a better way to > handle AUX buffer's 'head' and 'tail'. In other words, if we can only apply patch 03 and can pass the testing in patch 05, then it would be a very neat implementation. I will try to verify these patches and will get back result. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel