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

Unified Diff: src/compiler.cc

Issue 2497933002: [Interpreter] Fix runtime-profiler ticks for Interpreted functions. (Closed)
Patch Set: Review comments Created 4 years, 1 month 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 | « no previous file | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index a8cf14c620079bdd7a202972aad68873a5d56311..b13111962c48e74f4b0dd88639970bcad752282d 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -640,8 +640,10 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
}
// Reset profiler ticks, function is no longer considered hot.
- if (shared->is_compiled()) {
+ if (shared->HasBaselineCode()) {
shared->code()->set_profiler_ticks(0);
+ } else if (shared->HasBytecodeArray()) {
+ shared->set_profiler_ticks(0);
}
VMState<COMPILER> state(isolate);
@@ -734,7 +736,13 @@ CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) {
"V8.RecompileSynchronous");
Handle<SharedFunctionInfo> shared = info->shared_info();
- shared->code()->set_profiler_ticks(0);
+
+ // Reset profiler ticks, function is no longer considered hot.
+ if (shared->HasBaselineCode()) {
+ shared->code()->set_profiler_ticks(0);
+ } else if (shared->HasBytecodeArray()) {
+ shared->set_profiler_ticks(0);
+ }
DCHECK(!shared->HasDebugInfo());
« no previous file with comments | « no previous file | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698