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/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 if (!log_->IsEnabled()) return; | 794 if (!log_->IsEnabled()) return; |
795 Log::MessageBuilder msg(log_); | 795 Log::MessageBuilder msg(log_); |
796 msg.Append("%s,%" V8PRIdPTR, name, value); | 796 msg.Append("%s,%" V8PRIdPTR, name, value); |
797 msg.WriteToLogFile(); | 797 msg.WriteToLogFile(); |
798 } | 798 } |
799 | 799 |
800 | 800 |
801 void Logger::HandleEvent(const char* name, Object** location) { | 801 void Logger::HandleEvent(const char* name, Object** location) { |
802 if (!log_->IsEnabled() || !FLAG_log_handles) return; | 802 if (!log_->IsEnabled() || !FLAG_log_handles) return; |
803 Log::MessageBuilder msg(log_); | 803 Log::MessageBuilder msg(log_); |
804 msg.Append("%s,%p", name, location); | 804 msg.Append("%s,%p", name, static_cast<void*>(location)); |
805 msg.WriteToLogFile(); | 805 msg.WriteToLogFile(); |
806 } | 806 } |
807 | 807 |
808 | 808 |
809 // ApiEvent is private so all the calls come from the Logger class. It is the | 809 // ApiEvent is private so all the calls come from the Logger class. It is the |
810 // caller's responsibility to ensure that log is enabled and that | 810 // caller's responsibility to ensure that log is enabled and that |
811 // FLAG_log_api is true. | 811 // FLAG_log_api is true. |
812 void Logger::ApiEvent(const char* format, ...) { | 812 void Logger::ApiEvent(const char* format, ...) { |
813 DCHECK(log_->IsEnabled() && FLAG_log_api); | 813 DCHECK(log_->IsEnabled() && FLAG_log_api); |
814 Log::MessageBuilder msg(log_); | 814 Log::MessageBuilder msg(log_); |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 removeCodeEventListener(jit_logger_); | 1851 removeCodeEventListener(jit_logger_); |
1852 delete jit_logger_; | 1852 delete jit_logger_; |
1853 jit_logger_ = NULL; | 1853 jit_logger_ = NULL; |
1854 } | 1854 } |
1855 | 1855 |
1856 return log_->Close(); | 1856 return log_->Close(); |
1857 } | 1857 } |
1858 | 1858 |
1859 } // namespace internal | 1859 } // namespace internal |
1860 } // namespace v8 | 1860 } // namespace v8 |
OLD | NEW |