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

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

Issue 9586003: Merged r10858 into 3.7 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.7
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 | src/version.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // If the threshold is not already at the minimum 200 // If the threshold is not already at the minimum
201 // modify and reset the ticks until next adjustment. 201 // modify and reset the ticks until next adjustment.
202 if (sampler_threshold_ > kSamplerThresholdMin) { 202 if (sampler_threshold_ > kSamplerThresholdMin) {
203 sampler_threshold_ -= kSamplerThresholdDelta; 203 sampler_threshold_ -= kSamplerThresholdDelta;
204 sampler_ticks_until_threshold_adjustment_ = 204 sampler_ticks_until_threshold_adjustment_ =
205 kSamplerTicksBetweenThresholdAdjustment; 205 kSamplerTicksBetweenThresholdAdjustment;
206 } 206 }
207 } 207 }
208 } 208 }
209 209
210 if (function->IsMarkedForLazyRecompilation()) { 210 if (function->IsMarkedForLazyRecompilation() &&
211 function->shared()->code()->kind() == Code::FUNCTION) {
211 Code* unoptimized = function->shared()->code(); 212 Code* unoptimized = function->shared()->code();
212 int nesting = unoptimized->allow_osr_at_loop_nesting_level(); 213 int nesting = unoptimized->allow_osr_at_loop_nesting_level();
213 if (nesting == 0) AttemptOnStackReplacement(function); 214 if (nesting == 0) AttemptOnStackReplacement(function);
214 int new_nesting = Min(nesting + 1, Code::kMaxLoopNestingMarker); 215 int new_nesting = Min(nesting + 1, Code::kMaxLoopNestingMarker);
215 unoptimized->set_allow_osr_at_loop_nesting_level(new_nesting); 216 unoptimized->set_allow_osr_at_loop_nesting_level(new_nesting);
216 } 217 }
217 218
218 // Do not record non-optimizable functions. 219 // Do not record non-optimizable functions.
219 if (!function->IsOptimizable()) continue; 220 if (!function->IsOptimizable()) continue;
220 samples[sample_count++] = function; 221 samples[sample_count++] = function;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 356
356 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 357 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
357 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 358 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
358 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 359 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
359 } 360 }
360 return false; 361 return false;
361 } 362 }
362 363
363 364
364 } } // namespace v8::internal 365 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698