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

Unified Diff: runtime/vm/compiler_stats.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: explicit-thread 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
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_stats.cc
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
index 647f70bf3cd4b6f8a303314e52e0c0169ade106d..1615b49cccb18e9ab206529f6c1516c2960db176 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(Thread::Current());
+ TokenStreamVisitor visitor(this);
+ iteration.IterateObjects(&visitor);
+ iteration.IterateVMIsolateObjects(&visitor);
+ }
}
void CompilerStats::EnableBenchmark() {
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698