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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // retrieve previously written messages. See v8.h. | 285 // retrieve previously written messages. See v8.h. |
286 static int GetLogLines(int from_pos, char* dest_buf, int max_size); | 286 static int GetLogLines(int from_pos, char* dest_buf, int max_size); |
287 | 287 |
288 // Logs all compiled functions found in the heap. | 288 // Logs all compiled functions found in the heap. |
289 static void LogCompiledFunctions(); | 289 static void LogCompiledFunctions(); |
290 // Logs all compiled JSFunction objects found in the heap. | 290 // Logs all compiled JSFunction objects found in the heap. |
291 static void LogFunctionObjects(); | 291 static void LogFunctionObjects(); |
292 // Logs all accessor callbacks found in the heap. | 292 // Logs all accessor callbacks found in the heap. |
293 static void LogAccessorCallbacks(); | 293 static void LogAccessorCallbacks(); |
294 // Used for logging stubs found in the snapshot. | 294 // Used for logging stubs found in the snapshot. |
295 static void LogCodeObject(Object* code_object); | 295 static void LogCodeObjects(); |
296 | 296 |
297 private: | 297 private: |
298 | 298 |
299 // Profiler's sampling interval (in milliseconds). | 299 // Profiler's sampling interval (in milliseconds). |
300 static const int kSamplingIntervalMs = 1; | 300 static const int kSamplingIntervalMs = 1; |
301 | 301 |
302 // Size of window used for log records compression. | 302 // Size of window used for log records compression. |
303 static const int kCompressionWindowSize = 4; | 303 static const int kCompressionWindowSize = 4; |
304 | 304 |
305 // Emits the profiler's first message. | 305 // Emits the profiler's first message. |
(...skipping 12 matching lines...) Expand all Loading... |
318 // Internal configurable move event. | 318 // Internal configurable move event. |
319 static void DeleteEventInternal(LogEventsAndTags event, | 319 static void DeleteEventInternal(LogEventsAndTags event, |
320 Address from); | 320 Address from); |
321 | 321 |
322 // Emits aliases for compressed messages. | 322 // Emits aliases for compressed messages. |
323 static void LogAliases(); | 323 static void LogAliases(); |
324 | 324 |
325 // Emits the source code of a regexp. Used by regexp events. | 325 // Emits the source code of a regexp. Used by regexp events. |
326 static void LogRegExpSource(Handle<JSRegExp> regexp); | 326 static void LogRegExpSource(Handle<JSRegExp> regexp); |
327 | 327 |
| 328 // Used for logging stubs found in the snapshot. |
| 329 static void LogCodeObject(Object* code_object); |
| 330 |
328 // Emits a profiler tick event. Used by the profiler thread. | 331 // Emits a profiler tick event. Used by the profiler thread. |
329 static void TickEvent(TickSample* sample, bool overflow); | 332 static void TickEvent(TickSample* sample, bool overflow); |
330 | 333 |
331 static void ApiEvent(const char* name, ...); | 334 static void ApiEvent(const char* name, ...); |
332 | 335 |
333 // Logs a StringEvent regardless of whether FLAG_log is true. | 336 // Logs a StringEvent regardless of whether FLAG_log is true. |
334 static void UncheckedStringEvent(const char* name, const char* value); | 337 static void UncheckedStringEvent(const char* name, const char* value); |
335 | 338 |
336 // Stops logging and profiling in case of insufficient resources. | 339 // Stops logging and profiling in case of insufficient resources. |
337 static void StopLoggingAndProfiling(); | 340 static void StopLoggingAndProfiling(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // Class that extracts stack trace, used for profiling. | 388 // Class that extracts stack trace, used for profiling. |
386 class StackTracer : public AllStatic { | 389 class StackTracer : public AllStatic { |
387 public: | 390 public: |
388 static void Trace(TickSample* sample); | 391 static void Trace(TickSample* sample); |
389 }; | 392 }; |
390 | 393 |
391 | 394 |
392 } } // namespace v8::internal | 395 } } // namespace v8::internal |
393 | 396 |
394 #endif // V8_LOG_H_ | 397 #endif // V8_LOG_H_ |
OLD | NEW |