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

Side by Side Diff: src/api.cc

Issue 424973004: Extend CPU profiler with mapping ticks to source lines (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed the various code object issue in the test Created 6 years, 3 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
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 7009 matching lines...) Expand 10 before | Expand all | Expand 10 after
7020 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 7020 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7021 } 7021 }
7022 7022
7023 7023
7024 int CpuProfileNode::GetColumnNumber() const { 7024 int CpuProfileNode::GetColumnNumber() const {
7025 return reinterpret_cast<const i::ProfileNode*>(this)-> 7025 return reinterpret_cast<const i::ProfileNode*>(this)->
7026 entry()->column_number(); 7026 entry()->column_number();
7027 } 7027 }
7028 7028
7029 7029
7030 unsigned int CpuProfileNode::GetHitLineCount() const {
7031 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7032 return node->GetHitLineCount();
7033 }
7034
7035
7036 bool CpuProfileNode::GetLineTicks(LineTick* entries,
7037 unsigned int length) const {
7038 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7039 return node->GetLineTicks(entries, length);
7040 }
7041
7042
7030 const char* CpuProfileNode::GetBailoutReason() const { 7043 const char* CpuProfileNode::GetBailoutReason() const {
7031 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 7044 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7032 return node->entry()->bailout_reason(); 7045 return node->entry()->bailout_reason();
7033 } 7046 }
7034 7047
7035 7048
7036 unsigned CpuProfileNode::GetHitCount() const { 7049 unsigned CpuProfileNode::GetHitCount() const {
7037 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks(); 7050 return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7038 } 7051 }
7039 7052
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7639 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7627 Address callback_address = 7640 Address callback_address =
7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7641 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7629 VMState<EXTERNAL> state(isolate); 7642 VMState<EXTERNAL> state(isolate);
7630 ExternalCallbackScope call_scope(isolate, callback_address); 7643 ExternalCallbackScope call_scope(isolate, callback_address);
7631 callback(info); 7644 callback(info);
7632 } 7645 }
7633 7646
7634 7647
7635 } } // namespace v8::internal 7648 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.cc » ('j') | src/profile-generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698