| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 engaged_(false), | 649 engaged_(false), |
| 650 running_(false), | 650 running_(false), |
| 651 paused_(false) { | 651 paused_(false) { |
| 652 } | 652 } |
| 653 | 653 |
| 654 | 654 |
| 655 void Profiler::Engage() { | 655 void Profiler::Engage() { |
| 656 if (engaged_) return; | 656 if (engaged_) return; |
| 657 engaged_ = true; | 657 engaged_ = true; |
| 658 | 658 |
| 659 OS::LogSharedLibraryAddresses(); | 659 OS::LogSharedLibraryAddresses(isolate_); |
| 660 | 660 |
| 661 // Start thread processing the profiler buffer. | 661 // Start thread processing the profiler buffer. |
| 662 running_ = true; | 662 running_ = true; |
| 663 Start(); | 663 Start(); |
| 664 | 664 |
| 665 // Register to get ticks. | 665 // Register to get ticks. |
| 666 Logger* logger = isolate_->logger(); | 666 Logger* logger = isolate_->logger(); |
| 667 logger->ticker_->SetProfiler(this); | 667 logger->ticker_->SetProfiler(this); |
| 668 | 668 |
| 669 logger->ProfilerBeginEvent(); | 669 logger->ProfilerBeginEvent(); |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1906 if (jit_logger_) { | 1906 if (jit_logger_) { |
| 1907 removeCodeEventListener(jit_logger_); | 1907 removeCodeEventListener(jit_logger_); |
| 1908 delete jit_logger_; | 1908 delete jit_logger_; |
| 1909 jit_logger_ = NULL; | 1909 jit_logger_ = NULL; |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 return log_->Close(); | 1912 return log_->Close(); |
| 1913 } | 1913 } |
| 1914 | 1914 |
| 1915 } } // namespace v8::internal | 1915 } } // namespace v8::internal |
| OLD | NEW |