Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/api.cc

Issue 1062053004: Revert of CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
7554 void CpuProfile::Delete() { 7548 void CpuProfile::Delete() {
7555 i::Isolate* isolate = i::Isolate::Current(); 7549 i::Isolate* isolate = i::Isolate::Current();
7556 i::CpuProfiler* profiler = isolate->cpu_profiler(); 7550 i::CpuProfiler* profiler = isolate->cpu_profiler();
7557 DCHECK(profiler != NULL); 7551 DCHECK(profiler != NULL);
7558 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this)); 7552 profiler->DeleteProfile(reinterpret_cast<i::CpuProfile*>(this));
7559 } 7553 }
7560 7554
7561 7555
7562 Handle<String> CpuProfile::GetTitle() const { 7556 Handle<String> CpuProfile::GetTitle() const {
7563 i::Isolate* isolate = i::Isolate::Current(); 7557 i::Isolate* isolate = i::Isolate::Current();
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
8093 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8087 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8094 Address callback_address = 8088 Address callback_address =
8095 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8089 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8096 VMState<EXTERNAL> state(isolate); 8090 VMState<EXTERNAL> state(isolate);
8097 ExternalCallbackScope call_scope(isolate, callback_address); 8091 ExternalCallbackScope call_scope(isolate, callback_address);
8098 callback(info); 8092 callback(info);
8099 } 8093 }
8100 8094
8101 8095
8102 } } // namespace v8::internal 8096 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698