All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG ARM64/perf] Perf record on hardware breakpoint causes application to hang
@ 2016-03-03 13:09 Hekuang
  2016-03-03 15:01 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Hekuang @ 2016-03-03 13:09 UTC (permalink / raw)
  To: peterz, mingo, acme, alexander.shishkin, adrian.hunter, jolsa
  Cc: linux-kernel, wangnan0, hekuang, pi3orama

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-03 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 13:09 [BUG ARM64/perf] Perf record on hardware breakpoint causes application to hang Hekuang
2016-03-03 15:01 ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.