| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "log-utils.h" | 7 #include "log-utils.h" |
| 8 #include "string-stream.h" | 8 #include "string-stream.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 message_buffer_(NULL), | 21 message_buffer_(NULL), |
| 22 logger_(logger) { | 22 logger_(logger) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| 26 void Log::Initialize(const char* log_file_name) { | 26 void Log::Initialize(const char* log_file_name) { |
| 27 message_buffer_ = NewArray<char>(kMessageBufferSize); | 27 message_buffer_ = NewArray<char>(kMessageBufferSize); |
| 28 | 28 |
| 29 // --log-all enables all the log flags. | 29 // --log-all enables all the log flags. |
| 30 if (FLAG_log_all) { | 30 if (FLAG_log_all) { |
| 31 FLAG_log_runtime = true; | |
| 32 FLAG_log_api = true; | 31 FLAG_log_api = true; |
| 33 FLAG_log_code = true; | 32 FLAG_log_code = true; |
| 34 FLAG_log_gc = true; | 33 FLAG_log_gc = true; |
| 35 FLAG_log_suspect = true; | 34 FLAG_log_suspect = true; |
| 36 FLAG_log_handles = true; | 35 FLAG_log_handles = true; |
| 37 FLAG_log_regexp = true; | 36 FLAG_log_regexp = true; |
| 38 FLAG_log_internal_timer_events = true; | 37 FLAG_log_internal_timer_events = true; |
| 39 } | 38 } |
| 40 | 39 |
| 41 // --prof implies --log-code. | 40 // --prof implies --log-code. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 ASSERT(pos_ <= Log::kMessageBufferSize); | 221 ASSERT(pos_ <= Log::kMessageBufferSize); |
| 223 const int written = log_->WriteToFile(log_->message_buffer_, pos_); | 222 const int written = log_->WriteToFile(log_->message_buffer_, pos_); |
| 224 if (written != pos_) { | 223 if (written != pos_) { |
| 225 log_->stop(); | 224 log_->stop(); |
| 226 log_->logger_->LogFailure(); | 225 log_->logger_->LogFailure(); |
| 227 } | 226 } |
| 228 } | 227 } |
| 229 | 228 |
| 230 | 229 |
| 231 } } // namespace v8::internal | 230 } } // namespace v8::internal |
| OLD | NEW |