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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 v8::internal::Logger::Call; \ | 84 v8::internal::Logger::Call; \ |
85 } while (false) | 85 } while (false) |
86 #else | 86 #else |
87 #define LOG(Call) ((void) 0) | 87 #define LOG(Call) ((void) 0) |
88 #endif | 88 #endif |
89 | 89 |
90 #define LOG_EVENTS_AND_TAGS_LIST(V) \ | 90 #define LOG_EVENTS_AND_TAGS_LIST(V) \ |
91 V(CODE_CREATION_EVENT, "code-creation", "cc") \ | 91 V(CODE_CREATION_EVENT, "code-creation", "cc") \ |
92 V(CODE_MOVE_EVENT, "code-move", "cm") \ | 92 V(CODE_MOVE_EVENT, "code-move", "cm") \ |
93 V(CODE_DELETE_EVENT, "code-delete", "cd") \ | 93 V(CODE_DELETE_EVENT, "code-delete", "cd") \ |
| 94 V(CODE_MOVING_GC, "code-moving-gc", "cg") \ |
94 V(FUNCTION_CREATION_EVENT, "function-creation", "fc") \ | 95 V(FUNCTION_CREATION_EVENT, "function-creation", "fc") \ |
95 V(FUNCTION_MOVE_EVENT, "function-move", "fm") \ | 96 V(FUNCTION_MOVE_EVENT, "function-move", "fm") \ |
96 V(FUNCTION_DELETE_EVENT, "function-delete", "fd") \ | 97 V(FUNCTION_DELETE_EVENT, "function-delete", "fd") \ |
97 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos", "sp") \ | 98 V(SNAPSHOT_POSITION_EVENT, "snapshot-pos", "sp") \ |
98 V(TICK_EVENT, "tick", "t") \ | 99 V(TICK_EVENT, "tick", "t") \ |
99 V(REPEAT_META_EVENT, "repeat", "r") \ | 100 V(REPEAT_META_EVENT, "repeat", "r") \ |
100 V(BUILTIN_TAG, "Builtin", "bi") \ | 101 V(BUILTIN_TAG, "Builtin", "bi") \ |
101 V(CALL_DEBUG_BREAK_TAG, "CallDebugBreak", "cdb") \ | 102 V(CALL_DEBUG_BREAK_TAG, "CallDebugBreak", "cdb") \ |
102 V(CALL_DEBUG_PREPARE_STEP_IN_TAG, "CallDebugPrepareStepIn", "cdbsi") \ | 103 V(CALL_DEBUG_PREPARE_STEP_IN_TAG, "CallDebugPrepareStepIn", "cdbsi") \ |
103 V(CALL_IC_TAG, "CallIC", "cic") \ | 104 V(CALL_IC_TAG, "CallIC", "cic") \ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 static void CallbackEvent(String* name, Address entry_point); | 203 static void CallbackEvent(String* name, Address entry_point); |
203 static void GetterCallbackEvent(String* name, Address entry_point); | 204 static void GetterCallbackEvent(String* name, Address entry_point); |
204 static void SetterCallbackEvent(String* name, Address entry_point); | 205 static void SetterCallbackEvent(String* name, Address entry_point); |
205 // Emits a code create event. | 206 // Emits a code create event. |
206 static void CodeCreateEvent(LogEventsAndTags tag, | 207 static void CodeCreateEvent(LogEventsAndTags tag, |
207 Code* code, const char* source); | 208 Code* code, const char* source); |
208 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name); | 209 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name); |
209 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name, | 210 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name, |
210 String* source, int line); | 211 String* source, int line); |
211 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count); | 212 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count); |
| 213 static void CodeMovingGCEvent(); |
212 // Emits a code create event for a RegExp. | 214 // Emits a code create event for a RegExp. |
213 static void RegExpCodeCreateEvent(Code* code, String* source); | 215 static void RegExpCodeCreateEvent(Code* code, String* source); |
214 // Emits a code move event. | 216 // Emits a code move event. |
215 static void CodeMoveEvent(Address from, Address to); | 217 static void CodeMoveEvent(Address from, Address to); |
216 // Emits a code delete event. | 218 // Emits a code delete event. |
217 static void CodeDeleteEvent(Address from); | 219 static void CodeDeleteEvent(Address from); |
218 // Emits a function object create event. | 220 // Emits a function object create event. |
219 static void FunctionCreateEvent(JSFunction* function); | 221 static void FunctionCreateEvent(JSFunction* function); |
220 static void FunctionCreateEventFromMove(JSFunction* function, | 222 static void FunctionCreateEventFromMove(JSFunction* function, |
221 HeapObject*); | 223 HeapObject*); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 312 |
311 // Emits aliases for compressed messages. | 313 // Emits aliases for compressed messages. |
312 static void LogAliases(); | 314 static void LogAliases(); |
313 | 315 |
314 // Emits the source code of a regexp. Used by regexp events. | 316 // Emits the source code of a regexp. Used by regexp events. |
315 static void LogRegExpSource(Handle<JSRegExp> regexp); | 317 static void LogRegExpSource(Handle<JSRegExp> regexp); |
316 | 318 |
317 // Used for logging stubs found in the snapshot. | 319 // Used for logging stubs found in the snapshot. |
318 static void LogCodeObject(Object* code_object); | 320 static void LogCodeObject(Object* code_object); |
319 | 321 |
| 322 // Emits general information about generated code. |
| 323 static void LogCodeInfo(); |
| 324 |
| 325 // Handles code creation when low-level profiling is active. |
| 326 static void LowLevelCodeCreateEvent(Code* code, LogMessageBuilder* msg); |
| 327 |
320 // Emits a profiler tick event. Used by the profiler thread. | 328 // Emits a profiler tick event. Used by the profiler thread. |
321 static void TickEvent(TickSample* sample, bool overflow); | 329 static void TickEvent(TickSample* sample, bool overflow); |
322 | 330 |
323 static void ApiEvent(const char* name, ...); | 331 static void ApiEvent(const char* name, ...); |
324 | 332 |
325 // Logs a StringEvent regardless of whether FLAG_log is true. | 333 // Logs a StringEvent regardless of whether FLAG_log is true. |
326 static void UncheckedStringEvent(const char* name, const char* value); | 334 static void UncheckedStringEvent(const char* name, const char* value); |
327 | 335 |
328 // Logs an IntEvent regardless of whether FLAG_log is true. | 336 // Logs an IntEvent regardless of whether FLAG_log is true. |
329 static void UncheckedIntEvent(const char* name, int value); | 337 static void UncheckedIntEvent(const char* name, int value); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 // Class that extracts stack trace, used for profiling. | 387 // Class that extracts stack trace, used for profiling. |
380 class StackTracer : public AllStatic { | 388 class StackTracer : public AllStatic { |
381 public: | 389 public: |
382 static void Trace(TickSample* sample); | 390 static void Trace(TickSample* sample); |
383 }; | 391 }; |
384 | 392 |
385 } } // namespace v8::internal | 393 } } // namespace v8::internal |
386 | 394 |
387 | 395 |
388 #endif // V8_LOG_H_ | 396 #endif // V8_LOG_H_ |
OLD | NEW |