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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 class Ticker; | 68 class Ticker; |
69 class Profiler; | 69 class Profiler; |
70 class Semaphore; | 70 class Semaphore; |
71 class SlidingStateWindow; | 71 class SlidingStateWindow; |
72 class LogMessageBuilder; | 72 class LogMessageBuilder; |
73 | 73 |
74 #undef LOG | 74 #undef LOG |
75 #ifdef ENABLE_LOGGING_AND_PROFILING | 75 #ifdef ENABLE_LOGGING_AND_PROFILING |
76 #define LOG(Call) \ | 76 #define LOG(Call) \ |
77 do { \ | 77 do { \ |
78 if (v8::internal::Logger::is_enabled()) \ | 78 if (v8::internal::Logger::IsEnabled()) \ |
79 v8::internal::Logger::Call; \ | 79 v8::internal::Logger::Call; \ |
80 } while (false) | 80 } while (false) |
81 #else | 81 #else |
82 #define LOG(Call) ((void) 0) | 82 #define LOG(Call) ((void) 0) |
83 #endif | 83 #endif |
84 | 84 |
85 | 85 |
86 class VMState BASE_EMBEDDED { | 86 class VMState BASE_EMBEDDED { |
87 #ifdef ENABLE_LOGGING_AND_PROFILING | 87 #ifdef ENABLE_LOGGING_AND_PROFILING |
88 public: | 88 public: |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 static void RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache); | 194 static void RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache); |
195 | 195 |
196 // Log an event reported from generated code | 196 // Log an event reported from generated code |
197 static void LogRuntime(Vector<const char> format, JSArray* args); | 197 static void LogRuntime(Vector<const char> format, JSArray* args); |
198 | 198 |
199 #ifdef ENABLE_LOGGING_AND_PROFILING | 199 #ifdef ENABLE_LOGGING_AND_PROFILING |
200 static StateTag state() { | 200 static StateTag state() { |
201 return current_state_ ? current_state_->state() : OTHER; | 201 return current_state_ ? current_state_->state() : OTHER; |
202 } | 202 } |
203 | 203 |
204 static bool is_enabled(); | 204 static bool IsEnabled(); |
205 | 205 |
206 // Pause/Resume collection of profiling data. | 206 // Pause/Resume collection of profiling data. |
207 // When data collection is paused, Tick events are discarded until | 207 // When data collection is paused, Tick events are discarded until |
208 // data collection is Resumed. | 208 // data collection is Resumed. |
209 static bool IsProfilerPaused(); | 209 static bool IsProfilerPaused(); |
210 static void PauseProfiler(); | 210 static void PauseProfiler(); |
211 static void ResumeProfiler(); | 211 static void ResumeProfiler(); |
212 | 212 |
213 // If logging is performed into a memory buffer, allows to | 213 // If logging is performed into a memory buffer, allows to |
214 // retrieve previously written messages. See v8.h. | 214 // retrieve previously written messages. See v8.h. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 void Trace(TickSample* sample); | 269 void Trace(TickSample* sample); |
270 private: | 270 private: |
271 | 271 |
272 uintptr_t low_stack_bound_; | 272 uintptr_t low_stack_bound_; |
273 }; | 273 }; |
274 | 274 |
275 | 275 |
276 } } // namespace v8::internal | 276 } } // namespace v8::internal |
277 | 277 |
278 #endif // V8_LOG_H_ | 278 #endif // V8_LOG_H_ |
OLD | NEW |