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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 Mutex* SamplerThread::mutex_ = NULL; | 582 Mutex* SamplerThread::mutex_ = NULL; |
583 SamplerThread* SamplerThread::instance_ = NULL; | 583 SamplerThread* SamplerThread::instance_ = NULL; |
584 | 584 |
585 | 585 |
586 // | 586 // |
587 // StackTracer implementation | 587 // StackTracer implementation |
588 // | 588 // |
589 DISABLE_ASAN void TickSample::Init(Isolate* isolate, | 589 DISABLE_ASAN void TickSample::Init(Isolate* isolate, |
590 const RegisterState& regs) { | 590 const RegisterState& regs) { |
591 ASSERT(isolate->IsInitialized()); | 591 ASSERT(isolate->IsInitialized()); |
| 592 timestamp = TimeTicks::HighResolutionNow(); |
592 pc = regs.pc; | 593 pc = regs.pc; |
593 state = isolate->current_vm_state(); | 594 state = isolate->current_vm_state(); |
594 | 595 |
595 // Avoid collecting traces while doing GC. | 596 // Avoid collecting traces while doing GC. |
596 if (state == GC) return; | 597 if (state == GC) return; |
597 | 598 |
598 Address js_entry_sp = isolate->js_entry_sp(); | 599 Address js_entry_sp = isolate->js_entry_sp(); |
599 if (js_entry_sp == 0) { | 600 if (js_entry_sp == 0) { |
600 // Not executing JS now. | 601 // Not executing JS now. |
601 return; | 602 return; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 #endif // USE_SIMULATOR | 751 #endif // USE_SIMULATOR |
751 SampleStack(state); | 752 SampleStack(state); |
752 } | 753 } |
753 ResumeThread(profiled_thread); | 754 ResumeThread(profiled_thread); |
754 } | 755 } |
755 | 756 |
756 #endif // USE_SIGNALS | 757 #endif // USE_SIGNALS |
757 | 758 |
758 | 759 |
759 } } // namespace v8::internal | 760 } } // namespace v8::internal |
OLD | NEW |