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

Unified Diff: src/runtime-profiler.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 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
diff --git a/src/runtime-profiler.h b/src/runtime-profiler.h
index 15c209713e93b42aa34ed24539865092afbe66d4..147e1d36700afa458cab9154289f80af428408cf 100644
--- a/src/runtime-profiler.h
+++ b/src/runtime-profiler.h
@@ -58,8 +58,13 @@ class RuntimeProfiler {
void Reset();
void TearDown();
- Object** SamplerWindowAddress();
- int SamplerWindowSize();
+ void NotifyICChanged() {
+ any_ic_changed_ = true;
+ }
+ void NotifyCodeGenerated(int generated_code_size) {
+ code_generated_ = true;
+ total_code_generated_ += generated_code_size;
+ }
// Rate limiting support.
@@ -88,16 +93,10 @@ class RuntimeProfiler {
// turned off.
static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread);
- void UpdateSamplesAfterScavenge();
- void RemoveDeadSamples();
- void UpdateSamplesAfterCompact(ObjectVisitor* visitor);
-
private:
- static const int kSamplerWindowSize = 16;
-
static void HandleWakeUp(Isolate* isolate);
- void Optimize(JSFunction* function);
+ void Optimize(JSFunction* function, const char* reason);
void AttemptOnStackReplacement(JSFunction* function);
@@ -105,19 +104,11 @@ class RuntimeProfiler {
void ClearSampleBufferNewSpaceEntries();
- int LookupSample(JSFunction* function);
-
- void AddSample(JSFunction* function, int weight);
-
Isolate* isolate_;
- int sampler_threshold_;
- int sampler_threshold_size_factor_;
- int sampler_ticks_until_threshold_adjustment_;
-
- Object* sampler_window_[kSamplerWindowSize];
- int sampler_window_position_;
- int sampler_window_weight_[kSamplerWindowSize];
+ bool any_ic_changed_;
+ bool code_generated_;
+ int total_code_generated_;
// Possible state values:
// -1 => the profiler thread is waiting on the semaphore
« 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