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

Side by Side Diff: src/sampler.cc

Issue 638633002: Tick processor: Print C++ entry points (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 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/sampler.h" 5 #include "src/sampler.h"
6 6
7 #if V8_OS_POSIX && !V8_OS_CYGWIN 7 #if V8_OS_POSIX && !V8_OS_CYGWIN
8 8
9 #define USE_SIGNALS 9 #define USE_SIGNALS
10 10
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 sample_info->frames_count = 0; 616 sample_info->frames_count = 0;
617 sample_info->vm_state = isolate->current_vm_state(); 617 sample_info->vm_state = isolate->current_vm_state();
618 if (sample_info->vm_state == GC) return; 618 if (sample_info->vm_state == GC) return;
619 619
620 Address js_entry_sp = isolate->js_entry_sp(); 620 Address js_entry_sp = isolate->js_entry_sp();
621 if (js_entry_sp == 0) return; // Not executing JS now. 621 if (js_entry_sp == 0) return; // Not executing JS now.
622 622
623 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp), 623 SafeStackFrameIterator it(isolate, reinterpret_cast<Address>(regs.fp),
624 reinterpret_cast<Address>(regs.sp), js_entry_sp); 624 reinterpret_cast<Address>(regs.sp), js_entry_sp);
625 size_t i = 0; 625 size_t i = 0;
626 if (!it.done() && it.top_frame_type() == StackFrame::EXIT) {
627 frames[i++] = isolate->c_function();
628 }
626 while (!it.done() && i < frames_limit) { 629 while (!it.done() && i < frames_limit) {
627 frames[i++] = it.frame()->pc(); 630 frames[i++] = it.frame()->pc();
628 it.Advance(); 631 it.Advance();
629 } 632 }
630 sample_info->frames_count = i; 633 sample_info->frames_count = i;
631 } 634 }
632 635
633 636
634 void Sampler::SetUp() { 637 void Sampler::SetUp() {
635 #if defined(USE_SIGNALS) 638 #if defined(USE_SIGNALS)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 #endif // USE_SIMULATOR 757 #endif // USE_SIMULATOR
755 SampleStack(state); 758 SampleStack(state);
756 } 759 }
757 ResumeThread(profiled_thread); 760 ResumeThread(profiled_thread);
758 } 761 }
759 762
760 #endif // USE_SIGNALS 763 #endif // USE_SIGNALS
761 764
762 765
763 } } // namespace v8::internal 766 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | tools/codemap.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698