| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 void LogRuntime(Vector<const char> format, JSArray* args); | 274 void LogRuntime(Vector<const char> format, JSArray* args); |
| 275 | 275 |
| 276 #ifdef ENABLE_LOGGING_AND_PROFILING | 276 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 277 bool is_logging() { | 277 bool is_logging() { |
| 278 return logging_nesting_ > 0; | 278 return logging_nesting_ > 0; |
| 279 } | 279 } |
| 280 | 280 |
| 281 // Pause/Resume collection of profiling data. | 281 // Pause/Resume collection of profiling data. |
| 282 // When data collection is paused, CPU Tick events are discarded until | 282 // When data collection is paused, CPU Tick events are discarded until |
| 283 // data collection is Resumed. | 283 // data collection is Resumed. |
| 284 void PauseProfiler(int flags, int tag); | 284 void PauseProfiler(); |
| 285 void ResumeProfiler(int flags, int tag); | 285 void ResumeProfiler(); |
| 286 int GetActiveProfilerModules(); | 286 bool IsProfilerPaused(); |
| 287 | 287 |
| 288 // If logging is performed into a memory buffer, allows to | 288 // If logging is performed into a memory buffer, allows to |
| 289 // retrieve previously written messages. See v8.h. | 289 // retrieve previously written messages. See v8.h. |
| 290 int GetLogLines(int from_pos, char* dest_buf, int max_size); | 290 int GetLogLines(int from_pos, char* dest_buf, int max_size); |
| 291 | 291 |
| 292 // Logs all compiled functions found in the heap. | 292 // Logs all compiled functions found in the heap. |
| 293 void LogCompiledFunctions(); | 293 void LogCompiledFunctions(); |
| 294 // Logs all accessor callbacks found in the heap. | 294 // Logs all accessor callbacks found in the heap. |
| 295 void LogAccessorCallbacks(); | 295 void LogAccessorCallbacks(); |
| 296 // Used for logging stubs found in the snapshot. | 296 // Used for logging stubs found in the snapshot. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 friend class Profiler; | 395 friend class Profiler; |
| 396 friend class SlidingStateWindow; | 396 friend class SlidingStateWindow; |
| 397 friend class StackTracer; | 397 friend class StackTracer; |
| 398 friend class VMState; | 398 friend class VMState; |
| 399 | 399 |
| 400 friend class LoggerTestHelper; | 400 friend class LoggerTestHelper; |
| 401 | 401 |
| 402 | 402 |
| 403 int logging_nesting_; | 403 int logging_nesting_; |
| 404 int cpu_profiler_nesting_; | 404 int cpu_profiler_nesting_; |
| 405 int heap_profiler_nesting_; | |
| 406 | 405 |
| 407 Log* log_; | 406 Log* log_; |
| 408 | 407 |
| 409 NameBuffer* name_buffer_; | 408 NameBuffer* name_buffer_; |
| 410 | 409 |
| 411 NameMap* address_to_name_map_; | 410 NameMap* address_to_name_map_; |
| 412 | 411 |
| 413 // Guards against multiple calls to TearDown() that can happen in some tests. | 412 // Guards against multiple calls to TearDown() that can happen in some tests. |
| 414 // 'true' between Setup() and TearDown(). | 413 // 'true' between Setup() and TearDown(). |
| 415 bool is_initialized_; | 414 bool is_initialized_; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // Class that extracts stack trace, used for profiling. | 467 // Class that extracts stack trace, used for profiling. |
| 469 class StackTracer : public AllStatic { | 468 class StackTracer : public AllStatic { |
| 470 public: | 469 public: |
| 471 static void Trace(Isolate* isolate, TickSample* sample); | 470 static void Trace(Isolate* isolate, TickSample* sample); |
| 472 }; | 471 }; |
| 473 | 472 |
| 474 } } // namespace v8::internal | 473 } } // namespace v8::internal |
| 475 | 474 |
| 476 | 475 |
| 477 #endif // V8_LOG_H_ | 476 #endif // V8_LOG_H_ |
| OLD | NEW |