| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 if (callback != NULL) { | 644 if (callback != NULL) { |
| 645 external_callback = callback; | 645 external_callback = callback; |
| 646 has_external_callback = true; | 646 has_external_callback = true; |
| 647 } else { | 647 } else { |
| 648 // Sample potential return address value for frameless invocation of | 648 // Sample potential return address value for frameless invocation of |
| 649 // stubs (we'll figure out later, if this value makes sense). | 649 // stubs (we'll figure out later, if this value makes sense). |
| 650 tos = Memory::Address_at(sp); | 650 tos = Memory::Address_at(sp); |
| 651 has_external_callback = false; | 651 has_external_callback = false; |
| 652 } | 652 } |
| 653 | 653 |
| 654 SafeStackTraceFrameIterator it(isolate, fp, sp, sp, js_entry_sp); | 654 SafeStackFrameIterator it(isolate, fp, sp, sp, js_entry_sp); |
| 655 int i = 0; | 655 int i = 0; |
| 656 while (!it.done() && i < TickSample::kMaxFramesCount) { | 656 while (!it.done() && i < TickSample::kMaxFramesCount) { |
| 657 stack[i++] = it.frame()->pc(); | 657 stack[i++] = it.frame()->pc(); |
| 658 it.Advance(); | 658 it.Advance(); |
| 659 } | 659 } |
| 660 frames_count = i; | 660 frames_count = i; |
| 661 } | 661 } |
| 662 | 662 |
| 663 | 663 |
| 664 void Sampler::SetUp() { | 664 void Sampler::SetUp() { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 SamplerThread::RemoveActiveSampler(this); | 698 SamplerThread::RemoveActiveSampler(this); |
| 699 SetActive(false); | 699 SetActive(false); |
| 700 } | 700 } |
| 701 | 701 |
| 702 void Sampler::SampleStack(TickSample* sample) { | 702 void Sampler::SampleStack(TickSample* sample) { |
| 703 sample->Trace(isolate_); | 703 sample->Trace(isolate_); |
| 704 if (++samples_taken_ < 0) samples_taken_ = 0; | 704 if (++samples_taken_ < 0) samples_taken_ = 0; |
| 705 } | 705 } |
| 706 | 706 |
| 707 } } // namespace v8::internal | 707 } } // namespace v8::internal |
| OLD | NEW |