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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 // | 608 // |
609 DISABLE_ASAN void TickSample::Init(Isolate* isolate, | 609 DISABLE_ASAN void TickSample::Init(Isolate* isolate, |
610 const RegisterState& regs) { | 610 const RegisterState& regs) { |
611 ASSERT(isolate->IsInitialized()); | 611 ASSERT(isolate->IsInitialized()); |
612 pc = regs.pc; | 612 pc = regs.pc; |
613 state = isolate->current_vm_state(); | 613 state = isolate->current_vm_state(); |
614 | 614 |
615 // Avoid collecting traces while doing GC. | 615 // Avoid collecting traces while doing GC. |
616 if (state == GC) return; | 616 if (state == GC) return; |
617 | 617 |
618 const Address js_entry_sp = | 618 Address js_entry_sp = isolate->js_entry_sp(); |
619 Isolate::js_entry_sp(isolate->thread_local_top()); | |
620 if (js_entry_sp == 0) { | 619 if (js_entry_sp == 0) { |
621 // Not executing JS now. | 620 // Not executing JS now. |
622 return; | 621 return; |
623 } | 622 } |
624 | 623 |
625 ExternalCallbackScope* scope = isolate->external_callback_scope(); | 624 ExternalCallbackScope* scope = isolate->external_callback_scope(); |
626 Address handler = Isolate::handler(isolate->thread_local_top()); | 625 Address handler = Isolate::handler(isolate->thread_local_top()); |
627 // If there is a handler on top of the external callback scope then | 626 // If there is a handler on top of the external callback scope then |
628 // we have already entrered JavaScript again and the external callback | 627 // we have already entrered JavaScript again and the external callback |
629 // is not the top function. | 628 // is not the top function. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 sample->Init(isolate_, state); | 695 sample->Init(isolate_, state); |
697 if (is_counting_samples_) { | 696 if (is_counting_samples_) { |
698 if (sample->state == JS || sample->state == EXTERNAL) { | 697 if (sample->state == JS || sample->state == EXTERNAL) { |
699 ++js_and_external_sample_count_; | 698 ++js_and_external_sample_count_; |
700 } | 699 } |
701 } | 700 } |
702 Tick(sample); | 701 Tick(sample); |
703 } | 702 } |
704 | 703 |
705 } } // namespace v8::internal | 704 } } // namespace v8::internal |
OLD | NEW |