| Index: runtime/vm/profiler.h
|
| diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
|
| index affe7100b46a74ad9cc6c82d4489947a83a06169..ccdd9b96abd9db0f35b99e005892e6c6bd4a52ae 100644
|
| --- a/runtime/vm/profiler.h
|
| +++ b/runtime/vm/profiler.h
|
| @@ -38,6 +38,15 @@ class Profiler : public AllStatic {
|
| }
|
|
|
| static void SampleAllocation(Thread* thread, intptr_t cid);
|
| +
|
| + // SampleThread is called from inside the signal handler and hence it is very
|
| + // critical that the implementation of SampleThread does not do any of the
|
| + // following:
|
| + // * Accessing TLS -- Because on Windows the callback will be running in a
|
| + // different thread.
|
| + // * Allocating memory -- Because this takes locks which may already be
|
| + // held, resulting in a dead lock.
|
| + // * Taking a lock -- See above.
|
| static void SampleThread(Thread* thread,
|
| const InterruptedThreadState& state);
|
|
|
|
|