| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 explicit VMState(StateTag state) {} | 100 explicit VMState(StateTag state) {} |
| 101 #endif | 101 #endif |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 | 104 |
| 105 #define LOG_EVENTS_AND_TAGS_LIST(V) \ | 105 #define LOG_EVENTS_AND_TAGS_LIST(V) \ |
| 106 V(CODE_CREATION_EVENT, "code-creation", "cc") \ | 106 V(CODE_CREATION_EVENT, "code-creation", "cc") \ |
| 107 V(CODE_MOVE_EVENT, "code-move", "cm") \ | 107 V(CODE_MOVE_EVENT, "code-move", "cm") \ |
| 108 V(CODE_DELETE_EVENT, "code-delete", "cd") \ | 108 V(CODE_DELETE_EVENT, "code-delete", "cd") \ |
| 109 V(TICK_EVENT, "tick", "t") \ | 109 V(TICK_EVENT, "tick", "t") \ |
| 110 V(REPEAT_META_EVENT, "repeat", "r") \ |
| 110 V(BUILTIN_TAG, "Builtin", "bi") \ | 111 V(BUILTIN_TAG, "Builtin", "bi") \ |
| 111 V(CALL_DEBUG_BREAK_TAG, "CallDebugBreak", "cdb") \ | 112 V(CALL_DEBUG_BREAK_TAG, "CallDebugBreak", "cdb") \ |
| 112 V(CALL_DEBUG_PREPARE_STEP_IN_TAG, "CallDebugPrepareStepIn", "cdbsi") \ | 113 V(CALL_DEBUG_PREPARE_STEP_IN_TAG, "CallDebugPrepareStepIn", "cdbsi") \ |
| 113 V(CALL_IC_TAG, "CallIC", "cic") \ | 114 V(CALL_IC_TAG, "CallIC", "cic") \ |
| 114 V(CALL_INITIALIZE_TAG, "CallInitialize", "ci") \ | 115 V(CALL_INITIALIZE_TAG, "CallInitialize", "ci") \ |
| 115 V(CALL_MEGAMORPHIC_TAG, "CallMegamorphic", "cmm") \ | 116 V(CALL_MEGAMORPHIC_TAG, "CallMegamorphic", "cmm") \ |
| 116 V(CALL_MISS_TAG, "CallMiss", "cm") \ | 117 V(CALL_MISS_TAG, "CallMiss", "cm") \ |
| 117 V(CALL_NORMAL_TAG, "CallNormal", "cn") \ | 118 V(CALL_NORMAL_TAG, "CallNormal", "cn") \ |
| 118 V(CALL_PRE_MONOMORPHIC_TAG, "CallPreMonomorphic", "cpm") \ | 119 V(CALL_PRE_MONOMORPHIC_TAG, "CallPreMonomorphic", "cpm") \ |
| 119 V(EVAL_TAG, "Eval", "e") \ | 120 V(EVAL_TAG, "Eval", "e") \ |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // Singleton bottom or default vm state. | 293 // Singleton bottom or default vm state. |
| 293 static VMState bottom_state_; | 294 static VMState bottom_state_; |
| 294 | 295 |
| 295 // SlidingStateWindow instance keeping a sliding window of the most | 296 // SlidingStateWindow instance keeping a sliding window of the most |
| 296 // recent VM states. | 297 // recent VM states. |
| 297 static SlidingStateWindow* sliding_state_window_; | 298 static SlidingStateWindow* sliding_state_window_; |
| 298 | 299 |
| 299 // An array of log events names. | 300 // An array of log events names. |
| 300 static const char** log_events_; | 301 static const char** log_events_; |
| 301 | 302 |
| 303 // Counter for repeated tick events. |
| 304 static int tick_repeat_count_; |
| 305 |
| 302 // Internal implementation classes with access to | 306 // Internal implementation classes with access to |
| 303 // private members. | 307 // private members. |
| 304 friend class EventLog; | 308 friend class EventLog; |
| 305 friend class TimeLog; | 309 friend class TimeLog; |
| 306 friend class Profiler; | 310 friend class Profiler; |
| 307 friend class SlidingStateWindow; | 311 friend class SlidingStateWindow; |
| 308 friend class VMState; | 312 friend class VMState; |
| 309 | 313 |
| 310 friend class LoggerTestHelper; | 314 friend class LoggerTestHelper; |
| 311 #else | 315 #else |
| 312 static bool is_enabled() { return false; } | 316 static bool is_enabled() { return false; } |
| 313 #endif | 317 #endif |
| 314 }; | 318 }; |
| 315 | 319 |
| 316 | 320 |
| 317 // Class that extracts stack trace, used for profiling. | 321 // Class that extracts stack trace, used for profiling. |
| 318 class StackTracer : public AllStatic { | 322 class StackTracer : public AllStatic { |
| 319 public: | 323 public: |
| 320 static void Trace(TickSample* sample); | 324 static void Trace(TickSample* sample); |
| 321 }; | 325 }; |
| 322 | 326 |
| 323 | 327 |
| 324 } } // namespace v8::internal | 328 } } // namespace v8::internal |
| 325 | 329 |
| 326 #endif // V8_LOG_H_ | 330 #endif // V8_LOG_H_ |
| OLD | NEW |