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

Unified Diff: src/runtime/runtime-test.cc

Issue 2172583002: [interpreter] Add OSR nesting level to bytecode header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO. Created 4 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-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 2219b6160eb69f135b8d8e6f20aae4c8e616ea69..fc741ae5d928685e02571cf4ba2cd1706cfa106b 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -173,20 +173,19 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
return isolate->heap()->undefined_value();
}
- // If function is interpreted, just return. OSR is not supported.
- // TODO(4764): Remove this check when OSR is enabled in the interpreter.
- if (function->shared()->HasBytecodeArray()) {
+ // If function is interpreted but OSR hasn't been enabled, just return.
+ if (function->shared()->HasBytecodeArray() && !FLAG_ignition_osr) {
return isolate->heap()->undefined_value();
}
// If the function is already optimized, just return.
if (function->IsOptimized()) return isolate->heap()->undefined_value();
- Code* unoptimized = function->shared()->code();
- if (unoptimized->kind() == Code::FUNCTION) {
- DCHECK(BackEdgeTable::Verify(isolate, unoptimized));
+ // Make the profiler arm all back edges in unoptimized code.
+ if (function->shared()->HasBytecodeArray() ||
+ function->shared()->code()->kind() == Code::FUNCTION) {
isolate->runtime_profiler()->AttemptOnStackReplacement(
- *function, Code::kMaxLoopNestingMarker);
+ *function, AbstractCode::kMaxLoopNestingMarker);
}
return isolate->heap()->undefined_value();
« no previous file with comments | « src/runtime-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698