28 #ifndef V8_RUNTIME_PROFILER_H_
29 #define V8_RUNTIME_PROFILER_H_
49 ASSERT(has_been_globally_set_up_);
100 static const int kSamplerWindowSize = 16;
102 static void HandleWakeUp(
Isolate* isolate);
104 void Optimize(
JSFunction*
function,
const char* reason);
106 void ClearSampleBuffer();
108 void ClearSampleBufferNewSpaceEntries();
112 void AddSample(
JSFunction*
function,
int weight);
116 int sampler_threshold_;
117 int sampler_threshold_size_factor_;
118 int sampler_ticks_until_threshold_adjustment_;
120 Object* sampler_window_[kSamplerWindowSize];
121 int sampler_window_position_;
122 int sampler_window_weight_[kSamplerWindowSize];
124 bool any_ic_changed_;
125 bool code_generated_;
133 static bool has_been_globally_set_up_;
135 static bool enabled_;
150 bool SuspendIfNecessary();
161 if (new_state == 0) {
165 HandleWakeUp(isolate);
179 #endif // V8_RUNTIME_PROFILER_H_
RuntimeProfiler(Isolate *isolate)
RuntimeProfilerRateLimiter()
static void IsolateEnteredJS(Isolate *isolate)
#define ASSERT(condition)
static void StopRuntimeProfilerThreadBeforeShutdown(Thread *thread)
Object ** SamplerWindowAddress()
static bool WaitForSomeIsolateToEnterJS()
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)
void UpdateSamplesAfterCompact(ObjectVisitor *visitor)
static void GlobalSetUp()
static void IsolateExitedJS(Isolate *isolate)
void AttemptOnStackReplacement(JSFunction *function)
static bool IsSomeIsolateInJS()
void UpdateSamplesAfterScavenge()