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

Unified Diff: runtime/vm/profiler.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/pages.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index a99b48ee84b38090e31fdc1e74dc7b6e2eef88a3..a3fb9c6c90a7e83438908ef7d0907464d963b576 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(thread);
+ CodeLookupTableBuilder cltb(this);
+ iteration.IterateVMIsolateObjects(&cltb);
+ iteration.IterateOldObjects(&cltb);
+ }
// Sort by entry.
code_objects_.Sort(CodeDescriptor::Compare);
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698