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

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

Issue 2442693002: [heap] Account mark-compact prologue and epilogue in GC tracer. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | 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/heap/heap.h" 5 #include "src/heap/heap.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/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 1440
1441 MarkCompactEpilogue(); 1441 MarkCompactEpilogue();
1442 1442
1443 if (FLAG_allocation_site_pretenuring) { 1443 if (FLAG_allocation_site_pretenuring) {
1444 EvaluateOldSpaceLocalPretenuring(size_of_objects_before_gc); 1444 EvaluateOldSpaceLocalPretenuring(size_of_objects_before_gc);
1445 } 1445 }
1446 } 1446 }
1447 1447
1448 1448
1449 void Heap::MarkCompactEpilogue() { 1449 void Heap::MarkCompactEpilogue() {
1450 TRACE_GC(tracer(), GCTracer::Scope::MC_EPILOGUE);
1450 gc_state_ = NOT_IN_GC; 1451 gc_state_ = NOT_IN_GC;
1451 1452
1452 isolate_->counters()->objs_since_last_full()->Set(0); 1453 isolate_->counters()->objs_since_last_full()->Set(0);
1453 1454
1454 incremental_marking()->Epilogue(); 1455 incremental_marking()->Epilogue();
1455 1456
1456 PreprocessStackTraces(); 1457 PreprocessStackTraces();
1457 DCHECK(incremental_marking()->IsStopped()); 1458 DCHECK(incremental_marking()->IsStopped());
1458 1459
1459 // We finished a marking cycle. We can uncommit the marking deque until 1460 // We finished a marking cycle. We can uncommit the marking deque until
1460 // we start marking again. 1461 // we start marking again.
1461 mark_compact_collector()->marking_deque()->Uninitialize(); 1462 mark_compact_collector()->marking_deque()->Uninitialize();
1462 mark_compact_collector()->EnsureMarkingDequeIsCommitted( 1463 mark_compact_collector()->EnsureMarkingDequeIsCommitted(
1463 MarkCompactCollector::kMinMarkingDequeSize); 1464 MarkCompactCollector::kMinMarkingDequeSize);
1464 } 1465 }
1465 1466
1466 1467
1467 void Heap::MarkCompactPrologue() { 1468 void Heap::MarkCompactPrologue() {
1469 TRACE_GC(tracer(), GCTracer::Scope::MC_PROLOGUE);
1468 isolate_->context_slot_cache()->Clear(); 1470 isolate_->context_slot_cache()->Clear();
1469 isolate_->descriptor_lookup_cache()->Clear(); 1471 isolate_->descriptor_lookup_cache()->Clear();
1470 RegExpResultsCache::Clear(string_split_cache()); 1472 RegExpResultsCache::Clear(string_split_cache());
1471 RegExpResultsCache::Clear(regexp_multiple_cache()); 1473 RegExpResultsCache::Clear(regexp_multiple_cache());
1472 1474
1473 isolate_->compilation_cache()->MarkCompactPrologue(); 1475 isolate_->compilation_cache()->MarkCompactPrologue();
1474 1476
1475 CompletelyClearInstanceofCache(); 1477 CompletelyClearInstanceofCache();
1476 1478
1477 FlushNumberStringCache(); 1479 FlushNumberStringCache();
(...skipping 5020 matching lines...) Expand 10 before | Expand all | Expand 10 after
6498 } 6500 }
6499 6501
6500 6502
6501 // static 6503 // static
6502 int Heap::GetStaticVisitorIdForMap(Map* map) { 6504 int Heap::GetStaticVisitorIdForMap(Map* map) {
6503 return StaticVisitorBase::GetVisitorId(map); 6505 return StaticVisitorBase::GetVisitorId(map);
6504 } 6506 }
6505 6507
6506 } // namespace internal 6508 } // namespace internal
6507 } // namespace v8 6509 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698