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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 for (int i = 0; i < NUMBER_OF_LOG_EVENTS; ++i) { | 363 for (int i = 0; i < NUMBER_OF_LOG_EVENTS; ++i) { |
364 msg.Append("alias,%s,%s\n", | 364 msg.Append("alias,%s,%s\n", |
365 kCompressedLogEventsNames[i], kLongLogEventsNames[i]); | 365 kCompressedLogEventsNames[i], kLongLogEventsNames[i]); |
366 } | 366 } |
367 msg.WriteToLogFile(); | 367 msg.WriteToLogFile(); |
368 } | 368 } |
369 | 369 |
370 #endif // ENABLE_LOGGING_AND_PROFILING | 370 #endif // ENABLE_LOGGING_AND_PROFILING |
371 | 371 |
372 | 372 |
373 void Logger::Preamble(const char* content) { | |
374 #ifdef ENABLE_LOGGING_AND_PROFILING | |
375 if (!Log::IsEnabled() || !FLAG_log_code) return; | |
376 LogMessageBuilder msg; | |
377 msg.WriteCStringToLogFile(content); | |
378 #endif | |
379 } | |
380 | |
381 | |
382 void Logger::StringEvent(const char* name, const char* value) { | 373 void Logger::StringEvent(const char* name, const char* value) { |
383 #ifdef ENABLE_LOGGING_AND_PROFILING | 374 #ifdef ENABLE_LOGGING_AND_PROFILING |
384 if (FLAG_log) UncheckedStringEvent(name, value); | 375 if (FLAG_log) UncheckedStringEvent(name, value); |
385 #endif | 376 #endif |
386 } | 377 } |
387 | 378 |
388 | 379 |
389 #ifdef ENABLE_LOGGING_AND_PROFILING | 380 #ifdef ENABLE_LOGGING_AND_PROFILING |
390 void Logger::UncheckedStringEvent(const char* name, const char* value) { | 381 void Logger::UncheckedStringEvent(const char* name, const char* value) { |
391 if (!Log::IsEnabled()) return; | 382 if (!Log::IsEnabled()) return; |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 // Otherwise, if the sliding state window computation has not been | 1544 // Otherwise, if the sliding state window computation has not been |
1554 // started we do it now. | 1545 // started we do it now. |
1555 if (sliding_state_window_ == NULL) { | 1546 if (sliding_state_window_ == NULL) { |
1556 sliding_state_window_ = new SlidingStateWindow(); | 1547 sliding_state_window_ = new SlidingStateWindow(); |
1557 } | 1548 } |
1558 #endif | 1549 #endif |
1559 } | 1550 } |
1560 | 1551 |
1561 | 1552 |
1562 } } // namespace v8::internal | 1553 } } // namespace v8::internal |
OLD | NEW |