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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 | 1293 |
1294 if (!is_logging_code_events()) return; | 1294 if (!is_logging_code_events()) return; |
1295 CALL_LISTENERS(CodeDisableOptEvent(code, shared)); | 1295 CALL_LISTENERS(CodeDisableOptEvent(code, shared)); |
1296 | 1296 |
1297 if (!FLAG_log_code || !log_->IsEnabled()) return; | 1297 if (!FLAG_log_code || !log_->IsEnabled()) return; |
1298 Log::MessageBuilder msg(log_); | 1298 Log::MessageBuilder msg(log_); |
1299 msg.Append("%s,", kLogEventsNames[CODE_DISABLE_OPT_EVENT]); | 1299 msg.Append("%s,", kLogEventsNames[CODE_DISABLE_OPT_EVENT]); |
1300 SmartArrayPointer<char> name = | 1300 SmartArrayPointer<char> name = |
1301 shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); | 1301 shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
1302 msg.Append("\"%s\",", name.get()); | 1302 msg.Append("\"%s\",", name.get()); |
1303 msg.Append("\"%s\"", GetBailoutReason(shared->DisableOptimizationReason())); | 1303 msg.Append("\"%s\"", GetBailoutReason(shared->disable_optimization_reason())); |
1304 msg.WriteToLogFile(); | 1304 msg.WriteToLogFile(); |
1305 } | 1305 } |
1306 | 1306 |
1307 | 1307 |
1308 void Logger::CodeMovingGCEvent() { | 1308 void Logger::CodeMovingGCEvent() { |
1309 PROFILER_LOG(CodeMovingGCEvent()); | 1309 PROFILER_LOG(CodeMovingGCEvent()); |
1310 | 1310 |
1311 if (!is_logging_code_events()) return; | 1311 if (!is_logging_code_events()) return; |
1312 if (!log_->IsEnabled() || !FLAG_ll_prof) return; | 1312 if (!log_->IsEnabled() || !FLAG_ll_prof) return; |
1313 CALL_LISTENERS(CodeMovingGCEvent()); | 1313 CALL_LISTENERS(CodeMovingGCEvent()); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1931 if (jit_logger_) { | 1931 if (jit_logger_) { |
1932 removeCodeEventListener(jit_logger_); | 1932 removeCodeEventListener(jit_logger_); |
1933 delete jit_logger_; | 1933 delete jit_logger_; |
1934 jit_logger_ = NULL; | 1934 jit_logger_ = NULL; |
1935 } | 1935 } |
1936 | 1936 |
1937 return log_->Close(); | 1937 return log_->Close(); |
1938 } | 1938 } |
1939 | 1939 |
1940 } } // namespace v8::internal | 1940 } } // namespace v8::internal |
OLD | NEW |