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

Side by Side Diff: src/api.cc

Issue 616963005: Extend CPU profiler with mapping ticks to source lines (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed x64.debug linker error Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('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 7096 matching lines...) Expand 10 before | Expand all | Expand 10 after
7107 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7107 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7108 } 7108 }
7109 7109
7110 7110
7111 int CpuProfileNode::GetColumnNumber() const { 7111 int CpuProfileNode::GetColumnNumber() const {
7112 return reinterpret_cast<const i::ProfileNode*>(this)-> 7112 return reinterpret_cast<const i::ProfileNode*>(this)->
7113 entry()->column_number(); 7113 entry()->column_number();
7114 } 7114 }
7115 7115
7116 7116
7117 unsigned int CpuProfileNode::GetHitLineCount() const {
7118 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7119 return node->GetHitLineCount();
7120 }
7121
7122
7123 bool CpuProfileNode::GetLineTicks(LineTick* entries,
7124 unsigned int length) const {
7125 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7126 return node->GetLineTicks(entries, length);
7127 }
7128
7129
7117 const char* CpuProfileNode::GetBailoutReason() const { 7130 const char* CpuProfileNode::GetBailoutReason() const {
7118 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 7131 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7119 return node->entry()->bailout_reason(); 7132 return node->entry()->bailout_reason();
7120 } 7133 }
7121 7134
7122 7135
7123 unsigned CpuProfileNode::GetHitCount() const { 7136 unsigned CpuProfileNode::GetHitCount() const {
7124 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7137 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7125 } 7138 }
7126 7139
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7713 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7726 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7714 Address callback_address = 7727 Address callback_address =
7715 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7728 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7716 VMState<EXTERNAL> state(isolate); 7729 VMState<EXTERNAL> state(isolate);
7717 ExternalCallbackScope call_scope(isolate, callback_address); 7730 ExternalCallbackScope call_scope(isolate, callback_address);
7718 callback(info); 7731 callback(info);
7719 } 7732 }
7720 7733
7721 7734
7722 } } // namespace v8::internal 7735 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698