| Index: src/runtime-profiler.h
|
| ===================================================================
|
| --- src/runtime-profiler.h (revision 8618)
|
| +++ src/runtime-profiler.h (working copy)
|
| @@ -37,7 +37,6 @@
|
| class Isolate;
|
| class JSFunction;
|
| class Object;
|
| -class PendingListNode;
|
| class Semaphore;
|
|
|
| class RuntimeProfiler {
|
| @@ -52,7 +51,6 @@
|
| }
|
|
|
| void OptimizeNow();
|
| - void OptimizeSoon(JSFunction* function);
|
|
|
| void NotifyTick();
|
|
|
| @@ -86,10 +84,9 @@
|
| static bool IsSomeIsolateInJS();
|
| static bool WaitForSomeIsolateToEnterJS();
|
|
|
| - // When shutting down we join the profiler thread. Doing so while
|
| - // it's waiting on a semaphore will cause a deadlock, so we have to
|
| - // wake it up first.
|
| - static void WakeUpRuntimeProfilerThreadBeforeShutdown();
|
| + // Stops the runtime profiler thread when profiling support is being
|
| + // turned off.
|
| + static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread);
|
|
|
| void UpdateSamplesAfterScavenge();
|
| void RemoveDeadSamples();
|
| @@ -106,7 +103,7 @@
|
|
|
| static void HandleWakeUp(Isolate* isolate);
|
|
|
| - void Optimize(JSFunction* function, bool eager, int delay);
|
| + void Optimize(JSFunction* function);
|
|
|
| void AttemptOnStackReplacement(JSFunction* function);
|
|
|
| @@ -118,31 +115,16 @@
|
|
|
| void AddSample(JSFunction* function, int weight);
|
|
|
| -#ifdef ENABLE_LOGGING_AND_PROFILING
|
| - void UpdateStateRatio(SamplerState current_state);
|
| -#endif
|
| -
|
| Isolate* isolate_;
|
|
|
| int sampler_threshold_;
|
| int sampler_threshold_size_factor_;
|
| int sampler_ticks_until_threshold_adjustment_;
|
|
|
| - // The ratio of ticks spent in JS code in percent.
|
| - Atomic32 js_ratio_;
|
| -
|
| Object* sampler_window_[kSamplerWindowSize];
|
| int sampler_window_position_;
|
| int sampler_window_weight_[kSamplerWindowSize];
|
|
|
| - // Support for pending 'optimize soon' requests.
|
| - PendingListNode* optimize_soon_list_;
|
| -
|
| - SamplerState state_window_[kStateWindowSize];
|
| - int state_window_position_;
|
| - int state_window_ticks_;
|
| - int state_counts_[2];
|
| -
|
| // Possible state values:
|
| // -1 => the profiler thread is waiting on the semaphore
|
| // 0 or positive => the number of isolates running JavaScript code.
|
| @@ -159,7 +141,7 @@
|
| // Rate limiter intended to be used in the profiler thread.
|
| class RuntimeProfilerRateLimiter BASE_EMBEDDED {
|
| public:
|
| - RuntimeProfilerRateLimiter() : non_js_ticks_(0) { }
|
| + RuntimeProfilerRateLimiter() {}
|
|
|
| // Suspends the current thread (which must be the profiler thread)
|
| // when not executing JavaScript to minimize CPU usage. Returns
|
| @@ -170,8 +152,6 @@
|
| bool SuspendIfNecessary();
|
|
|
| private:
|
| - int non_js_ticks_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(RuntimeProfilerRateLimiter);
|
| };
|
|
|
|
|