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

Unified Diff: src/compiler.cc

Issue 109213005: Merged r17432, r17526, r17545, r17620, r17747 into 3.20 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
Patch Set: Created 7 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 | « no previous file | src/heap.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 f6e5daac854228dec0381fdd64b317330109833b..8d07a965b78637f0413eb7fa5743f70a67ad6fb0 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -264,8 +264,11 @@ static bool AlwaysFullCompiler(Isolate* isolate) {
void OptimizingCompiler::RecordOptimizationStats() {
Handle<JSFunction> function = info()->closure();
- int opt_count = function->shared()->opt_count();
- function->shared()->set_opt_count(opt_count + 1);
+ if (!function->IsOptimized()) {
+ // Concurrent recompilation and OSR may race. Increment only once.
+ int opt_count = function->shared()->opt_count();
+ function->shared()->set_opt_count(opt_count + 1);
+ }
double ms_creategraph =
static_cast<double>(time_taken_to_create_graph_) / 1000;
double ms_optimize = static_cast<double>(time_taken_to_optimize_) / 1000;
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698