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

Unified Diff: src/heap/heap.cc

Issue 1225733002: Reland concurrent sweeping of code space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/frames.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 3340a0fd384a3cdf8bb9e11a90b00f9f00b3b249..04dd85588b65df88193ab0cd993640db72423844 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -509,6 +509,12 @@ const char* Heap::GetSpaceName(int idx) {
void Heap::ClearAllICsByKind(Code::Kind kind) {
+ // If concurrent sweeping is in progress, we have to wait for the sweeper
+ // threads before we iterate the heap.
+ if (mark_compact_collector()->sweeping_in_progress()) {
+ mark_compact_collector()->EnsureSweepingCompleted();
+ }
+ // TODO(mvstanton): Do not iterate the heap.
HeapObjectIterator it(code_space());
for (Object* object = it.Next(); object != NULL; object = it.Next()) {
@@ -5157,6 +5163,11 @@ void Heap::Verify() {
code_space_->Verify(&no_dirty_regions_visitor);
lo_space_->Verify();
+
+ mark_compact_collector_.VerifyWeakEmbeddedObjectsInCode();
+ if (FLAG_omit_map_checks_for_leaf_maps) {
+ mark_compact_collector_.VerifyOmittedMapChecks();
+ }
}
#endif
« no previous file with comments | « src/frames.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698