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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17B48C77B73 for ; Mon, 5 Jun 2023 19:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235772AbjFETo5 (ORCPT ); Mon, 5 Jun 2023 15:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235759AbjFETot (ORCPT ); Mon, 5 Jun 2023 15:44:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01FAEF1; Mon, 5 Jun 2023 12:44:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 85A88629E3; Mon, 5 Jun 2023 19:44:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF163C433EF; Mon, 5 Jun 2023 19:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685994287; bh=P3Zf9vDH5D/IWGkhQFjE1PM6fek60DSu9f7MDIGdx2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IDLgFf79qxTKEyrb4uMU2oWQtMOa+noftKfMZYlXF6dzY0osIBZaVgbt0vfERO0Ff vzTklZwU7pKPs/UWngEkue52KiS0GzoRlDU0G+rUli38ukb0hY9w4FHhd6dwn0tZSB 4m4i71zvazfIFNGh5cRiok0hNPMxUM6AuCNRXgwZq4oo+84SwjhKpwNICnVD5fvDyr BfE8JXejfya107VylZBmuo59x/yeO0DY+rpDHKGviRrsE6RKrQZyeib5mpLI7wAKXd AhUxmsFRpI9vfkaVkrWqGwW4u71n6YUPtxqCxxVfscQ1sREvBo+MEzzRK7jtH3FSkH K62I3FhF01ZuQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 4B09340692; Mon, 5 Jun 2023 16:44:45 -0300 (-03) Date: Mon, 5 Jun 2023 16:44:45 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: coresight@lists.linaro.org, denik@chromium.org, Suzuki K Poulose , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] perf cs-etm: Track exception level Message-ID: References: <20230524131958.2139331-1-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230524131958.2139331-1-james.clark@arm.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Wed, May 24, 2023 at 02:19:54PM +0100, James Clark escreveu: > Some fixes to support an issue reported by Denis Nikitin where decoding > trace that contains different EL1 and EL2 kernels can crash or go into > an infinite loop because the wrong kernel maps are used for the decode. > > This still doesn't support distinguishing guest and host userspace, > we'd still have to fix the timestamps and do a bit more work to > correlate that. And I've removed PERF_RECORD_MISC_HYPERVISOR as a > possible outcome of cs_etm__cpu_mode(). As far as I know this could > never have been returned anyway because machine__is_host(machine) was > always true due to session.machines.host being hard coded. And I'm not > sure of the relevance of the difference between PERF_RECORD_MISC_KERNEL > and PERF_RECORD_MISC_HYPERVISOR in this scenario. > > The first commit is a tidy up, second fixes a bug that I found when > comparing the exception level and thread of branch records, the third > is the main fix, and the last commit is some extra error checking. > > Applies to acme/perf-tools (4e111f0cf0) So there seems to be agreement the first two patches can be applied? May I go ahead and do that now? - Arnaldo > James Clark (4): > perf cs-etm: Only track threads instead of PID and TIDs > perf cs-etm: Use previous thread for branch sample source IP > perf cs-etm: Track exception level > perf cs-etm: Add exception level consistency check > > .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 13 +- > .../perf/util/cs-etm-decoder/cs-etm-decoder.h | 4 +- > tools/perf/util/cs-etm.c | 220 +++++++++--------- > tools/perf/util/cs-etm.h | 5 +- > 4 files changed, 126 insertions(+), 116 deletions(-) > > -- > 2.34.1 > -- - Arnaldo 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AA132C77B73 for ; Mon, 5 Jun 2023 19:45:25 +0000 (UTC) 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=nsrCVBIGlLVJ+bHfw4YNF/kNCbsaSXCfg/VMRIUp6gk=; b=hlHnrzOgDvvN+s kr19UohDgv0WPcGjZDkb6/ER5anToZoXk5JsmKoloNbyupu6B8pxGny39O8Zt2nHKEDG3GuP0xoSJ Jm1NJMieGl+AoLBilJY4I/jfhMJllmBXfmmcIH3G+WH1qzRrGp2Sh3q0eL1o74+uO6xgMKkm0uJPk h12jN1jxgEY8SNRLm7pzQay22Z8vBnxJr21fbp6xq4JQf7j/VPGB7lnGz+POn7Giz4zMVKRkpUeyR ZWpLSS0wV4I6uZOpmLWyErwBWvTjdjKjj61TkDM64gNVr6aIebuumhg7Tf4sIWF4Klc53yN0oBTke zTJMCTP4pXCGrCXDQ5ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6G8P-00GaLm-0q; Mon, 05 Jun 2023 19:44:57 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6G8N-00GaLN-2E for linux-arm-kernel@bombadil.infradead.org; Mon, 05 Jun 2023 19:44:55 +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=UnjQglg7wfFU0lqlUGAhVosmqB2qxuBFHCpbLnTuxYs=; b=l+8I/5TB1M8mH5Q0C6UZZaRBoF PikV2IIVxxgN/ZfhrLWNqZ0Nr9TbVH+Pz1Nsp4GC03t3wnQWdqr2x6v3wheAJvUwoYaTqPKUAaxMC bCdR/jcs0vPDh2DPtrmc0NFLdNiRRZsT58jgEXFTYBBbYdqzxzvSI5zEsOiUI+ASfI32pqqckQtD0 kAvrg7skwKD7j8AvqAP0Ypk4stT3B0azxuLHhmJm1LfkWIPG3jFSUM+UQgziFtOOwi4Ww6+ZzMKNH fcX+j3lgZ/UqUvcJ+ABm+9FCTdFah9Q43pKWEhM19s185m17U7RAvk6CUP0T85V1a+7D8bBND8/FO DOZH9ydw==; Received: from [187.19.173.165] (helo=quaco.ghostprotocols.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q6G8I-003RpE-1M; Mon, 05 Jun 2023 19:44:51 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 4B09340692; Mon, 5 Jun 2023 16:44:45 -0300 (-03) Date: Mon, 5 Jun 2023 16:44:45 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: coresight@lists.linaro.org, denik@chromium.org, Suzuki K Poulose , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] perf cs-etm: Track exception level Message-ID: References: <20230524131958.2139331-1-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230524131958.2139331-1-james.clark@arm.com> 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, May 24, 2023 at 02:19:54PM +0100, James Clark escreveu: > Some fixes to support an issue reported by Denis Nikitin where decoding > trace that contains different EL1 and EL2 kernels can crash or go into > an infinite loop because the wrong kernel maps are used for the decode. > > This still doesn't support distinguishing guest and host userspace, > we'd still have to fix the timestamps and do a bit more work to > correlate that. And I've removed PERF_RECORD_MISC_HYPERVISOR as a > possible outcome of cs_etm__cpu_mode(). As far as I know this could > never have been returned anyway because machine__is_host(machine) was > always true due to session.machines.host being hard coded. And I'm not > sure of the relevance of the difference between PERF_RECORD_MISC_KERNEL > and PERF_RECORD_MISC_HYPERVISOR in this scenario. > > The first commit is a tidy up, second fixes a bug that I found when > comparing the exception level and thread of branch records, the third > is the main fix, and the last commit is some extra error checking. > > Applies to acme/perf-tools (4e111f0cf0) So there seems to be agreement the first two patches can be applied? May I go ahead and do that now? - Arnaldo > James Clark (4): > perf cs-etm: Only track threads instead of PID and TIDs > perf cs-etm: Use previous thread for branch sample source IP > perf cs-etm: Track exception level > perf cs-etm: Add exception level consistency check > > .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 13 +- > .../perf/util/cs-etm-decoder/cs-etm-decoder.h | 4 +- > tools/perf/util/cs-etm.c | 220 +++++++++--------- > tools/perf/util/cs-etm.h | 5 +- > 4 files changed, 126 insertions(+), 116 deletions(-) > > -- > 2.34.1 > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel