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

Unified Diff: runtime/include/dart_api.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/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 7aded5027f53762f4a97d5039e2c0becbd363390..2a2b2f4bf4acba4f4b07fba3793f629434dc6840 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -2624,6 +2624,25 @@ DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
/*
+ * ========
+ * Profiler
+ * ========
+ */
+
+/**
+ * Disables profiler interrupts for the current isolate. Repeated calls to
+ * Dart_BlockProfiler are allowed but must be paired with the same number of
+ * calls to Dart_UnblockProfiler to unblock the profiler.
+ */
+DART_EXPORT void Dart_BlockProfiler();
Ivan Posva 2014/05/25 12:25:16 This is not just related to the profiler. What we
Anders Johnsen 2014/05/25 18:36:34 +1, I like the more generic IsolateBlocked/Isolate
Cutch 2014/05/26 06:59:35 Done.
+
+/**
+ * Re-enables profiler interrupts for the current isolate.
+ */
+DART_EXPORT void Dart_UnblockProfiler();
+
+
+/*
* =======
* Service
* =======

Powered by Google App Engine
This is Rietveld 408576698