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

Side by Side Diff: src/api.cc

Issue 682143003: Reland of Extend CPU profiler with mapping ticks to source lines (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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
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 7154 matching lines...) Expand 10 before | Expand all | Expand 10 after
7165 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7165 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7166 } 7166 }
7167 7167
7168 7168
7169 int CpuProfileNode::GetColumnNumber() const { 7169 int CpuProfileNode::GetColumnNumber() const {
7170 return reinterpret_cast<const i::ProfileNode*>(this)-> 7170 return reinterpret_cast<const i::ProfileNode*>(this)->
7171 entry()->column_number(); 7171 entry()->column_number();
7172 } 7172 }
7173 7173
7174 7174
7175 unsigned int CpuProfileNode::GetHitLineCount() const {
7176 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7177 return node->GetHitLineCount();
7178 }
7179
7180
7181 bool CpuProfileNode::GetLineTicks(LineTick* entries,
7182 unsigned int length) const {
7183 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7184 return node->GetLineTicks(entries, length);
7185 }
7186
7187
7175 const char* CpuProfileNode::GetBailoutReason() const { 7188 const char* CpuProfileNode::GetBailoutReason() const {
7176 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 7189 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7177 return node->entry()->bailout_reason(); 7190 return node->entry()->bailout_reason();
7178 } 7191 }
7179 7192
7180 7193
7181 unsigned CpuProfileNode::GetHitCount() const { 7194 unsigned CpuProfileNode::GetHitCount() const {
7182 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7195 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7183 } 7196 }
7184 7197
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7771 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7784 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7772 Address callback_address = 7785 Address callback_address =
7773 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7786 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7774 VMState<EXTERNAL> state(isolate); 7787 VMState<EXTERNAL> state(isolate);
7775 ExternalCallbackScope call_scope(isolate, callback_address); 7788 ExternalCallbackScope call_scope(isolate, callback_address);
7776 callback(info); 7789 callback(info);
7777 } 7790 }
7778 7791
7779 7792
7780 } } // namespace v8::internal 7793 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('j') | test/cctest/test-cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698