| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 reinterpret_cast<Sampler::PlatformData*>(arg); | 637 reinterpret_cast<Sampler::PlatformData*>(arg); |
| 638 Thread::SetThreadLocal(Isolate::isolate_key(), data->sampler_->isolate()); | 638 Thread::SetThreadLocal(Isolate::isolate_key(), data->sampler_->isolate()); |
| 639 data->Runner(); | 639 data->Runner(); |
| 640 return 0; | 640 return 0; |
| 641 } | 641 } |
| 642 | 642 |
| 643 | 643 |
| 644 Sampler::Sampler(Isolate* isolate, int interval, bool profiling) | 644 Sampler::Sampler(Isolate* isolate, int interval, bool profiling) |
| 645 : isolate_(isolate), | 645 : isolate_(isolate), |
| 646 interval_(interval), | 646 interval_(interval), |
| 647 synchronous_(profiling), |
| 647 profiling_(profiling), | 648 profiling_(profiling), |
| 648 synchronous_(profiling), | |
| 649 active_(false) { | 649 active_(false) { |
| 650 data_ = new PlatformData(this); | 650 data_ = new PlatformData(this); |
| 651 } | 651 } |
| 652 | 652 |
| 653 | 653 |
| 654 Sampler::~Sampler() { | 654 Sampler::~Sampler() { |
| 655 delete data_; | 655 delete data_; |
| 656 } | 656 } |
| 657 | 657 |
| 658 | 658 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 689 | 689 |
| 690 // Deallocate Mach port for thread. | 690 // Deallocate Mach port for thread. |
| 691 if (IsSynchronous()) { | 691 if (IsSynchronous()) { |
| 692 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); | 692 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 | 695 |
| 696 #endif // ENABLE_LOGGING_AND_PROFILING | 696 #endif // ENABLE_LOGGING_AND_PROFILING |
| 697 | 697 |
| 698 } } // namespace v8::internal | 698 } } // namespace v8::internal |
| OLD | NEW |