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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 uintptr_t start, | 886 uintptr_t start, |
887 uintptr_t end) { | 887 uintptr_t end) { |
888 if (!log_->IsEnabled() || !FLAG_prof_cpp) return; | 888 if (!log_->IsEnabled() || !FLAG_prof_cpp) return; |
889 Log::MessageBuilder msg(log_); | 889 Log::MessageBuilder msg(log_); |
890 msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR, | 890 msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR, |
891 library_path.c_str(), start, end); | 891 library_path.c_str(), start, end); |
892 msg.WriteToLogFile(); | 892 msg.WriteToLogFile(); |
893 } | 893 } |
894 | 894 |
895 | 895 |
896 void Logger::CodeDeoptEvent(Code* code, int bailout_id, Address from, | 896 void Logger::CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) { |
897 int fp_to_sp_delta) { | 897 PROFILER_LOG(CodeDeoptEvent(code, pc, fp_to_sp_delta)); |
898 PROFILER_LOG(CodeDeoptEvent(code, bailout_id, from, fp_to_sp_delta)); | |
899 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return; | 898 if (!log_->IsEnabled() || !FLAG_log_internal_timer_events) return; |
900 Log::MessageBuilder msg(log_); | 899 Log::MessageBuilder msg(log_); |
901 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); | 900 int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); |
902 msg.Append("code-deopt,%ld,%d", since_epoch, code->CodeSize()); | 901 msg.Append("code-deopt,%ld,%d", since_epoch, code->CodeSize()); |
903 msg.WriteToLogFile(); | 902 msg.WriteToLogFile(); |
904 } | 903 } |
905 | 904 |
906 | 905 |
907 void Logger::CurrentTimeEvent() { | 906 void Logger::CurrentTimeEvent() { |
908 if (!log_->IsEnabled()) return; | 907 if (!log_->IsEnabled()) return; |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 if (jit_logger_) { | 1916 if (jit_logger_) { |
1918 removeCodeEventListener(jit_logger_); | 1917 removeCodeEventListener(jit_logger_); |
1919 delete jit_logger_; | 1918 delete jit_logger_; |
1920 jit_logger_ = NULL; | 1919 jit_logger_ = NULL; |
1921 } | 1920 } |
1922 | 1921 |
1923 return log_->Close(); | 1922 return log_->Close(); |
1924 } | 1923 } |
1925 | 1924 |
1926 } } // namespace v8::internal | 1925 } } // namespace v8::internal |
OLD | NEW |