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

Unified Diff: runtime/vm/profiler.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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/profiler.cc » ('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 0602b27c31311fab179081822ce27be7892946cc..f9742b303b32bdbc30c977a687e7f6bba7ea8034 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -75,9 +75,18 @@ class IsolateProfilerData {
sample_buffer_ = sample_buffer;
}
+ bool blocked() const {
+ return block_count_ > 0;
+ }
+
+ void Block();
+
+ void Unblock();
+
private:
SampleBuffer* sample_buffer_;
bool own_sample_buffer_;
+ intptr_t block_count_;
DISALLOW_COPY_AND_ASSIGN(IsolateProfilerData);
};
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698