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

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

Issue 2804593005: Revert of [profiler] reduce incorrectly unaccounted ticks. (Closed)
Patch Set: Created 3 years, 8 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 | test/cctest/cctest.status » ('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 "include/v8-profiler.h" 7 #include "include/v8-profiler.h"
8 #include "src/counters.h" 8 #include "src/counters.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/msan.h" 10 #include "src/msan.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 i::Address* external_callback_entry_ptr = 218 i::Address* external_callback_entry_ptr =
219 scope->callback_entrypoint_address(); 219 scope->callback_entrypoint_address();
220 sample_info->external_callback_entry = 220 sample_info->external_callback_entry =
221 external_callback_entry_ptr == nullptr ? nullptr 221 external_callback_entry_ptr == nullptr ? nullptr
222 : *external_callback_entry_ptr; 222 : *external_callback_entry_ptr;
223 } 223 }
224 224
225 i::SafeStackFrameIterator it(isolate, reinterpret_cast<i::Address>(regs->fp), 225 i::SafeStackFrameIterator it(isolate, reinterpret_cast<i::Address>(regs->fp),
226 reinterpret_cast<i::Address>(regs->sp), 226 reinterpret_cast<i::Address>(regs->sp),
227 js_entry_sp); 227 js_entry_sp);
228 if (it.done()) return true; 228
229 // If at this point iterator does not see any frames,
230 // is usually means something is wrong with the FP,
231 // e.g. it is used as a general purpose register in the function.
232 // Bailout.
233 if (it.done()) return false;
229 234
230 size_t i = 0; 235 size_t i = 0;
231 if (record_c_entry_frame == kIncludeCEntryFrame && 236 if (record_c_entry_frame == kIncludeCEntryFrame &&
232 (it.top_frame_type() == internal::StackFrame::EXIT || 237 (it.top_frame_type() == internal::StackFrame::EXIT ||
233 it.top_frame_type() == internal::StackFrame::BUILTIN_EXIT)) { 238 it.top_frame_type() == internal::StackFrame::BUILTIN_EXIT)) {
234 frames[i++] = isolate->c_function(); 239 frames[i++] = isolate->c_function();
235 } 240 }
236 i::RuntimeCallTimer* timer = 241 i::RuntimeCallTimer* timer =
237 isolate->counters()->runtime_call_stats()->current_timer(); 242 isolate->counters()->runtime_call_stats()->current_timer();
238 for (; !it.done() && i < frames_limit; it.Advance()) { 243 for (; !it.done() && i < frames_limit; it.Advance()) {
(...skipping 28 matching lines...) Expand all
267 bool use_simulator_reg_state) { 272 bool use_simulator_reg_state) {
268 v8::TickSample::Init(reinterpret_cast<v8::Isolate*>(isolate), state, 273 v8::TickSample::Init(reinterpret_cast<v8::Isolate*>(isolate), state,
269 record_c_entry_frame, update_stats, 274 record_c_entry_frame, update_stats,
270 use_simulator_reg_state); 275 use_simulator_reg_state);
271 if (pc == nullptr) return; 276 if (pc == nullptr) return;
272 timestamp = base::TimeTicks::HighResolutionNow(); 277 timestamp = base::TimeTicks::HighResolutionNow();
273 } 278 }
274 279
275 } // namespace internal 280 } // namespace internal
276 } // namespace v8 281 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698