Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: runtime/vm/profiler.h

Issue 1428373003: Minor cleanup (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review-comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698