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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 Object* name); | 195 Object* name); |
196 static void ApiIndexedPropertyAccess(const char* tag, | 196 static void ApiIndexedPropertyAccess(const char* tag, |
197 JSObject* holder, | 197 JSObject* holder, |
198 uint32_t index); | 198 uint32_t index); |
199 static void ApiObjectAccess(const char* tag, JSObject* obj); | 199 static void ApiObjectAccess(const char* tag, JSObject* obj); |
200 static void ApiEntryCall(const char* name); | 200 static void ApiEntryCall(const char* name); |
201 | 201 |
202 | 202 |
203 // ==== Events logged by --log-code. ==== | 203 // ==== Events logged by --log-code. ==== |
204 // Emits a code event for a callback function. | 204 // Emits a code event for a callback function. |
205 static void CallbackEvent(const char* class_name, const char* method_name, | 205 static void CallbackEvent(String* name, Address entry_point); |
206 Address entry_point); | |
207 // Emits a code create event. | 206 // Emits a code create event. |
208 static void CodeCreateEvent(LogEventsAndTags tag, | 207 static void CodeCreateEvent(LogEventsAndTags tag, |
209 Code* code, const char* source); | 208 Code* code, const char* source); |
210 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name); | 209 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name); |
211 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name, | 210 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, String* name, |
212 String* source, int line); | 211 String* source, int line); |
213 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count); | 212 static void CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count); |
214 // Emits a code create event for a RegExp. | 213 // Emits a code create event for a RegExp. |
215 static void RegExpCodeCreateEvent(Code* code, String* source); | 214 static void RegExpCodeCreateEvent(Code* code, String* source); |
216 // Emits a code move event. | 215 // Emits a code move event. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 static int GetActiveProfilerModules(); | 263 static int GetActiveProfilerModules(); |
265 | 264 |
266 // If logging is performed into a memory buffer, allows to | 265 // If logging is performed into a memory buffer, allows to |
267 // retrieve previously written messages. See v8.h. | 266 // retrieve previously written messages. See v8.h. |
268 static int GetLogLines(int from_pos, char* dest_buf, int max_size); | 267 static int GetLogLines(int from_pos, char* dest_buf, int max_size); |
269 | 268 |
270 // Logs all compiled functions found in the heap. | 269 // Logs all compiled functions found in the heap. |
271 static void LogCompiledFunctions(); | 270 static void LogCompiledFunctions(); |
272 // Used for logging stubs found in the snapshot. | 271 // Used for logging stubs found in the snapshot. |
273 static void LogCodeObject(Object* code_object); | 272 static void LogCodeObject(Object* code_object); |
274 // Used for logging callback entry points to be able to reveal their | |
275 // names in call stacks when information about native code exports is | |
276 // inaccessible. | |
277 static void LogCallbacks(); | |
278 | 273 |
279 private: | 274 private: |
280 | 275 |
281 // Profiler's sampling interval (in milliseconds). | 276 // Profiler's sampling interval (in milliseconds). |
282 static const int kSamplingIntervalMs = 1; | 277 static const int kSamplingIntervalMs = 1; |
283 | 278 |
284 // Size of window used for log records compression. | 279 // Size of window used for log records compression. |
285 static const int kCompressionWindowSize = 4; | 280 static const int kCompressionWindowSize = 4; |
286 | 281 |
287 // Emits the profiler's first message. | 282 // Emits the profiler's first message. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // Class that extracts stack trace, used for profiling. | 347 // Class that extracts stack trace, used for profiling. |
353 class StackTracer : public AllStatic { | 348 class StackTracer : public AllStatic { |
354 public: | 349 public: |
355 static void Trace(TickSample* sample); | 350 static void Trace(TickSample* sample); |
356 }; | 351 }; |
357 | 352 |
358 | 353 |
359 } } // namespace v8::internal | 354 } } // namespace v8::internal |
360 | 355 |
361 #endif // V8_LOG_H_ | 356 #endif // V8_LOG_H_ |
OLD | NEW |