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 7527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7538 } | 7538 } |
7539 | 7539 |
7540 | 7540 |
7541 const CpuProfileNode* CpuProfileNode::GetChild(int index) const { | 7541 const CpuProfileNode* CpuProfileNode::GetChild(int index) const { |
7542 const i::ProfileNode* child = | 7542 const i::ProfileNode* child = |
7543 reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index); | 7543 reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index); |
7544 return reinterpret_cast<const CpuProfileNode*>(child); | 7544 return reinterpret_cast<const CpuProfileNode*>(child); |
7545 } | 7545 } |
7546 | 7546 |
7547 | 7547 |
| 7548 const std::vector<CpuProfileDeoptInfo>& CpuProfileNode::GetDeoptInfos() const { |
| 7549 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| 7550 return node->deopt_infos(); |
| 7551 } |
| 7552 |
| 7553 |
7548 void CpuProfile::Delete() { | 7554 void CpuProfile::Delete() { |
7549 i::Isolate* isolate = i::Isolate::Current(); | 7555 i::Isolate* isolate = i::Isolate::Current(); |
7550 i::CpuProfiler* profiler = isolate->cpu_profiler(); | 7556 i::CpuProfiler* profiler = isolate->cpu_profiler(); |
7551 DCHECK(profiler != NULL); | 7557 DCHECK(profiler != NULL); |
7552 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this)); | 7558 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this)); |
7553 } | 7559 } |
7554 | 7560 |
7555 | 7561 |
7556 Handle<String> CpuProfile::GetTitle() const { | 7562 Handle<String> CpuProfile::GetTitle() const { |
7557 i::Isolate* isolate = i::Isolate::Current(); | 7563 i::Isolate* isolate = i::Isolate::Current(); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8087 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8093 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8088 Address callback_address = | 8094 Address callback_address = |
8089 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8095 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8090 VMState<EXTERNAL> state(isolate); | 8096 VMState<EXTERNAL> state(isolate); |
8091 ExternalCallbackScope call_scope(isolate, callback_address); | 8097 ExternalCallbackScope call_scope(isolate, callback_address); |
8092 callback(info); | 8098 callback(info); |
8093 } | 8099 } |
8094 | 8100 |
8095 | 8101 |
8096 } } // namespace v8::internal | 8102 } } // namespace v8::internal |
OLD | NEW |