| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 void LogCompiledFunctions(); | 292 void LogCompiledFunctions(); |
| 293 // Logs all accessor callbacks found in the heap. | 293 // Logs all accessor callbacks found in the heap. |
| 294 void LogAccessorCallbacks(); | 294 void LogAccessorCallbacks(); |
| 295 // Used for logging stubs found in the snapshot. | 295 // Used for logging stubs found in the snapshot. |
| 296 void LogCodeObjects(); | 296 void LogCodeObjects(); |
| 297 | 297 |
| 298 // Converts tag to a corresponding NATIVE_... if the script is native. | 298 // Converts tag to a corresponding NATIVE_... if the script is native. |
| 299 INLINE(static LogEventsAndTags ToNativeByScript(LogEventsAndTags, Script*)); | 299 INLINE(static LogEventsAndTags ToNativeByScript(LogEventsAndTags, Script*)); |
| 300 | 300 |
| 301 // Profiler's sampling interval (in milliseconds). | 301 // Profiler's sampling interval (in milliseconds). |
| 302 #if defined(ANDROID) |
| 303 // Phones and tablets have processors that are much slower than desktop |
| 304 // and laptop computers for which current heuristics are tuned. |
| 305 static const int kSamplingIntervalMs = 5; |
| 306 #else |
| 302 static const int kSamplingIntervalMs = 1; | 307 static const int kSamplingIntervalMs = 1; |
| 308 #endif |
| 303 | 309 |
| 304 // Callback from Log, stops profiling in case of insufficient resources. | 310 // Callback from Log, stops profiling in case of insufficient resources. |
| 305 void LogFailure(); | 311 void LogFailure(); |
| 306 | 312 |
| 307 private: | 313 private: |
| 308 class NameBuffer; | 314 class NameBuffer; |
| 309 class NameMap; | 315 class NameMap; |
| 310 | 316 |
| 311 Logger(); | 317 Logger(); |
| 312 ~Logger(); | 318 ~Logger(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 // Class that extracts stack trace, used for profiling. | 473 // Class that extracts stack trace, used for profiling. |
| 468 class StackTracer : public AllStatic { | 474 class StackTracer : public AllStatic { |
| 469 public: | 475 public: |
| 470 static void Trace(Isolate* isolate, TickSample* sample); | 476 static void Trace(Isolate* isolate, TickSample* sample); |
| 471 }; | 477 }; |
| 472 | 478 |
| 473 } } // namespace v8::internal | 479 } } // namespace v8::internal |
| 474 | 480 |
| 475 | 481 |
| 476 #endif // V8_LOG_H_ | 482 #endif // V8_LOG_H_ |
| OLD | NEW |