| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 } | 619 } |
| 620 | 620 |
| 621 void SetProfiler(Profiler* profiler) { | 621 void SetProfiler(Profiler* profiler) { |
| 622 ASSERT(profiler_ == NULL); | 622 ASSERT(profiler_ == NULL); |
| 623 profiler_ = profiler; | 623 profiler_ = profiler; |
| 624 IncreaseProfilingDepth(); | 624 IncreaseProfilingDepth(); |
| 625 if (!IsActive()) Start(); | 625 if (!IsActive()) Start(); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void ClearProfiler() { | 628 void ClearProfiler() { |
| 629 DecreaseProfilingDepth(); | |
| 630 profiler_ = NULL; | 629 profiler_ = NULL; |
| 631 if (IsActive()) Stop(); | 630 if (IsActive()) Stop(); |
| 631 DecreaseProfilingDepth(); |
| 632 } | 632 } |
| 633 | 633 |
| 634 private: | 634 private: |
| 635 Profiler* profiler_; | 635 Profiler* profiler_; |
| 636 }; | 636 }; |
| 637 | 637 |
| 638 | 638 |
| 639 // | 639 // |
| 640 // Profiler implementation. | 640 // Profiler implementation. |
| 641 // | 641 // |
| (...skipping 1264 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 |