From: Hekuang <hekuang@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<alexander.shishkin@linux.intel.com>, <adrian.hunter@intel.com>,
<jolsa@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <wangnan0@huawei.com>,
<hekuang@huawei.com>, <pi3orama@163.com>
Subject: [BUG ARM64/perf] Perf record on hardware breakpoint causes application to hang
Date: Thu, 3 Mar 2016 21:09:05 +0800 [thread overview]
Message-ID: <56D83771.2090101@huawei.com> (raw)
This problem can be reproduced as follows:
We know cat /proc/version will read the memory of symbol
linux_proc_banner, then we make a hardware memory access
breakpoint on that address.
on terminal 1:
$ perf record -e mem:0x$(cat /proc/kallsyms|grep
linux_proc_banner|cut -d " " -f 1):rw --no-buffer -a
on terminal 2:
$ cat /proc/version
Then our 'cat' process on terminal 2 will be hanged, until we press
'^C' to stop perf from recording events.
The sample numbers recorded by perf is extraordinary too:
[ perf record: Captured and wrote 0.879 MB perf.data (22691 samples) ]
The right result can be produced by removing the 'no-buffer'
argument in perf command line, and the result should be like
this:
$ perf record -e mem:0x$(cat /proc/kallsyms|grep linux_proc_
banner|cut -d " " -f 1):rw -a
^C
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.013 MB perf.data (10 samples) ]
Report this bug to you and hope for answers.
Thanks.
next reply other threads:[~2016-03-03 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 13:09 Hekuang [this message]
2016-03-03 15:01 ` Will Deacon
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=56D83771.2090101@huawei.com \
--to=hekuang@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pi3orama@163.com \
--cc=wangnan0@huawei.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®