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