OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 external_callback = callback; | 630 external_callback = callback; |
631 has_external_callback = true; | 631 has_external_callback = true; |
632 } else { | 632 } else { |
633 // Sample potential return address value for frameless invocation of | 633 // Sample potential return address value for frameless invocation of |
634 // stubs (we'll figure out later, if this value makes sense). | 634 // stubs (we'll figure out later, if this value makes sense). |
635 tos = Memory::Address_at(sp); | 635 tos = Memory::Address_at(sp); |
636 has_external_callback = false; | 636 has_external_callback = false; |
637 } | 637 } |
638 | 638 |
639 SafeStackFrameIterator it(isolate, fp, sp, sp, js_entry_sp); | 639 SafeStackFrameIterator it(isolate, fp, sp, sp, js_entry_sp); |
| 640 top_frame_type = it.top_frame_type(); |
640 int i = 0; | 641 int i = 0; |
641 while (!it.done() && i < TickSample::kMaxFramesCount) { | 642 while (!it.done() && i < TickSample::kMaxFramesCount) { |
642 stack[i++] = it.frame()->pc(); | 643 stack[i++] = it.frame()->pc(); |
643 it.Advance(); | 644 it.Advance(); |
644 } | 645 } |
645 frames_count = i; | 646 frames_count = i; |
646 } | 647 } |
647 | 648 |
648 | 649 |
649 void Sampler::SetUp() { | 650 void Sampler::SetUp() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 SamplerThread::RemoveActiveSampler(this); | 684 SamplerThread::RemoveActiveSampler(this); |
684 SetActive(false); | 685 SetActive(false); |
685 } | 686 } |
686 | 687 |
687 void Sampler::SampleStack(TickSample* sample) { | 688 void Sampler::SampleStack(TickSample* sample) { |
688 sample->Trace(isolate_); | 689 sample->Trace(isolate_); |
689 if (++samples_taken_ < 0) samples_taken_ = 0; | 690 if (++samples_taken_ < 0) samples_taken_ = 0; |
690 } | 691 } |
691 | 692 |
692 } } // namespace v8::internal | 693 } } // namespace v8::internal |
OLD | NEW |