| 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 7671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7682 return Utils::ToLocal(obj); | 7682 return Utils::ToLocal(obj); |
| 7683 } | 7683 } |
| 7684 | 7684 |
| 7685 | 7685 |
| 7686 void HeapProfiler::ClearObjectIds() { | 7686 void HeapProfiler::ClearObjectIds() { |
| 7687 reinterpret_cast<i::HeapProfiler*>(this)->ClearHeapObjectMap(); | 7687 reinterpret_cast<i::HeapProfiler*>(this)->ClearHeapObjectMap(); |
| 7688 } | 7688 } |
| 7689 | 7689 |
| 7690 | 7690 |
| 7691 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( | 7691 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( |
| 7692 Handle<String> title, | |
| 7693 ActivityControl* control, | |
| 7694 ObjectNameResolver* resolver) { | |
| 7695 return TakeHeapSnapshot(control, resolver); | |
| 7696 } | |
| 7697 | |
| 7698 | |
| 7699 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( | |
| 7700 ActivityControl* control, ObjectNameResolver* resolver) { | 7692 ActivityControl* control, ObjectNameResolver* resolver) { |
| 7701 return reinterpret_cast<const HeapSnapshot*>( | 7693 return reinterpret_cast<const HeapSnapshot*>( |
| 7702 reinterpret_cast<i::HeapProfiler*>(this) | 7694 reinterpret_cast<i::HeapProfiler*>(this) |
| 7703 ->TakeSnapshot(control, resolver)); | 7695 ->TakeSnapshot(control, resolver)); |
| 7704 } | 7696 } |
| 7705 | 7697 |
| 7706 | 7698 |
| 7707 void HeapProfiler::StartTrackingHeapObjects(bool track_allocations) { | 7699 void HeapProfiler::StartTrackingHeapObjects(bool track_allocations) { |
| 7708 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking( | 7700 reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking( |
| 7709 track_allocations); | 7701 track_allocations); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7976 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7968 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7977 Address callback_address = | 7969 Address callback_address = |
| 7978 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7970 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7979 VMState<EXTERNAL> state(isolate); | 7971 VMState<EXTERNAL> state(isolate); |
| 7980 ExternalCallbackScope call_scope(isolate, callback_address); | 7972 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7981 callback(info); | 7973 callback(info); |
| 7982 } | 7974 } |
| 7983 | 7975 |
| 7984 | 7976 |
| 7985 } } // namespace v8::internal | 7977 } } // namespace v8::internal |
| OLD | NEW |