Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6103916rwd; Mon, 5 Jun 2023 13:06:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UJbGFXXFxQ56aEQy7kmR0MXKygTyIn2WTNTLPrfZ7m5/vsNvkvL4UvKvCKBZqhdqA5LRq X-Received: by 2002:a05:6214:4009:b0:5a2:abf1:7d33 with SMTP id kd9-20020a056214400900b005a2abf17d33mr9471609qvb.50.1685995595315; Mon, 05 Jun 2023 13:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685995595; cv=none; d=google.com; s=arc-20160816; b=MQADGaW1Q8/htfjIlXM6i+VlrGHtU2tJqy1dHKbrJ5KQTOP5x8NkIbKc7CxPCdLUBe 5dZAXp68Yg/InkgM33Y9k4diVRYxdGFyRkUCSlZ2G5wBo8tRhzuGXnxE72hfBi0Vq/rB zPdV16wA0aeH1gl2VRGnR57p/z+UXgNpoDtmh9zImpSTwOX0VNaOGgVVRUby2aNTUYvv ik+j5R6S8eSf6AZ3xfWGGBDWBdckMcHQRA8NuL+PgGkZsRXL52Bsal1eh6oQVB+1Oq2x z9dqPBO4f7lPexVGlL8rebVr9e/GYyV/brE6mcjGqY2nyH9qxP+SRcgDkUJo3Tf2lmOA NWZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UnjQglg7wfFU0lqlUGAhVosmqB2qxuBFHCpbLnTuxYs=; b=NOOgnTx6Uy0UQ8zjCfuWwy7Tokyqs+RKlKQUR/Fkk0glAHBacMLkXAV/up+FAApuDE UnqLnBINgNW2xIPsAnwIiRk6B41tfwK1Ggqnkbbu9y/R5t/krT3byeJnqu3NvYjqqiDi TU4MOtmHX9HAjnoGbdPHic5cuJSauEbyWL2DkBwAGSe1Rv/E7N1wdAeiu8/nvKNneh9W HLlvtAmfKuF4RY0v57G02huvoh6k3vSqFw1cneYpC+d3jzmPpA/ut5foxYH78Iw8IYSy 5QnsyhyoOy/B79WoE7eF3MXrWbY1qXsbk5NzH8/hWZLtSyjyc1yG3SDtxmtNXfum8VqF axeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDLgFf79; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a05622a03ca00b003f6b115179bsi5161367qtx.622.2023.06.05.13.06.19; Mon, 05 Jun 2023 13:06:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDLgFf79; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232305AbjFETo6 (ORCPT + 99 others); Mon, 5 Jun 2023 15:44:58 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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