From: Mark Rutland <mark.rutland@arm.com>
To: wangxiaolei <xiaolei.wang@windriver.com>
Cc: will@kernel.org, peterz@infradead.org, mingo@redhat.com,
acme@kernel.org, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, namhyung@kernel.org, irogers@google.com,
linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: perf record -e branch-misses ls > /dev/null
Date: Thu, 23 Mar 2023 17:51:36 +0000 [thread overview]
Message-ID: <ZByRqNRX10knmnuo@FVFF77S0Q05N.cambridge.arm.com> (raw)
In-Reply-To: <08994540-d132-6e49-f6a0-82d8dfd1f3f0@windriver.com>
On Wed, Mar 08, 2023 at 03:56:41PM +0800, wangxiaolei wrote:
> hi
>
> When I use the perf tool on nxp-imx6sx, the CPU is armv7 cortex-A9 to test,
> I execute the perf record -e branch-misses ls > /dev/null command, but the
> perf report result is indeed:
> perf report
> Error:
> The perf.data data has no samples!
> # To display the perf.data header info, please use --header/--header-only
> options.
Which kernel version are you seeing this with?
Is anything printed regarding the PMU in dmesg?
> root@nxp-imx6:~# perf list hardware
>
> List of pre-defined events (to be used in -e):
>
> branch-instructions OR branches [Hardware event]
> branch-misses [Hardware event]
> bus-cycles [Hardware event]
> cache-misses [Hardware event]
> cache-references [Hardware event]
> cpu-cycles OR cycles [Hardware event]
> instructions [Hardware event]
That's just listing the generic HW events; does the PMU actually show up under
sysfs?
What do you see if you run:
$ ls /sys/bus/event_source/devices/
> And not only this one hardware event, only cycles are working normally in
> the following supported hardware time, other hardware events are not
> interrupted and reported
Can you explain what you mean by "not interrupted and reported"?
Do you mean the PMU interrupt isn't firing?
> , and the value in the read PMXEVCNTR register is
> always -1, and the PMCR register E, bit[0 ] it will be written to 0 before
> reading the PMXEVCNTR register.
How are you reading PMXEVCNTR?
Have you instrumented the PMU driver, or are you using other code?
> I don’t know if the value in the PMXEVCNTR register is always -1 for this
> reason. Does anyone have any good suggestions for debugging this problem?
There are a number of potential reasons for this; if you can answer some of my
questions above it'd help to narrow this down.
Thanks,
Mark.
prev parent reply other threads:[~2023-03-23 17:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 7:56 wangxiaolei
2023-03-23 17:51 ` Mark Rutland [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=ZByRqNRX10knmnuo@FVFF77S0Q05N.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.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=linux@armlinux.org.uk \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
--cc=xiaolei.wang@windriver.com \
/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
all inboxes | Powered by JetHome®