https://codereview.appspot.com/101380044/diff/20001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/101380044/diff/20001/src/pkg/runtime/proc.c#newcode2362 src/pkg/runtime/proc.c:2362: runtime·resetcpuprofiler(0); I think here is some potential for deadlocking. ...
12 years, 4 months ago
(2014-06-20 05:50:55 UTC)
#2
https://codereview.appspot.com/101380044/diff/20001/src/pkg/runtime/proc.c
File src/pkg/runtime/proc.c (right):
https://codereview.appspot.com/101380044/diff/20001/src/pkg/runtime/proc.c#ne...
src/pkg/runtime/proc.c:2362: runtime·resetcpuprofiler(0);
I think here is some potential for deadlocking.
Currently we assume that calls to runtime·setcpuprofilerate do not race with
each other.
But if a program calls runtime·enablebgcpu during startup and concurrently user
(or some global monitoring system) calls runtime·setcpuprofilerate, then CPU
profiling can be enabled again. And then signal delivered to runtime·enablebgcpu
will deadlock on prof lock.
Issue 101380044: runtime: support for always-on background profiling
Created 12 years, 4 months ago by rsc
Modified 12 years, 4 months ago
Reviewers: dvyukov
Base URL:
Comments: 12