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

Side by Side Diff: src/profiler/tick-sample.cc

Issue 2090723005: [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing condition in SafeStackFrameIter::frame() Created 4 years, 5 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 | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/builtins-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/profiler/tick-sample.h" 5 #include "src/profiler/tick-sample.h"
6 6
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "src/vm-state-inl.h" 8 #include "src/vm-state-inl.h"
9 9
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // is not the top function. 140 // is not the top function.
141 if (scope && scope->scope_address() < handler) { 141 if (scope && scope->scope_address() < handler) {
142 sample_info->external_callback_entry = 142 sample_info->external_callback_entry =
143 *scope->callback_entrypoint_address(); 143 *scope->callback_entrypoint_address();
144 } 144 }
145 145
146 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp), 146 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp),
147 reinterpret_cast<Address>(regs.sp), js_entry_sp); 147 reinterpret_cast<Address>(regs.sp), js_entry_sp);
148 size_t i = 0; 148 size_t i = 0;
149 if (record_c_entry_frame == kIncludeCEntryFrame && !it.done() && 149 if (record_c_entry_frame == kIncludeCEntryFrame && !it.done() &&
150 it.top_frame_type() == StackFrame::EXIT) { 150 (it.top_frame_type() == StackFrame::EXIT ||
151 it.top_frame_type() == StackFrame::BUILTIN_EXIT)) {
151 frames[i++] = isolate->c_function(); 152 frames[i++] = isolate->c_function();
152 } 153 }
153 while (!it.done() && i < frames_limit) { 154 while (!it.done() && i < frames_limit) {
154 if (it.frame()->is_interpreted()) { 155 if (it.frame()->is_interpreted()) {
155 // For interpreted frames use the bytecode array pointer as the pc. 156 // For interpreted frames use the bytecode array pointer as the pc.
156 InterpretedFrame* frame = static_cast<InterpretedFrame*>(it.frame()); 157 InterpretedFrame* frame = static_cast<InterpretedFrame*>(it.frame());
157 // Since the sampler can interrupt execution at any point the 158 // Since the sampler can interrupt execution at any point the
158 // bytecode_array might be garbage, so don't dereference it. 159 // bytecode_array might be garbage, so don't dereference it.
159 Address bytecode_array = 160 Address bytecode_array =
160 reinterpret_cast<Address>(frame->GetBytecodeArray()) - kHeapObjectTag; 161 reinterpret_cast<Address>(frame->GetBytecodeArray()) - kHeapObjectTag;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // it is not guaranteed to be atomic even when both host and target 219 // it is not guaranteed to be atomic even when both host and target
219 // are of same bitness. 220 // are of same bitness.
220 return false; 221 return false;
221 } 222 }
222 return true; 223 return true;
223 } 224 }
224 #endif // USE_SIMULATOR 225 #endif // USE_SIMULATOR
225 226
226 } // namespace internal 227 } // namespace internal
227 } // namespace v8 228 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698