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

Unified Diff: runtime/vm/profiler.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/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index a99b48ee84b38090e31fdc1e74dc7b6e2eef88a3..7acf9f1e02c37de74e3b68d53997c85ab0d54360 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -1427,9 +1427,12 @@ void CodeLookupTable::Build(Thread* thread) {
code_objects_.Clear();
// Add all found Code objects.
- CodeLookupTableBuilder cltb(this);
- vm_isolate->heap()->IterateOldObjects(&cltb);
- isolate->heap()->IterateOldObjects(&cltb);
+ {
+ HeapIterationScope iteration;
+ CodeLookupTableBuilder cltb(this);
+ iteration.IterateVMIsolateObjects(&cltb);
+ iteration.IterateOldObjects(&cltb);
+ }
// Sort by entry.
code_objects_.Sort(CodeDescriptor::Compare);

Powered by Google App Engine
This is Rietveld 408576698