Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1330218rwl; Wed, 29 Mar 2023 16:26:48 -0700 (PDT) X-Google-Smtp-Source: AKy350aM55jpVfCJUhr6PdQmwsI0r3MMfivxDTnimqG1+nHkf6abbUglhwbCMTs7WEwFMRwTimBH X-Received: by 2002:a17:906:71d7:b0:8a6:5720:9101 with SMTP id i23-20020a17090671d700b008a657209101mr22973297ejk.4.1680132408075; Wed, 29 Mar 2023 16:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680132408; cv=none; d=google.com; s=arc-20160816; b=FNsatAppW2COFf9yGYgBx4E40fyMaF2hlFnRI9Ir/bxfskC+8KlTxQw3hIOzYBUJOh Z4EezK0sV3DlK5nE7jDydirMsJwPTMfk01Eov7gdhu7UcRO4n9+BWJ3KavKwYAwVmw+w ZH/HWCLg6b4zvtZFm+awgiAiMN3JuQBcqEnMHH4NIFjcXoukP9TgO2zJWMIp1T78LcUJ 0wBJS/IUcfhWIQZo4NHShWT6+Ebk0w/Y4N7BaAH/P4G5SJhCW3mB7QAILbddmQefReLM Mr+F9A6/LbqjXnUXJe4P6RbwHkLSY8428hU7Tz7mpJ8BW5guowqYtliICUqK0NACZjHw SFrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nK1gMxVBx5URWr0R/hSicMEBUWBlQ/5D6tw4DTkFIrM=; b=VDR000DtrdE9mNy6EzwdAwpat8GcE7VvcYuJHl8lHZrlhqYr+M1tKSw81B1E5P9sBS Gy9B4kIna6QKXAKL7Akf7SAsa3PsnWeebd9ClPvy/ytNNCqhJQuNpWrY1q5Lu8wtgR6K N3Rc+KFXPYgGJtZN7y3JeFnpctcWa4SFjp3U/u1TpiPpof83u/r9Bvvg9MNwuhuncthp 3aZUofFRzAKxaBWWQYgb3NGOIBZZ8nh32GG3Ha1XK+FK0F+jpm0wO6AapD6M3UnkNdbl 2jaBuuXPyWNjF1DMbLJlGvqY/0KiL8rblPeNKBFLleJ4luM8o0MidBlOQ6nFIEPrsvsu NWsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="X90H/nlN"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a170906c19700b009301df0b15asi33437230ejz.62.2023.03.29.16.26.22; Wed, 29 Mar 2023 16:26:48 -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=@gmail.com header.s=20210112 header.b="X90H/nlN"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231224AbjC2XZn (ORCPT + 99 others); Wed, 29 Mar 2023 19:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbjC2XZk (ORCPT ); Wed, 29 Mar 2023 19:25:40 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BE9D1FFF; Wed, 29 Mar 2023 16:25:36 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id k15so10283266pgt.10; Wed, 29 Mar 2023 16:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680132336; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nK1gMxVBx5URWr0R/hSicMEBUWBlQ/5D6tw4DTkFIrM=; b=X90H/nlN6lbaQSZZqPd3D7vr7hn2hfhdfaa3Ol+II9lB7idhD3brdKKOlgRAy+82NF SFS3YBcC+oZB94X+BVj72wObVHoLIqR1uuVceqc+lKBUHo/eY0SAl27yupki21ub5wSa mwba2ifv0Y35ArZpwzzVSlbvEuUo+ddOrnTZx3+4xH+tXHAFa6F4ZEEjQfA48+44M0K5 K+Vg5w/j9eCEkYwqAFwe9vv/wdoHC9Gd2tFiDL4cU2Q35XhFq/nv9M5BPfs+OYaxsP5B XuS+R3dLsAhemT89bSXcehE8aCFFlIYA8I3B4wqK0vAEuvBcJG878fk1lIXusW1a9E3K boxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680132336; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nK1gMxVBx5URWr0R/hSicMEBUWBlQ/5D6tw4DTkFIrM=; b=RD/dx8d7IzsUf3JM/wITWw7aDoi1qFjrE2J4i5g66aECglDDjd0ZQjrsp/R9ZtJcAr VP9ir2DotI+BzZgAMt7OB5ZZkLpnMmxScH0Hj3gvCd3MUS8/8SJ9x/fJKFEOf5y0aBsJ mCgaaoFjnDwL6oHNnmbjlYuZLTlkUj6W4EVlLPWt3CTGO1AEg7m2jQDThB/t03xbMlpC sH7fx04ZKAfrTQST9jMK+Wy2vfvefkjNHkJ+QkalvWotZtCj73h9pIh3lo2HwOFNincO Ef3zYqNmoQEOZxfg5qUUe5W1lZ/MqiKU6Sxqw5N8BC1sfQQfN3yBs27FxTIpoQ5GlABO wFOA== X-Gm-Message-State: AAQBX9eOREqs/R1qbNySXwQulf1rxPnGSo/REqRIxaRRfuynCoRFJyrq iKXR2KNjrtn5T8z6GvjVGJc3WARm6eeb5/6uvYE= X-Received: by 2002:a05:6a00:a14:b0:625:66a9:c393 with SMTP id p20-20020a056a000a1400b0062566a9c393mr11221253pfh.0.1680132335805; Wed, 29 Mar 2023 16:25:35 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <64db6d95-8aca-48cc-80e1-e68211922071@arm.com> From: Yang Shi Date: Wed, 29 Mar 2023 16:25:24 -0700 Message-ID: Subject: Re: [BUG] perf: No samples found when using kcore + coresight To: James Clark 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Wed, Mar 29, 2023 at 9:08=E2=80=AFAM James Clark w= rote: > > > > 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. > > 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.