| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 FLAG_log_gc = true; | 59 FLAG_log_gc = true; |
| 60 FLAG_log_suspect = true; | 60 FLAG_log_suspect = true; |
| 61 FLAG_log_handles = true; | 61 FLAG_log_handles = true; |
| 62 FLAG_log_regexp = true; | 62 FLAG_log_regexp = true; |
| 63 FLAG_log_internal_timer_events = true; | 63 FLAG_log_internal_timer_events = true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 // --prof implies --log-code. | 66 // --prof implies --log-code. |
| 67 if (FLAG_prof) FLAG_log_code = true; | 67 if (FLAG_prof) FLAG_log_code = true; |
| 68 | 68 |
| 69 // --prof_lazy controls --log-code, implies --noprof_auto. | 69 // --prof_lazy controls --log-code. |
| 70 if (FLAG_prof_lazy) { | 70 if (FLAG_prof_lazy) { |
| 71 FLAG_log_code = false; | 71 FLAG_log_code = false; |
| 72 FLAG_prof_auto = false; | |
| 73 } | 72 } |
| 74 | 73 |
| 75 // If we're logging anything, we need to open the log file. | 74 // If we're logging anything, we need to open the log file. |
| 76 if (Log::InitLogAtStart()) { | 75 if (Log::InitLogAtStart()) { |
| 77 if (strcmp(log_file_name, kLogToConsole) == 0) { | 76 if (strcmp(log_file_name, kLogToConsole) == 0) { |
| 78 OpenStdout(); | 77 OpenStdout(); |
| 79 } else if (strcmp(log_file_name, kLogToTemporaryFile) == 0) { | 78 } else if (strcmp(log_file_name, kLogToTemporaryFile) == 0) { |
| 80 OpenTemporaryFile(); | 79 OpenTemporaryFile(); |
| 81 } else { | 80 } else { |
| 82 OpenFile(log_file_name); | 81 OpenFile(log_file_name); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 ASSERT(pos_ <= Log::kMessageBufferSize); | 255 ASSERT(pos_ <= Log::kMessageBufferSize); |
| 257 const int written = log_->WriteToFile(log_->message_buffer_, pos_); | 256 const int written = log_->WriteToFile(log_->message_buffer_, pos_); |
| 258 if (written != pos_) { | 257 if (written != pos_) { |
| 259 log_->stop(); | 258 log_->stop(); |
| 260 log_->logger_->LogFailure(); | 259 log_->logger_->LogFailure(); |
| 261 } | 260 } |
| 262 } | 261 } |
| 263 | 262 |
| 264 | 263 |
| 265 } } // namespace v8::internal | 264 } } // namespace v8::internal |
| OLD | NEW |