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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8AACC433F5 for ; Wed, 17 Nov 2021 17:24:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C510E61B50 for ; Wed, 17 Nov 2021 17:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbhKQR1n (ORCPT ); Wed, 17 Nov 2021 12:27:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:39122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhKQR1n (ORCPT ); Wed, 17 Nov 2021 12:27:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77205617E3; Wed, 17 Nov 2021 17:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637169884; bh=du695jOxg2jvaQjQ9GNpG68580vqmHRYCGSwbBGthsY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UTAx+cLCOeIZmMpYijbk3JOZsa6UMMWFlgXInPKmRJciyFN43lz/zneSWUV7cBY4P L87oLIgcmc7AUfkZ/ke6JY1YLvN+t6tzhHvEZYZa+ML7FQDxE2Xeov5bA7lPFTNG7l 7CD4brxKJ7we9S2AntKL1CvmYEgTP0E3P0tqkUjC3UnkVo2/3PDNVZwLBofxmOBOh/ /Vm/aT6H208iCQkjpK2WSSMzeDsAUc8NIGs9yk8e8OtYD733VRFTwVDWqYxKH6F+8p 450V28GU6XSiahMPUCwbbjYrvVhmAxq+kQuuDfZy5TMYe+LqBNqBUEjOrYFsaVweBG VZX0p/Jnil5Mw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 49C014088E; Wed, 17 Nov 2021 14:24:41 -0300 (-03) Date: Wed, 17 Nov 2021 14:24:41 -0300 From: Arnaldo Carvalho de Melo To: German Gomez Cc: James Clark , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/1] perf arm-spe: Inject SPE samples in perf-inject Message-ID: References: <20211105104130.28186-1-german.gomez@arm.com> <20211105104130.28186-2-german.gomez@arm.com> <5163f41f-2337-6557-ca91-fb2c66738872@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Wed, Nov 17, 2021 at 04:27:27PM +0000, German Gomez escreveu: > Hi Arnaldo, > > On 17/11/2021 15:29, Arnaldo Carvalho de Melo wrote: > > [...] > > Next time please expand this explanations a bit more: why should we > > inject such samples? Is this enabling some new mode of operation, fixing > > something, what is an example of output before this patch and after it? > I will keep this in mind, thanks. In this case the support was missing > and I included the context in the cover letter but not the commit msg. Got it, I'm adding it to the cset comment: ------------------------------------------------------------------------------- perf-inject is currently not working for Arm SPE. When you try to run perf-inject and perf-report with a perf.data file that contains SPE traces, the tool reports a "Bad address" error: # ./perf record -e arm_spe_0/ts_enable=1,store_filter=1,branch_filter=1,load_filter=1/ -a -- sleep 1 # ./perf inject -i perf.data -o perf.inject.data --itrace # ./perf report -i perf.inject.data --stdio 0x42c00 [0x8]: failed to process type: 9 [Bad address] Error: failed to process sample As far as I know, the issue was first spotted in [1], but perf-inject was not yet injecting the samples. This patch does something similar to what cs_etm does for injecting the samples [2], but for SPE. [1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210412091006.468557-1-leo.yan@linaro.org/#24117339 [2] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/cs-etm.c?h=perf/core&id=133fe2e617e48ca0948983329f43877064ffda3e#n1196 ------------------------------------------------------------------------------- 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6015C433EF for ; Wed, 17 Nov 2021 17:26:13 +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 9D1A261B50 for ; Wed, 17 Nov 2021 17:26:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9D1A261B50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=AypjGmSuunFqgqDEBUL/f1lcuOuku54E4uTguRpsBO0=; b=2EgngV4Cqa6DLP 7WRozgnMlIlyKfRumEzsm+x6a3xu0RikR4lnbzaSs+mUD6pRpW/iIwp8AemmwdYAHSkhE0duqeLgY grC6W0DKvfNRmwwA6Y8QsRtkCmgGp0JcR/zjTwk6QQoqB4xy9GY3SyPCqYCPQ+Dpo3v9NTwpYy1HO JD5ARDsLrZcs4peEUVSWWIIZ8B8jWzY363KZhOOVyjRATc7fU7NMDeF9FoeQ0+ZKWId7atlQX/Two ssgmZVcwlab/Qf9qkpTpfqzLiN/UvhYAasnUkuJRLYCwScjqaj/PkUgxhAnnhsvLKyBshnbmuxPKB ah5mo8OykyjfHNLgef4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnOfx-005q1u-Lb; Wed, 17 Nov 2021 17:24:49 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnOfv-005q1N-KK for linux-arm-kernel@bombadil.infradead.org; Wed, 17 Nov 2021 17:24:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2mBIwGLaMSmRfk9lw5rv1SMkOlcf5S9cx5b37+4BqiA=; b=NCKn6PVcHaQcp1HrZrjkj4dPpy xKx9pELxsDFn6grLn6ay8VMPFtGYXjQU4v2X1myvGMf3Rn6JVWnh5fXaKUr+Kf8tipqwzdVJDaaoA iNzGUQXuVhC1w33uLHHb1hU/nBVswko/XR70+4ZKkQqTPrCnPmNuOn9fKc1WzFSGMBV53U/DRV+ao IYSwa5PK90DSUTHHUiKzm2PSv5KI8xXib6ESx7uc20IA0NIItgFCrzunQKaVJ5YKVEU0zXSl83c0p WNed6Hf3Ag64XXHmIhcsEvSM4peZufTZkcC2YBij82Lq4Y+DgJkWlATTclwyECemrQvTp9CmmGmmb XUGBfHNQ==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnOfu-00GXPF-0u for linux-arm-kernel@lists.infradead.org; Wed, 17 Nov 2021 17:24:46 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 49C014088E; Wed, 17 Nov 2021 14:24:41 -0300 (-03) Date: Wed, 17 Nov 2021 14:24:41 -0300 From: Arnaldo Carvalho de Melo To: German Gomez Cc: James Clark , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/1] perf arm-spe: Inject SPE samples in perf-inject Message-ID: References: <20211105104130.28186-1-german.gomez@arm.com> <20211105104130.28186-2-german.gomez@arm.com> <5163f41f-2337-6557-ca91-fb2c66738872@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com 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 Em Wed, Nov 17, 2021 at 04:27:27PM +0000, German Gomez escreveu: > Hi Arnaldo, > > On 17/11/2021 15:29, Arnaldo Carvalho de Melo wrote: > > [...] > > Next time please expand this explanations a bit more: why should we > > inject such samples? Is this enabling some new mode of operation, fixing > > something, what is an example of output before this patch and after it? > I will keep this in mind, thanks. In this case the support was missing > and I included the context in the cover letter but not the commit msg. Got it, I'm adding it to the cset comment: ------------------------------------------------------------------------------- perf-inject is currently not working for Arm SPE. When you try to run perf-inject and perf-report with a perf.data file that contains SPE traces, the tool reports a "Bad address" error: # ./perf record -e arm_spe_0/ts_enable=1,store_filter=1,branch_filter=1,load_filter=1/ -a -- sleep 1 # ./perf inject -i perf.data -o perf.inject.data --itrace # ./perf report -i perf.inject.data --stdio 0x42c00 [0x8]: failed to process type: 9 [Bad address] Error: failed to process sample As far as I know, the issue was first spotted in [1], but perf-inject was not yet injecting the samples. This patch does something similar to what cs_etm does for injecting the samples [2], but for SPE. [1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210412091006.468557-1-leo.yan@linaro.org/#24117339 [2] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/cs-etm.c?h=perf/core&id=133fe2e617e48ca0948983329f43877064ffda3e#n1196 ------------------------------------------------------------------------------- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel