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 7494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7505 } | 7505 } |
7506 | 7506 |
7507 | 7507 |
7508 const CpuProfileNode* CpuProfileNode::GetChild(int index) const { | 7508 const CpuProfileNode* CpuProfileNode::GetChild(int index) const { |
7509 const i::ProfileNode* child = | 7509 const i::ProfileNode* child = |
7510 reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index); | 7510 reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index); |
7511 return reinterpret_cast<const CpuProfileNode*>(child); | 7511 return reinterpret_cast<const CpuProfileNode*>(child); |
7512 } | 7512 } |
7513 | 7513 |
7514 | 7514 |
| 7515 const std::vector<CpuProfileDeoptInfo>& CpuProfileNode::GetDeoptInfos() const { |
| 7516 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| 7517 return node->deopt_infos(); |
| 7518 } |
| 7519 |
| 7520 |
7515 void CpuProfile::Delete() { | 7521 void CpuProfile::Delete() { |
7516 i::Isolate* isolate = i::Isolate::Current(); | 7522 i::Isolate* isolate = i::Isolate::Current(); |
7517 i::CpuProfiler* profiler = isolate->cpu_profiler(); | 7523 i::CpuProfiler* profiler = isolate->cpu_profiler(); |
7518 DCHECK(profiler != NULL); | 7524 DCHECK(profiler != NULL); |
7519 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this)); | 7525 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this)); |
7520 } | 7526 } |
7521 | 7527 |
7522 | 7528 |
7523 Handle<String> CpuProfile::GetTitle() const { | 7529 Handle<String> CpuProfile::GetTitle() const { |
7524 i::Isolate* isolate = i::Isolate::Current(); | 7530 i::Isolate* isolate = i::Isolate::Current(); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8054 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8060 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8055 Address callback_address = | 8061 Address callback_address = |
8056 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8062 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8057 VMState<EXTERNAL> state(isolate); | 8063 VMState<EXTERNAL> state(isolate); |
8058 ExternalCallbackScope call_scope(isolate, callback_address); | 8064 ExternalCallbackScope call_scope(isolate, callback_address); |
8059 callback(info); | 8065 callback(info); |
8060 } | 8066 } |
8061 | 8067 |
8062 | 8068 |
8063 } } // namespace v8::internal | 8069 } } // namespace v8::internal |
OLD | NEW |