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

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

Issue 2040683002: Remove dependencies of V8 on cpu-profiler is_profiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use macro for declaring is_profiling Created 4 years, 6 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/external-reference-table.cc ('k') | src/heap/scavenger.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 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 1630
1631 class MarkCompactCollector::EvacuateVisitorBase 1631 class MarkCompactCollector::EvacuateVisitorBase
1632 : public MarkCompactCollector::HeapObjectVisitor { 1632 : public MarkCompactCollector::HeapObjectVisitor {
1633 protected: 1633 protected:
1634 enum MigrationMode { kFast, kProfiled }; 1634 enum MigrationMode { kFast, kProfiled };
1635 1635
1636 EvacuateVisitorBase(Heap* heap, CompactionSpaceCollection* compaction_spaces) 1636 EvacuateVisitorBase(Heap* heap, CompactionSpaceCollection* compaction_spaces)
1637 : heap_(heap), 1637 : heap_(heap),
1638 compaction_spaces_(compaction_spaces), 1638 compaction_spaces_(compaction_spaces),
1639 profiling_( 1639 profiling_(
1640 heap->isolate()->cpu_profiler()->is_profiling() || 1640 heap->isolate()->is_profiling() ||
1641 heap->isolate()->logger()->is_logging_code_events() || 1641 heap->isolate()->logger()->is_logging_code_events() ||
1642 heap->isolate()->heap_profiler()->is_tracking_object_moves()) {} 1642 heap->isolate()->heap_profiler()->is_tracking_object_moves()) {}
1643 1643
1644 inline bool TryEvacuateObject(PagedSpace* target_space, HeapObject* object, 1644 inline bool TryEvacuateObject(PagedSpace* target_space, HeapObject* object,
1645 HeapObject** target_object) { 1645 HeapObject** target_object) {
1646 #ifdef VERIFY_HEAP 1646 #ifdef VERIFY_HEAP
1647 if (AbortCompactionForTesting(object)) return false; 1647 if (AbortCompactionForTesting(object)) return false;
1648 #endif // VERIFY_HEAP 1648 #endif // VERIFY_HEAP
1649 int size = object->Size(); 1649 int size = object->Size();
1650 AllocationAlignment alignment = object->RequiredAlignment(); 1650 AllocationAlignment alignment = object->RequiredAlignment();
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 MarkBit mark_bit = Marking::MarkBitFrom(host); 3993 MarkBit mark_bit = Marking::MarkBitFrom(host);
3994 if (Marking::IsBlack(mark_bit)) { 3994 if (Marking::IsBlack(mark_bit)) {
3995 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); 3995 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host);
3996 RecordRelocSlot(host, &rinfo, target); 3996 RecordRelocSlot(host, &rinfo, target);
3997 } 3997 }
3998 } 3998 }
3999 } 3999 }
4000 4000
4001 } // namespace internal 4001 } // namespace internal
4002 } // namespace v8 4002 } // namespace v8
OLDNEW
« no previous file with comments | « src/external-reference-table.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698