[Bug 214964] pmcstat -R with an empty sample file waits indefinitely
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Nov 30 21:30:57 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214964
Bug ID: 214964
Summary: pmcstat -R with an empty sample file waits
indefinitely
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: emaste at freebsd.org
I would like to get an automated 1s sample of profiling data and output sampled
calltraces with something like:
timeout 1 pmcstat -P unhalted-cycles -t <pid> -O sample.out
pmcstat -R sample.out -G /dev/stdout
However, if sample.out is empty (because the process is sleeping, say), the
second pmcstat waits indefinitely for data to appear in the sample.out file.
% sleep 3600 &
[1] 52998
% timeout 1 pmcstat -P unhalted-cycles -t 52998 -O sample.out
% pmcstat -R sample.out -G /dev/stdout
load: 4.81 cmd: pmcstat 54160 [kqread] 1.19r 0.00u 0.00s 0% 2960k
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list