OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 void WriteToLogFile(); | 273 void WriteToLogFile(); |
274 | 274 |
275 private: | 275 private: |
276 ScopedLock sl; | 276 ScopedLock sl; |
277 int pos_; | 277 int pos_; |
278 }; | 278 }; |
279 | 279 |
280 | 280 |
281 // Create a message builder starting from position 0. This acquires the mutex | 281 // Create a message builder starting from position 0. This acquires the mutex |
282 // in the logger as well. | 282 // in the logger as well. |
283 LogMessageBuilder::LogMessageBuilder(): pos_(0), sl(Logger::mutex_) { | 283 LogMessageBuilder::LogMessageBuilder(): sl(Logger::mutex_), pos_(0) { |
284 ASSERT(Logger::message_buffer_ != NULL); | 284 ASSERT(Logger::message_buffer_ != NULL); |
285 } | 285 } |
286 | 286 |
287 | 287 |
288 // Append string data to the log message. | 288 // Append string data to the log message. |
289 void LogMessageBuilder::Append(const char* format, ...) { | 289 void LogMessageBuilder::Append(const char* format, ...) { |
290 Vector<char> buf(Logger::message_buffer_ + pos_, | 290 Vector<char> buf(Logger::message_buffer_ + pos_, |
291 Logger::kMessageBufferSize - pos_); | 291 Logger::kMessageBufferSize - pos_); |
292 va_list args; | 292 va_list args; |
293 va_start(args, format); | 293 va_start(args, format); |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 if (FLAG_log_state_changes) { | 1045 if (FLAG_log_state_changes) { |
1046 LOG(UncheckedStringEvent("Leaving", StateToString(state_))); | 1046 LOG(UncheckedStringEvent("Leaving", StateToString(state_))); |
1047 if (previous_) { | 1047 if (previous_) { |
1048 LOG(UncheckedStringEvent("To", StateToString(previous_->state_))); | 1048 LOG(UncheckedStringEvent("To", StateToString(previous_->state_))); |
1049 } | 1049 } |
1050 } | 1050 } |
1051 } | 1051 } |
1052 #endif | 1052 #endif |
1053 | 1053 |
1054 } } // namespace v8::internal | 1054 } } // namespace v8::internal |
OLD | NEW |