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

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

Issue 9976003: Minimize uses of lazy initialization by adding explicit initialization functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Daniel's comments. Created 8 years, 8 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 | « src/runtime-profiler.h ('k') | src/v8.cc » ('j') | src/v8.cc » ('J')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 sampler_threshold_size_factor_(kSamplerThresholdSizeFactorInit), 94 sampler_threshold_size_factor_(kSamplerThresholdSizeFactorInit),
95 sampler_ticks_until_threshold_adjustment_( 95 sampler_ticks_until_threshold_adjustment_(
96 kSamplerTicksBetweenThresholdAdjustment), 96 kSamplerTicksBetweenThresholdAdjustment),
97 sampler_window_position_(0), 97 sampler_window_position_(0),
98 any_ic_changed_(false), 98 any_ic_changed_(false),
99 code_generated_(false) { 99 code_generated_(false) {
100 ClearSampleBuffer(); 100 ClearSampleBuffer();
101 } 101 }
102 102
103 103
104 void RuntimeProfiler::GlobalSetup() { 104 void RuntimeProfiler::GlobalSetUp() {
105 ASSERT(!has_been_globally_set_up_); 105 ASSERT(!has_been_globally_set_up_);
106 enabled_ = V8::UseCrankshaft() && FLAG_opt; 106 enabled_ = V8::UseCrankshaft() && FLAG_opt;
107 #ifdef DEBUG 107 #ifdef DEBUG
108 has_been_globally_set_up_ = true; 108 has_been_globally_set_up_ = true;
109 #endif 109 #endif
110 } 110 }
111 111
112 112
113 static void GetICCounts(JSFunction* function, 113 static void GetICCounts(JSFunction* function,
114 int* ic_with_type_info_count, 114 int* ic_with_type_info_count,
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 465 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
466 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 466 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
467 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 467 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
468 } 468 }
469 return false; 469 return false;
470 } 470 }
471 471
472 472
473 } } // namespace v8::internal 473 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime-profiler.h ('k') | src/v8.cc » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698