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

Unified Diff: runtime/bin/utils.h

Issue 297183003: Reduce CPU usage when no isolates need to be profiled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months 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
Index: runtime/bin/utils.h
diff --git a/runtime/bin/utils.h b/runtime/bin/utils.h
index 60beef1ade10b4a56de41d5b1557d3c63601a87e..7b8818a625bb705c17938d231e195696b48e8007 100644
--- a/runtime/bin/utils.h
+++ b/runtime/bin/utils.h
@@ -89,6 +89,17 @@ class TimerUtils {
static void Sleep(int64_t millis);
};
+class ProfilerBlocker {
Anders Johnsen 2014/05/25 18:36:34 Stuff like this usually go into dartutils.h.
Cutch 2014/05/26 06:59:35 Done and renamed to ScopedBlockingCall
+ public:
+ ProfilerBlocker() {
+ Dart_BlockProfiler();
+ }
+
+ ~ProfilerBlocker() {
+ Dart_UnblockProfiler();
+ }
+};
+
} // namespace bin
} // namespace dart
« no previous file with comments | « runtime/bin/stdio.cc ('k') | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698