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 C4EE2C61DA4 for ; Thu, 9 Mar 2023 11:58:45 +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=Gpp3Grk654srrwGLB3Vj7n87/eYpBR+xzdoupJeIqm4=; b=MVRH3wrRA5m57z 0TDtKGJSo0P7LUXgs9+VhT/jV4uQrLKa6K2g5V21BkQq6S3tjdTrjW9n6E6Ud3mXaBcp8feK1Qi8f jt6E9PoWrZd98Kgalf4tWxiLy+9A4b9NwVRVKL9FCEe80wMeTCovPq1HQKbysLTXQpvOv/9iIdNuR d119dhT5/nv1aSx454+w9tCkBoYc6mS9iYn1DZHprIfdizfkKRszB3feC3jLmVw/SvcEEApI4I7v6 4tVLk+g3KEY/vmgFH0eePiUZAhtlkhn7CLtuPYCHuFhFGX87epQE1+G6ZTa18YeTdcC6bV4PvK3hZ 0yfvMMbknls2R+0WPPTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paEti-009ibR-J1; Thu, 09 Mar 2023 11:57:26 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paEbw-009aaw-1k for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 11:39:05 +0000 Received: by mail-pl1-x62c.google.com with SMTP id h8so1622129plf.10 for ; Thu, 09 Mar 2023 03:39:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678361940; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kYsJiKyy+lTF4z1H2mSxKLr6ADWPzBDDBXemJTJ36Ks=; b=qrYsSdWwsRhgnb8uDOtCBtoRToUCHBFxclejPIK5uKZNh5GhkUHLsx+shQWLFKnQRb lxqZQ7iqj1Rp1ij8OB5I0DCtrrEKznEBMWwEe6u77MBH82sEen6sPY+AK54YhhVv6Zov vVErC58toiN46BPkGNds4B1oKmfDQo1P/GuPXKmcewJs6zIMxMm2vzB9g83cmrN9i5As 3jOPPHhtpAPnN92dBR7TQxAt+FDacKrAzodTNH8J3HQmZbftdnunON5V2OXxGUfugwm2 fiLZlmKMfYQPp/+CjWQfWUNFi6694qDSqu+QN+UfHSYk0Ofg9B5XTmduB99kk4/x/5ov zsgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678361940; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kYsJiKyy+lTF4z1H2mSxKLr6ADWPzBDDBXemJTJ36Ks=; b=t/FKcsjEhxw4725sKrGEreKdHgb8c5GV+0/aiaTlPHzUsviBL1xcEphNf6CEzUxGiY 7Sqi3frxgBQzUN449a2Uxh8XBl+2mOCZb9Cfgc35JBhgd6CPQ+A0QXWINWa6r14MjNlt vGnGJBhrFmJIm3D8oAQhnOPydd8X/NGSxL+gg4UjXXBX9zGWxBb8OGMjeP8fZ38SaquB 57oliRfPV99+GB6MmUaopJ9DKBKVzYEHtJVtXaPgkNvqNwSemo8jg1jRXzUZpPAtx8Zw JAKIwgBf2XiLkXN/rXlql68Izf5AZMWkIiysyiGjXTBIqsjXt/p4UhveouZYUvQbXHTJ rWhg== X-Gm-Message-State: AO0yUKWLRBHZ/fHE3lXisdcWt0MnxIQK4YWECAanC8VJ6RSfJxXDwrF1 CDdIWFae83rCJNEdtetv02W5dg== X-Google-Smtp-Source: AK7set9BcKzdqEvVwBm1rR1GGtYhrdXP+ByCdfjj8e7gOOwRGmWRyMbWRum5esDB5AWQTC0hTpRL3g== X-Received: by 2002:a17:90b:4a4c:b0:237:9cc7:28a4 with SMTP id lb12-20020a17090b4a4c00b002379cc728a4mr22842172pjb.14.1678361939798; Thu, 09 Mar 2023 03:38:59 -0800 (PST) Received: from leoy-yangtze.lan ([107.151.177.133]) by smtp.gmail.com with ESMTPSA id mm14-20020a17090b358e00b0023493354f37sm1427084pjb.26.2023.03.09.03.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 03:38:59 -0800 (PST) Date: Thu, 9 Mar 2023 19:38:51 +0800 From: Leo Yan To: Yang Shi Cc: James Clark , 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 Subject: Re: [BUG] perf: No samples found when using kcore + coresight Message-ID: <20230309113851.GF19253@leoy-yangtze.lan> References: <8ca2b07e-674e-afb6-ff12-87504f51f252@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_033904_168083_89B9ADC1 X-CRM114-Status: GOOD ( 22.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 Hi Yang, On Wed, Mar 08, 2023 at 11:56:38AM -0800, Yang Shi wrote: [...] > > Dumping raw events could show the events from the bad data file. But > > it has zero samples after event collapse. > > > > The only difference is --kcore inserted a new text_poke dummy event. > > It seems coresight also inserted a dummy event with my command but > > your command didn't. So it seems like the two dummy events confused > > event collapse. > > > > The text_poke dummy event is added by commit > > f42c0ce573df79d1b8bd169008c994dcdd43585a ("perf record: Always get > > text_poke events with --kcore option"). If I reverted this commit, > > then it works. But I'm not sure whether this is the right fix or real > > root cause or not. Or coresight shouldn't insert its own dummy event? > > It seems like coresight needs to insert the dummy event if > full_auxtrace is on IIUC. So it sounds like event collapse can't > handle such a case? I am struggling to understand the meaning "event collapse" :) I reviewed your shared dump, the bad and good perf data both contain the dummy event with 'text_poke = 1'. Could you confirm the shared dump in your previous email is correct or not? > I also tried v5.19 (before "perf record: Always > get text_poke events with --kcore option", which was merged in v6.0), > it works. So it seems like a regression. Yeah, we need to fix it. I am not sure the Linux kernel for Arm64 supports text poke or not (kernel needs some specific handling when alter instructions), the kernel change is the prerequisites. On the other hand, in the current code cs-etm misses to handle the event PERF_RECORD_TEXT_POKE in the function cs_etm__process_event(). This might be the cause for the failure. Do you mind to share the bad perf.data file with James and me? Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel