linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Yang Shi <shy828301@gmail.com>
Cc: James Clark <james.clark@arm.com>,
	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, 9 Mar 2023 19:38:51 +0800	[thread overview]
Message-ID: <20230309113851.GF19253@leoy-yangtze.lan> (raw)
In-Reply-To: <CAHbLzkq_7aXcys1cpgGFsfMDDDKMsT3e7zdNW=0jAkw7kBtJ0Q@mail.gmail.com>

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

  reply	other threads:[~2023-03-09 11:39 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 [this message]
     [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

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=20230309113851.GF19253@leoy-yangtze.lan \
    --to=leo.yan@linaro.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.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=shy828301@gmail.com \
    --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).