Index: src/runtime-profiler.h |
diff --git a/src/runtime-profiler.h b/src/runtime-profiler.h |
index 7f2c9024bf10f3cbd21eba3fff5ab77d0d0a1005..5c538c488cfd8c9729300a7989390a5a474f1341 100644 |
--- a/src/runtime-profiler.h |
+++ b/src/runtime-profiler.h |
@@ -13,6 +13,7 @@ namespace internal { |
class Isolate; |
class JavaScriptFrame; |
class JSFunction; |
+enum class OptimizationReason : uint8_t; |
class RuntimeProfiler { |
public: |
@@ -30,8 +31,13 @@ class RuntimeProfiler { |
int frame_count); |
void MaybeBaselineIgnition(JSFunction* function, JavaScriptFrame* frame); |
void MaybeOptimizeIgnition(JSFunction* function, JavaScriptFrame* frame); |
- void Optimize(JSFunction* function, const char* reason); |
- void Baseline(JSFunction* function, const char* reason); |
+ // Potentially attempts OSR from ignition and returns whether no other |
+ // optimization attempts should be made. |
+ bool MaybeOSRIgnition(JSFunction* function, JavaScriptFrame* frame); |
+ OptimizationReason ShouldOptimizeIgnition(JSFunction* function, |
+ JavaScriptFrame* frame); |
+ void Optimize(JSFunction* function, OptimizationReason reason); |
+ void Baseline(JSFunction* function, OptimizationReason reason); |
Isolate* isolate_; |
bool any_ic_changed_; |