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 B1927C761A6 for ; Thu, 30 Mar 2023 10:37:47 +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:References:Cc:To:From: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6z0PTb/NKuCWFq9xhXYqVqvWpKENFieHeOBYUf36YTY=; b=3tNOHlWCMnOUM6 /XnCSvjFcdF1donizzRusFLxv+7sX9VbHIn9h/I3rKF7tFaAbJzxClPpR9ugIOaWgURCZ1B1crb36 xyNYvLUHhEqID74gpuibyCmOt87ePJCu/0ivxBHABYxV0dATmwWVCzdYLO6MT97zmvMm4/z/r97me SijDMcYDy5OfWCWxvX4TDtwscwArtpwo+YLmFPjAiCuPJM4DwaQu01aKvJd1MJUIGgwJTpCE4Icsl R1B79RGe4WKlO1nHbhakyVb+7TiN1HP70Do9v+cTC36NJgyH+PBXsf8ZXyQPxA8Au264wLOWbgFZK NZwG42y6oaSQzp6yU/Kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phpeQ-003UkS-2m; Thu, 30 Mar 2023 10:37:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phpeN-003UjU-2h for linux-arm-kernel@lists.infradead.org; Thu, 30 Mar 2023 10:37:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B11DD2F4; Thu, 30 Mar 2023 03:37:41 -0700 (PDT) Received: from [10.57.21.28] (unknown [10.57.21.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 97BFD3F663; Thu, 30 Mar 2023 03:36:55 -0700 (PDT) Message-ID: <5dc10954-d1ad-e8f8-deff-fd237df48ecb@arm.com> Date: Thu, 30 Mar 2023 11:36:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [BUG] perf: No samples found when using kcore + coresight From: James Clark To: Leo Yan , Yang Shi Cc: linux-perf-users@vger.kernel.org, LAK , coresight@lists.linaro.org, Linux Kernel Mailing List , mathieu.poirier@linaro.org, adrian.hunter@intel.com, Jiri Olsa , acme@redhat.com, mike.leach@linaro.org, Will Deacon , suzuki.poulose@arm.com References: <8ca2b07e-674e-afb6-ff12-87504f51f252@arm.com> <20230309113851.GF19253@leoy-yangtze.lan> <20230313121420.GB2426758@leoy-yangtze.lan> <20230314003610.GD2426758@leoy-yangtze.lan> <6dcf83ad-bfbc-7e59-7c86-bed334bd09e8@arm.com> Content-Language: en-US In-Reply-To: <6dcf83ad-bfbc-7e59-7c86-bed334bd09e8@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230330_033659_923033_580C4949 X-CRM114-Status: GOOD ( 22.42 ) 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 29/03/2023 17:11, James Clark wrote: > > > On 14/03/2023 00:36, Leo Yan wrote: >> On Mon, Mar 13, 2023 at 11:15:44AM -0700, Yang Shi wrote: >> >> [...] >> >>>> Just a quick summary, here we have two issues: >>>> >>>> - With command: >>>> perf record -e cs_etm/@tmc_etf63/k --kcore --per-thread \ >>>> -- taskset --cpu-list 1 uname", >>>> >>>> perf doesn't enable "text poke" attribution. >>> >>> No, it enables "text poke" and perf fails to decode coresight trace >>> data too. It doesn't matter whether "--kcore" is after or before "-e >>> cs/etm/@tmc_etf63/k". >> >> Understand now. Thanks for correction, if so we can ignore this one. >> >> Leo > > To me it looks like it's only --per-thread and --kcore together that > cause the issue. I can't see if that was mentioned previously in this > thread. > > If it is --per-thread that's causing the issue then I think I have an > idea why it might be. There are some assumptions and different paths > taken in decoding in that mode that aren't correct. It causes some other > issues to do with ordering and timestamps as well and I wanted to fix it > previously. I wouldn't say that the text-poke change has caused a > regression, as decoding in this mode was always a bit buggy. > > Maybe this is another reason to fix it properly. Hi Yang, I found a temporary workaround to the issue. Whenever you use --per-thread mode, force timeless mode when decoding with --itrace=Z and it works the same as it did before. For example: perf report --itrace=Zi1000i The reason is that the new text poke event was added with timestamps enabled. The Coresight decoder slightly incorrectly assumed that no timestamps == per-thread mode so when it sees the new event it goes into the wrong decode mode. The assumption was never really correct so I will make a proper fix. But in the mean time the workaround should be fine. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel