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

Side by Side Diff: src/runtime-profiler.cc

Issue 10417010: Run Crankshaft on a separate thread. (Closed) Base URL: https://chromiumcodereview.appspot.com/10387157
Patch Set: Set optimize_in_parallel to false by default. Created 8 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); 137 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address()));
138 PrintF(" for recompilation, reason: %s", reason); 138 PrintF(" for recompilation, reason: %s", reason);
139 if (FLAG_type_info_threshold > 0) { 139 if (FLAG_type_info_threshold > 0) {
140 int typeinfo, total, percentage; 140 int typeinfo, total, percentage;
141 GetICCounts(function, &typeinfo, &total, &percentage); 141 GetICCounts(function, &typeinfo, &total, &percentage);
142 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); 142 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage);
143 } 143 }
144 PrintF("]\n"); 144 PrintF("]\n");
145 } 145 }
146 146
147 // The next call to the function will trigger optimization. 147 if (FLAG_optimize_in_parallel) {
148 function->MarkForLazyRecompilation(); 148 function->RecompileInParallel();
149 } else {
150 function->MarkForLazyRecompilation();
151 }
149 } 152 }
150 153
151 154
152 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { 155 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) {
153 // See AlwaysFullCompiler (in compiler.cc) comment on why we need 156 // See AlwaysFullCompiler (in compiler.cc) comment on why we need
154 // Debug::has_break_points(). 157 // Debug::has_break_points().
155 ASSERT(function->IsMarkedForLazyRecompilation()); 158 ASSERT(function->IsMarkedForLazyRecompilation());
156 if (!FLAG_use_osr || 159 if (!FLAG_use_osr ||
157 isolate_->DebuggerHasBreakPoints() || 160 isolate_->DebuggerHasBreakPoints() ||
158 function->IsBuiltin()) { 161 function->IsBuiltin()) {
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 467
465 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 468 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
466 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 469 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
467 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 470 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
468 } 471 }
469 return false; 472 return false;
470 } 473 }
471 474
472 475
473 } } // namespace v8::internal 476 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698