Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1792808rwl; Thu, 30 Mar 2023 01:21:12 -0700 (PDT) X-Google-Smtp-Source: AKy350aW5/WxnP38DokYaF3e8qk8+DpkZD8Yo1RNTtT0IyVb2dMNu6z0HqmkMpCHr1dryGgrRQgk X-Received: by 2002:a17:906:51cd:b0:931:4285:ea16 with SMTP id v13-20020a17090651cd00b009314285ea16mr1294656ejk.7.1680164472250; Thu, 30 Mar 2023 01:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680164472; cv=none; d=google.com; s=arc-20160816; b=DkINkDYxLT9e7golEqABaEZWu8za25Q/wAuJPF17B9HUq57amJFCK2JS0+llnyUoOI qik/Tcz0Z+DBz9IUEpVJFa3bFb6l2H8n/caIvBtTXrx7u3OxmykMBGFbrtlPAtH4O1FS Dnp4AxBAYwWxRU2P0MgZMODG7SAFPQPDKRpIg8aph15+gRgHGnJ/u7Z/AuqRGFtui1mf aJL4jDIze6bGmetNEMlZTyu5UXxbQ84jx20TMTWEkQjwPDxLgsm2v/ZPMDHb+0RPfo2b na3oz7zX/sts1Qk5bgNizioDP+vSWSLwRM9xWR7IfQHPitagpnvXQzuWk2Gsb8LgLuu4 67Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=TIlJXqvD2GooYax+3ztRdPIHJKkXIr3Ourhtj/UG8TQ=; b=MwIMH6+3oYfFtPi/1SRDKEi51eqKQ+gVw1CZ773ChPZRDDuszBCT1OH/wywyysmgE7 wFVfDWabmpJDJAV0qAUqIv/pZDpJGKItKYPhH15+ovW4Q8dBpqFkLyGzxL0BVhY4T424 Jmo6M5+dCNwks+cbYWQUuEw0L1eMXlC+N3t2FYYEeRWyCO/U3GhYj3su6MCY+tj+F7R+ De6odHpe6wVCwnW4kXYxttOf5ZI6fNnwW4/PohFvB9BuzZSU8CUPxkpIJJoGUn0sA6dP 7oZQqVmmbfovQc/IxcLHw+gnV2rFWhBnh/++JAgNkP2bdV1PNIlfUPXpTKU45iOoxSd7 yW3Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa40-20020a1709076d2800b009334a4e66f0si33574915ejc.171.2023.03.30.01.20.46; Thu, 30 Mar 2023 01:21:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbjC3IS1 (ORCPT + 99 others); Thu, 30 Mar 2023 04:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjC3ISD (ORCPT ); Thu, 30 Mar 2023 04:18:03 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 81C8019B3; Thu, 30 Mar 2023 01:17:56 -0700 (PDT) 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 37F841FB; Thu, 30 Mar 2023 01:18:40 -0700 (PDT) Received: from [10.57.18.220] (unknown [10.57.18.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0318C3F73F; Thu, 30 Mar 2023 01:17:53 -0700 (PDT) Message-ID: Date: Thu, 30 Mar 2023 09:17:52 +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 Content-Language: en-US To: Yang Shi Cc: Leo Yan , 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, yang@os.amperecomputing.com References: <8ca2b07e-674e-afb6-ff12-87504f51f252@arm.com> <20230309113851.GF19253@leoy-yangtze.lan> <20230313121420.GB2426758@leoy-yangtze.lan> <20230314003610.GD2426758@leoy-yangtze.lan> <64db6d95-8aca-48cc-80e1-e68211922071@arm.com> From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On 30/03/2023 00:25, Yang Shi wrote: > On Wed, Mar 29, 2023 at 9:08 AM 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 "--pre-thread" is not passed in, perf record failed with "failed to > mmap with 12 (Cannot allocate memory)". Sorry for not mentioning this > in the first place. I was quite focused on --kcore and didn't realize > they may be related. That's unrelated. That's because you have specified a sink and without --per-thread it tries to open the event on all cores. If the sink can't be reached from all cores it will fail to open. You can make it work without --per-thread if you limit it to a valid core like this, although I don't know which ones exactly would be valid for your system: perf record -e cs_etm/@tmc_etf63/k --kcore -C 0 \ -- taskset --cpu-list 1 uname > >> >> 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.