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