| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } while (false) | 92 } while (false) |
| 93 | 93 |
| 94 #define LOG_CODE_EVENT(isolate, Call) \ | 94 #define LOG_CODE_EVENT(isolate, Call) \ |
| 95 do { \ | 95 do { \ |
| 96 v8::internal::Logger* logger = \ | 96 v8::internal::Logger* logger = \ |
| 97 (isolate)->logger(); \ | 97 (isolate)->logger(); \ |
| 98 if (logger->is_logging_code_events()) \ | 98 if (logger->is_logging_code_events()) \ |
| 99 logger->Call; \ | 99 logger->Call; \ |
| 100 } while (false) | 100 } while (false) |
| 101 | 101 |
| 102 | |
| 103 #define LOG_EVENTS_AND_TAGS_LIST(V) \ | 102 #define LOG_EVENTS_AND_TAGS_LIST(V) \ |
| 104 V(CODE_CREATION_EVENT, "code-creation") \ | 103 V(CODE_CREATION_EVENT, "code-creation") \ |
| 105 V(CODE_MOVE_EVENT, "code-move") \ | 104 V(CODE_MOVE_EVENT, "code-move") \ |
| 106 V(CODE_DELETE_EVENT, "code-delete") \ | 105 V(CODE_DELETE_EVENT, "code-delete") \ |
| 107 V(CODE_MOVING_GC, "code-moving-gc") \ | 106 V(CODE_MOVING_GC, "code-moving-gc") \ |
| 108 V(SHARED_FUNC_MOVE_EVENT, "sfi-move") \ | 107 V(SHARED_FUNC_MOVE_EVENT, "sfi-move") \ |
| 109 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos") \ | 108 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos") \ |
| 110 V(SNAPSHOT_CODE_NAME_EVENT, "snapshot-code-name") \ | 109 V(SNAPSHOT_CODE_NAME_EVENT, "snapshot-code-name") \ |
| 111 V(TICK_EVENT, "tick") \ | 110 V(TICK_EVENT, "tick") \ |
| 112 V(REPEAT_META_EVENT, "repeat") \ | 111 V(REPEAT_META_EVENT, "repeat") \ |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 312 |
| 314 void TimerEvent(StartEnd se, const char* name); | 313 void TimerEvent(StartEnd se, const char* name); |
| 315 | 314 |
| 316 static void EnterExternal(Isolate* isolate); | 315 static void EnterExternal(Isolate* isolate); |
| 317 static void LeaveExternal(Isolate* isolate); | 316 static void LeaveExternal(Isolate* isolate); |
| 318 | 317 |
| 319 class TimerEventScope { | 318 class TimerEventScope { |
| 320 public: | 319 public: |
| 321 TimerEventScope(Isolate* isolate, const char* name) | 320 TimerEventScope(Isolate* isolate, const char* name) |
| 322 : isolate_(isolate), name_(name) { | 321 : isolate_(isolate), name_(name) { |
| 323 if (FLAG_log_internal_timer_events) LogTimerEvent(START); | 322 LogTimerEvent(START); |
| 324 } | 323 } |
| 325 | 324 |
| 326 ~TimerEventScope() { | 325 ~TimerEventScope() { |
| 327 if (FLAG_log_internal_timer_events) LogTimerEvent(END); | 326 LogTimerEvent(END); |
| 328 } | 327 } |
| 329 | 328 |
| 330 void LogTimerEvent(StartEnd se); | 329 void LogTimerEvent(StartEnd se); |
| 331 | 330 |
| 332 static const char* v8_recompile_synchronous; | 331 static const char* v8_recompile_synchronous; |
| 333 static const char* v8_recompile_concurrent; | 332 static const char* v8_recompile_concurrent; |
| 334 static const char* v8_compile_full_code; | 333 static const char* v8_compile_full_code; |
| 335 static const char* v8_execute; | 334 static const char* v8_execute; |
| 336 static const char* v8_external; | 335 static const char* v8_external; |
| 337 | 336 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 int length) = 0; | 536 int length) = 0; |
| 538 | 537 |
| 539 NameBuffer* name_buffer_; | 538 NameBuffer* name_buffer_; |
| 540 }; | 539 }; |
| 541 | 540 |
| 542 | 541 |
| 543 } } // namespace v8::internal | 542 } } // namespace v8::internal |
| 544 | 543 |
| 545 | 544 |
| 546 #endif // V8_LOG_H_ | 545 #endif // V8_LOG_H_ |
| OLD | NEW |