linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: James Clark <james.clark@arm.com>
Cc: Leo Yan <leo.yan@linaro.org>,
	linux-perf-users@vger.kernel.org,
	LAK <linux-arm-kernel@lists.infradead.org>,
	coresight@lists.linaro.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mathieu.poirier@linaro.org, adrian.hunter@intel.com,
	Jiri Olsa <jolsa@kernel.org>,
	acme@redhat.com, mike.leach@linaro.org,
	Will Deacon <will@kernel.org>,
	suzuki.poulose@arm.com
Subject: Re: [BUG] perf: No samples found when using kcore + coresight
Date: Thu, 30 Mar 2023 12:54:25 -0700	[thread overview]
Message-ID: <CAHbLzkqrEQoK_NDfHVO8tdBT1Lycpia5dcAVuiJBeDdx+jtzaQ@mail.gmail.com> (raw)
In-Reply-To: <5dc10954-d1ad-e8f8-deff-fd237df48ecb@arm.com>

On Thu, Mar 30, 2023 at 3:36 AM James Clark <james.clark@arm.com> wrote:
>
>
>
> 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.

Hi James,

Thanks for figuring out the workaround. I tested both (using "-C"
instead of "--per-thread" for record or using "--itrace=Z" for report)
works. I think the workaround is fine before we have a proper fix.

>

      reply	other threads:[~2023-03-30 19:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHbLzkrJQTrYBtPkf=jf3OpQ-yBcJe7XkvQstX9j2frz4WF-SQ@mail.gmail.com>
2023-03-07 10:32 ` [BUG] perf: No samples found when using kcore + coresight James Clark
2023-03-07 19:45   ` Yang Shi
2023-03-08 19:56     ` Yang Shi
2023-03-09 11:38       ` Leo Yan
     [not found]         ` <CAHbLzkpvLHnyL5J5kB_ke3CWVq2=MOEdEQsGex56+Esfgqh1=g@mail.gmail.com>
2023-03-13 12:14           ` Leo Yan
2023-03-13 18:15             ` Yang Shi
2023-03-14  0:36               ` Leo Yan
2023-03-28  0:53                 ` Yang Shi
2023-03-28  8:59                   ` James Clark
2023-03-28 16:16                     ` Yang Shi
2023-03-29 16:08                 ` James Clark
2023-03-29 23:25                   ` Yang Shi
2023-03-30  8:17                     ` James Clark
2023-03-29 16:11                 ` James Clark
2023-03-30 10:36                   ` James Clark
2023-03-30 19:54                     ` Yang Shi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHbLzkqrEQoK_NDfHVO8tdBT1Lycpia5dcAVuiJBeDdx+jtzaQ@mail.gmail.com \
    --to=shy828301@gmail.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).