| OLD | NEW |
| 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/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 8504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8515 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking(); | 8515 reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking(); |
| 8516 } | 8516 } |
| 8517 | 8517 |
| 8518 | 8518 |
| 8519 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream, | 8519 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream, |
| 8520 int64_t* timestamp_us) { | 8520 int64_t* timestamp_us) { |
| 8521 i::HeapProfiler* heap_profiler = reinterpret_cast<i::HeapProfiler*>(this); | 8521 i::HeapProfiler* heap_profiler = reinterpret_cast<i::HeapProfiler*>(this); |
| 8522 return heap_profiler->PushHeapObjectsStats(stream, timestamp_us); | 8522 return heap_profiler->PushHeapObjectsStats(stream, timestamp_us); |
| 8523 } | 8523 } |
| 8524 | 8524 |
| 8525 | |
| 8526 bool HeapProfiler::StartSamplingHeapProfiler(uint64_t sample_interval, | 8525 bool HeapProfiler::StartSamplingHeapProfiler(uint64_t sample_interval, |
| 8527 int stack_depth) { | 8526 int stack_depth, |
| 8528 return reinterpret_cast<i::HeapProfiler*>(this) | 8527 SamplingFlags flags) { |
| 8529 ->StartSamplingHeapProfiler(sample_interval, stack_depth); | 8528 return reinterpret_cast<i::HeapProfiler*>(this)->StartSamplingHeapProfiler( |
| 8529 sample_interval, stack_depth, flags); |
| 8530 } | 8530 } |
| 8531 | 8531 |
| 8532 | 8532 |
| 8533 void HeapProfiler::StopSamplingHeapProfiler() { | 8533 void HeapProfiler::StopSamplingHeapProfiler() { |
| 8534 reinterpret_cast<i::HeapProfiler*>(this)->StopSamplingHeapProfiler(); | 8534 reinterpret_cast<i::HeapProfiler*>(this)->StopSamplingHeapProfiler(); |
| 8535 } | 8535 } |
| 8536 | 8536 |
| 8537 | 8537 |
| 8538 AllocationProfile* HeapProfiler::GetAllocationProfile() { | 8538 AllocationProfile* HeapProfiler::GetAllocationProfile() { |
| 8539 return reinterpret_cast<i::HeapProfiler*>(this)->GetAllocationProfile(); | 8539 return reinterpret_cast<i::HeapProfiler*>(this)->GetAllocationProfile(); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8796 Address callback_address = | 8796 Address callback_address = |
| 8797 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8797 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8798 VMState<EXTERNAL> state(isolate); | 8798 VMState<EXTERNAL> state(isolate); |
| 8799 ExternalCallbackScope call_scope(isolate, callback_address); | 8799 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8800 callback(info); | 8800 callback(info); |
| 8801 } | 8801 } |
| 8802 | 8802 |
| 8803 | 8803 |
| 8804 } // namespace internal | 8804 } // namespace internal |
| 8805 } // namespace v8 | 8805 } // namespace v8 |
| OLD | NEW |