Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2016 21:30:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 214964] pmcstat -R with an empty sample file waits indefinitely
Message-ID:  <bug-214964-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214964

            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@FreeBSD.org
          Reporter: emaste@freebsd.org

I would like to get an automated 1s sample of profiling data and output sam=
pled
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=20=20=20=20=20=20=20=20=20=20=20=20
load: 4.81  cmd: pmcstat 54160 [kqread] 1.19r 0.00u 0.00s 0% 2960k

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214964-8>