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

Side by Side Diff: src/heap/heap.cc

Issue 783453003: Explicitly track whether incremental marking was activated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 mark_compact_collector_.Prepare(); 1203 mark_compact_collector_.Prepare();
1204 1204
1205 ms_count_++; 1205 ms_count_++;
1206 1206
1207 MarkCompactPrologue(); 1207 MarkCompactPrologue();
1208 1208
1209 mark_compact_collector_.CollectGarbage(); 1209 mark_compact_collector_.CollectGarbage();
1210 1210
1211 LOG(isolate_, ResourceEvent("markcompact", "end")); 1211 LOG(isolate_, ResourceEvent("markcompact", "end"));
1212 1212
1213 gc_state_ = NOT_IN_GC; 1213 MarkCompactEpilogue();
1214
1215 isolate_->counters()->objs_since_last_full()->Set(0);
1216
1217 flush_monomorphic_ics_ = false;
1218 1214
1219 if (FLAG_allocation_site_pretenuring) { 1215 if (FLAG_allocation_site_pretenuring) {
1220 EvaluateOldSpaceLocalPretenuring(size_of_objects_before_gc); 1216 EvaluateOldSpaceLocalPretenuring(size_of_objects_before_gc);
1221 } 1217 }
1222 } 1218 }
1223 1219
1224 1220
1221 void Heap::MarkCompactEpilogue() {
1222 gc_state_ = NOT_IN_GC;
1223
1224 isolate_->counters()->objs_since_last_full()->Set(0);
1225
1226 flush_monomorphic_ics_ = false;
1227
1228 incremental_marking()->Epilogue();
1229 }
1230
1231
1225 void Heap::MarkCompactPrologue() { 1232 void Heap::MarkCompactPrologue() {
1226 // At any old GC clear the keyed lookup cache to enable collection of unused 1233 // At any old GC clear the keyed lookup cache to enable collection of unused
1227 // maps. 1234 // maps.
1228 isolate_->keyed_lookup_cache()->Clear(); 1235 isolate_->keyed_lookup_cache()->Clear();
1229 isolate_->context_slot_cache()->Clear(); 1236 isolate_->context_slot_cache()->Clear();
1230 isolate_->descriptor_lookup_cache()->Clear(); 1237 isolate_->descriptor_lookup_cache()->Clear();
1231 RegExpResultsCache::Clear(string_split_cache()); 1238 RegExpResultsCache::Clear(string_split_cache());
1232 RegExpResultsCache::Clear(regexp_multiple_cache()); 1239 RegExpResultsCache::Clear(regexp_multiple_cache());
1233 1240
1234 isolate_->compilation_cache()->MarkCompactPrologue(); 1241 isolate_->compilation_cache()->MarkCompactPrologue();
(...skipping 5152 matching lines...) Expand 10 before | Expand all | Expand 10 after
6387 static_cast<int>(object_sizes_last_time_[index])); 6394 static_cast<int>(object_sizes_last_time_[index]));
6388 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6395 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6389 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6396 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6390 6397
6391 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6398 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6392 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6399 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6393 ClearObjectStats(); 6400 ClearObjectStats();
6394 } 6401 }
6395 } 6402 }
6396 } // namespace v8::internal 6403 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698