| 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 8212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8223 | 8223 |
| 8224 | 8224 |
| 8225 const std::vector<CpuProfileDeoptInfo>& CpuProfileNode::GetDeoptInfos() const { | 8225 const std::vector<CpuProfileDeoptInfo>& CpuProfileNode::GetDeoptInfos() const { |
| 8226 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); | 8226 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| 8227 return node->deopt_infos(); | 8227 return node->deopt_infos(); |
| 8228 } | 8228 } |
| 8229 | 8229 |
| 8230 | 8230 |
| 8231 void CpuProfile::Delete() { | 8231 void CpuProfile::Delete() { |
| 8232 i::CpuProfile* profile = reinterpret_cast<i::CpuProfile*>(this); | 8232 i::CpuProfile* profile = reinterpret_cast<i::CpuProfile*>(this); |
| 8233 i::Isolate* isolate = profile->top_down()->isolate(); | 8233 i::CpuProfiler* profiler = profile->cpu_profiler(); |
| 8234 i::CpuProfiler* profiler = isolate->cpu_profiler(); | 8234 DCHECK(profiler != nullptr); |
| 8235 DCHECK(profiler != NULL); | |
| 8236 profiler->DeleteProfile(profile); | 8235 profiler->DeleteProfile(profile); |
| 8237 } | 8236 } |
| 8238 | 8237 |
| 8239 | 8238 |
| 8240 Local<String> CpuProfile::GetTitle() const { | 8239 Local<String> CpuProfile::GetTitle() const { |
| 8241 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 8240 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
| 8242 i::Isolate* isolate = profile->top_down()->isolate(); | 8241 i::Isolate* isolate = profile->top_down()->isolate(); |
| 8243 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( | 8242 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( |
| 8244 profile->title())); | 8243 profile->title())); |
| 8245 } | 8244 } |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8797 Address callback_address = | 8796 Address callback_address = |
| 8798 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8797 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8799 VMState<EXTERNAL> state(isolate); | 8798 VMState<EXTERNAL> state(isolate); |
| 8800 ExternalCallbackScope call_scope(isolate, callback_address); | 8799 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8801 callback(info); | 8800 callback(info); |
| 8802 } | 8801 } |
| 8803 | 8802 |
| 8804 | 8803 |
| 8805 } // namespace internal | 8804 } // namespace internal |
| 8806 } // namespace v8 | 8805 } // namespace v8 |
| OLD | NEW |