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

Side by Side Diff: src/profile-generator.cc

Issue 1315683007: Profiler: resolve top of stack address to a function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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/profile-generator.h" 5 #include "src/profile-generator.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/global-handles.h" 10 #include "src/global-handles.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 pc_entry->builtin_id() == Builtins::kFunctionApply) { 630 pc_entry->builtin_id() == Builtins::kFunctionApply) {
631 // When current function is FunctionCall or FunctionApply builtin the 631 // When current function is FunctionCall or FunctionApply builtin the
632 // top frame is either frame of the calling JS function or internal 632 // top frame is either frame of the calling JS function or internal
633 // frame. In the latter case we know the caller for sure but in the 633 // frame. In the latter case we know the caller for sure but in the
634 // former case we don't so we simply replace the frame with 634 // former case we don't so we simply replace the frame with
635 // 'unresolved' entry. 635 // 'unresolved' entry.
636 if (sample.top_frame_type == StackFrame::JAVA_SCRIPT) { 636 if (sample.top_frame_type == StackFrame::JAVA_SCRIPT) {
637 *entry++ = unresolved_entry_; 637 *entry++ = unresolved_entry_;
638 } 638 }
639 } 639 }
640 } else if (sample.top_frame_type == StackFrame::JAVA_SCRIPT ||
641 sample.top_frame_type == StackFrame::OPTIMIZED) {
642 // Find out, if top of stack was pointing inside a JS function
643 // meaning that we have encountered a frameless invocation.
644 Address start;
645 *entry++ = code_map_.FindEntry(sample.tos, &start);
alph 2015/09/10 06:20:36 You can omit the second argument.
yurys 2015/09/10 15:58:49 Done. Also I did more clean-up in another CL: http
640 } 646 }
641 } 647 }
642 648
643 for (const Address* stack_pos = sample.stack, 649 for (const Address* stack_pos = sample.stack,
644 *stack_end = stack_pos + sample.frames_count; 650 *stack_end = stack_pos + sample.frames_count;
645 stack_pos != stack_end; 651 stack_pos != stack_end;
646 ++stack_pos) { 652 ++stack_pos) {
647 Address start = NULL; 653 Address start = NULL;
648 *entry = code_map_.FindEntry(*stack_pos, &start); 654 *entry = code_map_.FindEntry(*stack_pos, &start);
649 655
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 case EXTERNAL: 700 case EXTERNAL:
695 return program_entry_; 701 return program_entry_;
696 case IDLE: 702 case IDLE:
697 return idle_entry_; 703 return idle_entry_;
698 default: return NULL; 704 default: return NULL;
699 } 705 }
700 } 706 }
701 707
702 } // namespace internal 708 } // namespace internal
703 } // namespace v8 709 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698