Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Side by Side Diff: src/log.h

Issue 8700008: New approach to Crankshaft decision-making (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 LOG_EVENTS_AND_TAGS_LIST(DECLARE_ENUM) 147 LOG_EVENTS_AND_TAGS_LIST(DECLARE_ENUM)
148 NUMBER_OF_LOG_EVENTS 148 NUMBER_OF_LOG_EVENTS
149 }; 149 };
150 #undef DECLARE_ENUM 150 #undef DECLARE_ENUM
151 151
152 // Acquires resources for logging if the right flags are set. 152 // Acquires resources for logging if the right flags are set.
153 bool Setup(); 153 bool Setup();
154 154
155 void EnsureTickerStarted(); 155 void EnsureTickerStarted();
156 void EnsureTickerStopped(); 156 void EnsureTickerStopped();
157 void ResetTickerInterval();
157 158
158 Sampler* sampler(); 159 Sampler* sampler();
159 160
160 // Frees resources acquired in Setup. 161 // Frees resources acquired in Setup.
161 // When a temporary file is used for the log, returns its stream descriptor, 162 // When a temporary file is used for the log, returns its stream descriptor,
162 // leaving the file open. 163 // leaving the file open.
163 FILE* TearDown(); 164 FILE* TearDown();
164 165
165 // Enable the computation of a sliding window of states. 166 // Enable the computation of a sliding window of states.
166 void EnableSlidingStateWindow(); 167 void EnableSlidingStateWindow();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void LogCompiledFunctions(); 289 void LogCompiledFunctions();
289 // Logs all accessor callbacks found in the heap. 290 // Logs all accessor callbacks found in the heap.
290 void LogAccessorCallbacks(); 291 void LogAccessorCallbacks();
291 // Used for logging stubs found in the snapshot. 292 // Used for logging stubs found in the snapshot.
292 void LogCodeObjects(); 293 void LogCodeObjects();
293 294
294 // Converts tag to a corresponding NATIVE_... if the script is native. 295 // Converts tag to a corresponding NATIVE_... if the script is native.
295 INLINE(static LogEventsAndTags ToNativeByScript(LogEventsAndTags, Script*)); 296 INLINE(static LogEventsAndTags ToNativeByScript(LogEventsAndTags, Script*));
296 297
297 // Profiler's sampling interval (in milliseconds). 298 // 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
303 static const int kSamplingIntervalMs = 1; 299 static const int kSamplingIntervalMs = 1;
304 #endif
305 300
306 // Callback from Log, stops profiling in case of insufficient resources. 301 // Callback from Log, stops profiling in case of insufficient resources.
307 void LogFailure(); 302 void LogFailure();
308 303
309 private: 304 private:
310 class NameBuffer; 305 class NameBuffer;
311 class NameMap; 306 class NameMap;
312 307
313 Logger(); 308 Logger();
314 ~Logger(); 309 ~Logger();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // Class that extracts stack trace, used for profiling. 460 // Class that extracts stack trace, used for profiling.
466 class StackTracer : public AllStatic { 461 class StackTracer : public AllStatic {
467 public: 462 public:
468 static void Trace(Isolate* isolate, TickSample* sample); 463 static void Trace(Isolate* isolate, TickSample* sample);
469 }; 464 };
470 465
471 } } // namespace v8::internal 466 } } // namespace v8::internal
472 467
473 468
474 #endif // V8_LOG_H_ 469 #endif // V8_LOG_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698