linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] perf stat: hangs with -p and process completes
@ 2018-10-12 21:26 Stephane Eranian
  2018-10-16 11:03 ` Jiri Olsa
  0 siblings, 1 reply; 4+ messages in thread
From: Stephane Eranian @ 2018-10-12 21:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, LKML

Hi,

I am running into a perf stat issue with the -p option which allows you
to attach to a running process. If that process happens to terminate
while under monitoring
perf hangs in there and never terminates. The proper behavior would be to stop.
I can see the issue in that the attached process is not a child, so
wait() would not work.

To reproduce:
  $ sleep 10 &
  $ perf stat -p $!

doing the same with perf record works, so there is a solution to this problem.

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

end of thread, other threads:[~2018-10-16 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 21:26 [BUG] perf stat: hangs with -p and process completes Stephane Eranian
2018-10-16 11:03 ` Jiri Olsa
2018-10-16 16:25   ` Jiri Olsa
2018-10-16 18:10     ` Stephane Eranian

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).