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

Unified Diff: runtime/vm/compiler_stats.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: . Created 3 years, 4 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/vm/compiler_stats.cc
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
index 647f70bf3cd4b6f8a303314e52e0c0169ade106d..3493ca5ecdd5a9a8fbeadb0097ad1ae2a06f29c7 100644
--- a/runtime/vm/compiler_stats.cc
+++ b/runtime/vm/compiler_stats.cc
@@ -123,9 +123,13 @@ void CompilerStats::Update() {
// Traverse the heap and compute number of tokens in all
// TokenStream objects.
num_tokens_total = 0;
- TokenStreamVisitor visitor(this);
- isolate_->heap()->IterateObjects(&visitor);
- Dart::vm_isolate()->heap()->IterateObjects(&visitor);
+
+ {
+ HeapIterationScope iteration;
+ TokenStreamVisitor visitor(this);
+ iteration.IterateObjects(&visitor);
+ iteration.IterateVMIsolateObjects(&visitor);
+ }
}
void CompilerStats::EnableBenchmark() {

Powered by Google App Engine
This is Rietveld 408576698