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

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

Issue 9495005: Add code kind check before preparing for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // modify and reset the ticks until next adjustment. 250 // modify and reset the ticks until next adjustment.
251 if (sampler_threshold_ > kSamplerThresholdMin) { 251 if (sampler_threshold_ > kSamplerThresholdMin) {
252 sampler_threshold_ -= kSamplerThresholdDelta; 252 sampler_threshold_ -= kSamplerThresholdDelta;
253 sampler_ticks_until_threshold_adjustment_ = 253 sampler_ticks_until_threshold_adjustment_ =
254 kSamplerTicksBetweenThresholdAdjustment; 254 kSamplerTicksBetweenThresholdAdjustment;
255 } 255 }
256 } 256 }
257 } 257 }
258 } 258 }
259 259
260 if (function->IsMarkedForLazyRecompilation()) { 260 if (function->IsMarkedForLazyRecompilation() &&
261 function->shared()->code()->kind() == Code::FUNCTION) {
261 Code* unoptimized = function->shared()->code(); 262 Code* unoptimized = function->shared()->code();
262 int nesting = unoptimized->allow_osr_at_loop_nesting_level(); 263 int nesting = unoptimized->allow_osr_at_loop_nesting_level();
263 if (nesting == 0) AttemptOnStackReplacement(function); 264 if (nesting == 0) AttemptOnStackReplacement(function);
264 int new_nesting = Min(nesting + 1, Code::kMaxLoopNestingMarker); 265 int new_nesting = Min(nesting + 1, Code::kMaxLoopNestingMarker);
265 unoptimized->set_allow_osr_at_loop_nesting_level(new_nesting); 266 unoptimized->set_allow_osr_at_loop_nesting_level(new_nesting);
266 } 267 }
267 268
268 // Do not record non-optimizable functions. 269 // Do not record non-optimizable functions.
269 if (!function->IsOptimizable()) continue; 270 if (!function->IsOptimizable()) continue;
270 271
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 466
466 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 467 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
467 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 468 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
468 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 469 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
469 } 470 }
470 return false; 471 return false;
471 } 472 }
472 473
473 474
474 } } // namespace v8::internal 475 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698