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

Side by Side Diff: src/heap/mark-compact.h

Issue 2287343002: [heap] Integrate embedder heap tracer into incremental marking (Closed)
Patch Set: Addressed comments Created 4 years, 3 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/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('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 #ifndef V8_HEAP_MARK_COMPACT_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_H_
6 #define V8_HEAP_MARK_COMPACT_H_ 6 #define V8_HEAP_MARK_COMPACT_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 // when mark bits are still intact. 483 // when mark bits are still intact.
484 bool IsSlotInBlackObject(MemoryChunk* p, Address slot); 484 bool IsSlotInBlackObject(MemoryChunk* p, Address slot);
485 HeapObject* FindBlackObjectBySlotSlow(Address slot); 485 HeapObject* FindBlackObjectBySlotSlow(Address slot);
486 486
487 // Removes all the slots in the slot buffers that are within the given 487 // Removes all the slots in the slot buffers that are within the given
488 // address range. 488 // address range.
489 void RemoveObjectSlots(Address start_slot, Address end_slot); 489 void RemoveObjectSlots(Address start_slot, Address end_slot);
490 490
491 Sweeper& sweeper() { return sweeper_; } 491 Sweeper& sweeper() { return sweeper_; }
492 492
493 // ===========================================================================
494 // Embedder heap tracer support. =============================================
495 // ===========================================================================
496
497 void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer);
498 EmbedderHeapTracer* embedder_heap_tracer() { return embedder_heap_tracer_; }
499 bool UsingEmbedderHeapTracer() { return embedder_heap_tracer(); }
500
501 // In order to avoid running out of memory we force tracing wrappers if there
502 // are too many of them.
503 bool RequiresImmediateWrapperProcessing();
504
493 void RegisterWrappersWithEmbedderHeapTracer(); 505 void RegisterWrappersWithEmbedderHeapTracer();
494 506
495 void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); 507 void TracePossibleWrapper(JSObject* js_object);
496 508
497 EmbedderHeapTracer* embedder_heap_tracer() { return embedder_heap_tracer_; } 509 size_t wrappers_to_trace() { return wrappers_to_trace_.size(); }
498
499 bool UsingEmbedderHeapTracer() { return embedder_heap_tracer(); }
500
501 void TracePossibleWrapper(JSObject* js_object);
502 510
503 private: 511 private:
504 class EvacuateNewSpacePageVisitor; 512 class EvacuateNewSpacePageVisitor;
505 class EvacuateNewSpaceVisitor; 513 class EvacuateNewSpaceVisitor;
506 class EvacuateOldSpaceVisitor; 514 class EvacuateOldSpaceVisitor;
507 class EvacuateRecordOnlyVisitor; 515 class EvacuateRecordOnlyVisitor;
508 class EvacuateVisitorBase; 516 class EvacuateVisitorBase;
509 class HeapObjectVisitor; 517 class HeapObjectVisitor;
510 class ObjectStatsVisitor; 518 class ObjectStatsVisitor;
511 519
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 private: 775 private:
768 MarkCompactCollector* collector_; 776 MarkCompactCollector* collector_;
769 }; 777 };
770 778
771 779
772 const char* AllocationSpaceName(AllocationSpace space); 780 const char* AllocationSpaceName(AllocationSpace space);
773 } // namespace internal 781 } // namespace internal
774 } // namespace v8 782 } // namespace v8
775 783
776 #endif // V8_HEAP_MARK_COMPACT_H_ 784 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698