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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 uintptr_t start, | 273 uintptr_t start, |
274 uintptr_t end); | 274 uintptr_t end); |
275 void SharedLibraryEvent(const wchar_t* library_path, | 275 void SharedLibraryEvent(const wchar_t* library_path, |
276 uintptr_t start, | 276 uintptr_t start, |
277 uintptr_t end); | 277 uintptr_t end); |
278 | 278 |
279 // ==== Events logged by --log-timer-events. ==== | 279 // ==== Events logged by --log-timer-events. ==== |
280 void TimerEvent(const char* name, int64_t start, int64_t end); | 280 void TimerEvent(const char* name, int64_t start, int64_t end); |
281 void ExternalSwitch(StateTag old_tag, StateTag new_tag); | 281 void ExternalSwitch(StateTag old_tag, StateTag new_tag); |
282 | 282 |
| 283 static void EnterExternal(); |
| 284 static void LeaveExternal(); |
| 285 |
283 class TimerEventScope { | 286 class TimerEventScope { |
284 public: | 287 public: |
285 TimerEventScope(Isolate* isolate, const char* name) | 288 TimerEventScope(Isolate* isolate, const char* name) |
286 : isolate_(isolate), name_(name), start_(0) { | 289 : isolate_(isolate), name_(name), start_(0) { |
287 if (FLAG_log_timer_events) start_ = OS::Ticks(); | 290 if (FLAG_log_timer_events) start_ = OS::Ticks(); |
288 } | 291 } |
289 | 292 |
290 ~TimerEventScope() { | 293 ~TimerEventScope() { |
291 if (FLAG_log_timer_events) LogTimerEvent(); | 294 if (FLAG_log_timer_events) LogTimerEvent(); |
292 } | 295 } |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // Class that extracts stack trace, used for profiling. | 525 // Class that extracts stack trace, used for profiling. |
523 class StackTracer : public AllStatic { | 526 class StackTracer : public AllStatic { |
524 public: | 527 public: |
525 static void Trace(Isolate* isolate, TickSample* sample); | 528 static void Trace(Isolate* isolate, TickSample* sample); |
526 }; | 529 }; |
527 | 530 |
528 } } // namespace v8::internal | 531 } } // namespace v8::internal |
529 | 532 |
530 | 533 |
531 #endif // V8_LOG_H_ | 534 #endif // V8_LOG_H_ |
OLD | NEW |