| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/log.h" | 5 #include "src/log.h" |
| 6 | 6 |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 ll_logger_ = new LowLevelLogger(log_file_name.str().c_str()); | 1859 ll_logger_ = new LowLevelLogger(log_file_name.str().c_str()); |
| 1860 addCodeEventListener(ll_logger_); | 1860 addCodeEventListener(ll_logger_); |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 ticker_ = new Ticker(isolate, kSamplingIntervalMs); | 1863 ticker_ = new Ticker(isolate, kSamplingIntervalMs); |
| 1864 | 1864 |
| 1865 if (Log::InitLogAtStart()) { | 1865 if (Log::InitLogAtStart()) { |
| 1866 is_logging_ = true; | 1866 is_logging_ = true; |
| 1867 } | 1867 } |
| 1868 | 1868 |
| 1869 if (FLAG_log_internal_timer_events || FLAG_prof) timer_.Start(); |
| 1870 |
| 1869 if (FLAG_prof) { | 1871 if (FLAG_prof) { |
| 1870 profiler_ = new Profiler(isolate); | 1872 profiler_ = new Profiler(isolate); |
| 1871 is_logging_ = true; | 1873 is_logging_ = true; |
| 1872 profiler_->Engage(); | 1874 profiler_->Engage(); |
| 1873 } | 1875 } |
| 1874 | 1876 |
| 1875 if (FLAG_log_internal_timer_events || FLAG_prof) timer_.Start(); | |
| 1876 | |
| 1877 return true; | 1877 return true; |
| 1878 } | 1878 } |
| 1879 | 1879 |
| 1880 | 1880 |
| 1881 void Logger::SetCodeEventHandler(uint32_t options, | 1881 void Logger::SetCodeEventHandler(uint32_t options, |
| 1882 JitCodeEventHandler event_handler) { | 1882 JitCodeEventHandler event_handler) { |
| 1883 if (jit_logger_) { | 1883 if (jit_logger_) { |
| 1884 removeCodeEventListener(jit_logger_); | 1884 removeCodeEventListener(jit_logger_); |
| 1885 delete jit_logger_; | 1885 delete jit_logger_; |
| 1886 jit_logger_ = NULL; | 1886 jit_logger_ = NULL; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 if (jit_logger_) { | 1938 if (jit_logger_) { |
| 1939 removeCodeEventListener(jit_logger_); | 1939 removeCodeEventListener(jit_logger_); |
| 1940 delete jit_logger_; | 1940 delete jit_logger_; |
| 1941 jit_logger_ = NULL; | 1941 jit_logger_ = NULL; |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 return log_->Close(); | 1944 return log_->Close(); |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 } } // namespace v8::internal | 1947 } } // namespace v8::internal |
| OLD | NEW |