| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // ==== Events logged by --log-timer-events. ==== | 309 // ==== Events logged by --log-timer-events. ==== |
| 310 enum StartEnd { START, END }; | 310 enum StartEnd { START, END }; |
| 311 | 311 |
| 312 void CodeDeoptEvent(Code* code); | 312 void CodeDeoptEvent(Code* code); |
| 313 | 313 |
| 314 void TimerEvent(StartEnd se, const char* name); | 314 void TimerEvent(StartEnd se, const char* name); |
| 315 | 315 |
| 316 static void EnterExternal(Isolate* isolate); | 316 static void EnterExternal(Isolate* isolate); |
| 317 static void LeaveExternal(Isolate* isolate); | 317 static void LeaveExternal(Isolate* isolate); |
| 318 | 318 |
| 319 static void EmptyLogInternalEvents(const char* name, int se) { } |
| 320 static void LogInternalEvents(const char* name, int se); |
| 321 |
| 319 class TimerEventScope { | 322 class TimerEventScope { |
| 320 public: | 323 public: |
| 321 TimerEventScope(Isolate* isolate, const char* name) | 324 TimerEventScope(Isolate* isolate, const char* name) |
| 322 : isolate_(isolate), name_(name) { | 325 : isolate_(isolate), name_(name) { |
| 323 if (FLAG_log_internal_timer_events) LogTimerEvent(START); | 326 LogTimerEvent(START); |
| 324 } | 327 } |
| 325 | 328 |
| 326 ~TimerEventScope() { | 329 ~TimerEventScope() { |
| 327 if (FLAG_log_internal_timer_events) LogTimerEvent(END); | 330 LogTimerEvent(END); |
| 328 } | 331 } |
| 329 | 332 |
| 330 void LogTimerEvent(StartEnd se); | 333 void LogTimerEvent(StartEnd se); |
| 331 | 334 |
| 332 static const char* v8_recompile_synchronous; | 335 static const char* v8_recompile_synchronous; |
| 333 static const char* v8_recompile_concurrent; | 336 static const char* v8_recompile_concurrent; |
| 334 static const char* v8_compile_full_code; | 337 static const char* v8_compile_full_code; |
| 335 static const char* v8_execute; | 338 static const char* v8_execute; |
| 336 static const char* v8_external; | 339 static const char* v8_external; |
| 337 | 340 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 int length) = 0; | 540 int length) = 0; |
| 538 | 541 |
| 539 NameBuffer* name_buffer_; | 542 NameBuffer* name_buffer_; |
| 540 }; | 543 }; |
| 541 | 544 |
| 542 | 545 |
| 543 } } // namespace v8::internal | 546 } } // namespace v8::internal |
| 544 | 547 |
| 545 | 548 |
| 546 #endif // V8_LOG_H_ | 549 #endif // V8_LOG_H_ |
| OLD | NEW |