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

Side by Side Diff: src/heap/heap-inl.h

Issue 941973002: CpuProfiler: eliminate cpu-profiler dependency from heap-inl.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 10 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/deoptimizer.cc ('k') | src/ia32/lithium-codegen-ia32.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_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
11 #include "src/cpu-profiler.h"
12 #include "src/heap/heap.h" 11 #include "src/heap/heap.h"
13 #include "src/heap/store-buffer.h" 12 #include "src/heap/store-buffer.h"
14 #include "src/heap/store-buffer-inl.h" 13 #include "src/heap/store-buffer-inl.h"
15 #include "src/heap-profiler.h" 14 #include "src/heap-profiler.h"
16 #include "src/isolate.h" 15 #include "src/isolate.h"
17 #include "src/list-inl.h" 16 #include "src/list-inl.h"
18 #include "src/msan.h" 17 #include "src/msan.h"
19 #include "src/objects.h" 18 #include "src/objects.h"
20 19
21 namespace v8 { 20 namespace v8 {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 234 }
236 235
237 236
238 void Heap::OnMoveEvent(HeapObject* target, HeapObject* source, 237 void Heap::OnMoveEvent(HeapObject* target, HeapObject* source,
239 int size_in_bytes) { 238 int size_in_bytes) {
240 HeapProfiler* heap_profiler = isolate_->heap_profiler(); 239 HeapProfiler* heap_profiler = isolate_->heap_profiler();
241 if (heap_profiler->is_tracking_object_moves()) { 240 if (heap_profiler->is_tracking_object_moves()) {
242 heap_profiler->ObjectMoveEvent(source->address(), target->address(), 241 heap_profiler->ObjectMoveEvent(source->address(), target->address(),
243 size_in_bytes); 242 size_in_bytes);
244 } 243 }
245 244 if (target->IsSharedFunctionInfo()) {
246 if (isolate_->logger()->is_logging_code_events() || 245 LOG_CODE_EVENT(isolate_, SharedFunctionInfoMoveEvent(source->address(),
247 isolate_->cpu_profiler()->is_profiling()) { 246 target->address()));
248 if (target->IsSharedFunctionInfo()) {
249 PROFILE(isolate_, SharedFunctionInfoMoveEvent(source->address(),
250 target->address()));
251 }
252 } 247 }
253 248
254 if (FLAG_verify_predictable) { 249 if (FLAG_verify_predictable) {
255 ++allocations_count_; 250 ++allocations_count_;
256 251
257 UpdateAllocationsHash(source); 252 UpdateAllocationsHash(source);
258 UpdateAllocationsHash(target); 253 UpdateAllocationsHash(target);
259 UpdateAllocationsHash(size_in_bytes); 254 UpdateAllocationsHash(size_in_bytes);
260 255
261 if ((FLAG_dump_allocations_digest_at_alloc > 0) && 256 if ((FLAG_dump_allocations_digest_at_alloc > 0) &&
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 743
749 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 744 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
750 for (Object** current = start; current < end; current++) { 745 for (Object** current = start; current < end; current++) {
751 CHECK((*current)->IsSmi()); 746 CHECK((*current)->IsSmi());
752 } 747 }
753 } 748 }
754 } 749 }
755 } // namespace v8::internal 750 } // namespace v8::internal
756 751
757 #endif // V8_HEAP_HEAP_INL_H_ 752 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698