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

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: Created 4 years, 6 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // is not the top function. 139 // is not the top function.
140 if (scope && scope->scope_address() < handler) { 140 if (scope && scope->scope_address() < handler) {
141 sample_info->external_callback_entry = 141 sample_info->external_callback_entry =
142 *scope->callback_entrypoint_address(); 142 *scope->callback_entrypoint_address();
143 } 143 }
144 144
145 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp), 145 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp),
146 reinterpret_cast<Address>(regs.sp), js_entry_sp); 146 reinterpret_cast<Address>(regs.sp), js_entry_sp);
147 size_t i = 0; 147 size_t i = 0;
148 if (record_c_entry_frame == kIncludeCEntryFrame && !it.done() && 148 if (record_c_entry_frame == kIncludeCEntryFrame && !it.done() &&
149 it.top_frame_type() == StackFrame::EXIT) { 149 (it.top_frame_type() == StackFrame::EXIT ||
150 it.top_frame_type() == StackFrame::BUILTIN_EXIT)) {
150 frames[i++] = isolate->c_function(); 151 frames[i++] = isolate->c_function();
151 } 152 }
152 while (!it.done() && i < frames_limit) { 153 while (!it.done() && i < frames_limit) {
153 if (it.frame()->is_interpreted()) { 154 if (it.frame()->is_interpreted()) {
154 // For interpreted frames use the bytecode array pointer as the pc. 155 // For interpreted frames use the bytecode array pointer as the pc.
155 InterpretedFrame* frame = static_cast<InterpretedFrame*>(it.frame()); 156 InterpretedFrame* frame = static_cast<InterpretedFrame*>(it.frame());
156 // Since the sampler can interrupt execution at any point the 157 // Since the sampler can interrupt execution at any point the
157 // bytecode_array might be garbage, so don't dereference it. 158 // bytecode_array might be garbage, so don't dereference it.
158 Address bytecode_array = 159 Address bytecode_array =
159 reinterpret_cast<Address>(frame->GetBytecodeArray()) - kHeapObjectTag; 160 reinterpret_cast<Address>(frame->GetBytecodeArray()) - kHeapObjectTag;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // it is not guaranteed to be atomic even when both host and target 218 // it is not guaranteed to be atomic even when both host and target
218 // are of same bitness. 219 // are of same bitness.
219 return false; 220 return false;
220 } 221 }
221 return true; 222 return true;
222 } 223 }
223 #endif // USE_SIMULATOR 224 #endif // USE_SIMULATOR
224 225
225 } // namespace internal 226 } // namespace internal
226 } // namespace v8 227 } // namespace v8
OLDNEW
« src/builtins.h ('K') | « src/objects.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698