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. | |
70 if (FLAG_prof_lazy) { | |
71 FLAG_log_code = false; | |
72 } | |
73 | |
74 // If we're logging anything, we need to open the log file. | 69 // If we're logging anything, we need to open the log file. |
75 if (Log::InitLogAtStart()) { | 70 if (Log::InitLogAtStart()) { |
76 if (strcmp(log_file_name, kLogToConsole) == 0) { | 71 if (strcmp(log_file_name, kLogToConsole) == 0) { |
77 OpenStdout(); | 72 OpenStdout(); |
78 } else if (strcmp(log_file_name, kLogToTemporaryFile) == 0) { | 73 } else if (strcmp(log_file_name, kLogToTemporaryFile) == 0) { |
79 OpenTemporaryFile(); | 74 OpenTemporaryFile(); |
80 } else { | 75 } else { |
81 OpenFile(log_file_name); | 76 OpenFile(log_file_name); |
82 } | 77 } |
83 } | 78 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ASSERT(pos_ <= Log::kMessageBufferSize); | 250 ASSERT(pos_ <= Log::kMessageBufferSize); |
256 const int written = log_->WriteToFile(log_->message_buffer_, pos_); | 251 const int written = log_->WriteToFile(log_->message_buffer_, pos_); |
257 if (written != pos_) { | 252 if (written != pos_) { |
258 log_->stop(); | 253 log_->stop(); |
259 log_->logger_->LogFailure(); | 254 log_->logger_->LogFailure(); |
260 } | 255 } |
261 } | 256 } |
262 | 257 |
263 | 258 |
264 } } // namespace v8::internal | 259 } } // namespace v8::internal |
OLD | NEW |