Index: src/runtime-profiler.h |
diff --git a/src/runtime-profiler.h b/src/runtime-profiler.h |
index d35b5df847a68c5cc4689532f368a7b0d81310fd..c01717ca6815b35f615598ccb16a3511a5bae644 100644 |
--- a/src/runtime-profiler.h |
+++ b/src/runtime-profiler.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2010 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -61,6 +61,15 @@ class RuntimeProfiler { |
Object** SamplerWindowAddress(); |
int SamplerWindowSize(); |
+ void NotifyICChanged() { any_ic_changed_ = true; } |
+ |
+ void NotifyCodeGenerated(int generated_code_size) { |
+ if (FLAG_counting_profiler) { |
+ code_generated_ = true; |
+ total_code_generated_ += generated_code_size; |
+ } |
+ } |
+ |
// Rate limiting support. |
// VM thread interface. |
@@ -97,7 +106,7 @@ class RuntimeProfiler { |
static void HandleWakeUp(Isolate* isolate); |
- void Optimize(JSFunction* function); |
+ void Optimize(JSFunction* function, const char* reason); |
void AttemptOnStackReplacement(JSFunction* function); |
@@ -119,6 +128,10 @@ class RuntimeProfiler { |
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 |
// 0 or positive => the number of isolates running JavaScript code. |