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

Unified Diff: src/runtime-profiler.h

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « src/runtime.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698