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

Unified Diff: runtime/vm/profiler.cc

Issue 136293004: Ensure Sample instance_size is always set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 34035e0dd45b7009a7f8be676d075b0e77d4238d..4b5b6b57ed76c134eae8ec625903165a6056fdcd 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -40,10 +40,6 @@ void Profiler::InitOnce() {
const int kMinimumProfilePeriod = 250;
const int kMinimumDepth = 1;
const int kMaximumDepth = 128;
- if (!FLAG_profile) {
- return;
- }
- ASSERT(!initialized_);
// Place some sane restrictions on user controlled flags.
if (FLAG_profile_period < kMinimumProfilePeriod) {
FLAG_profile_period = kMinimumProfilePeriod;
@@ -54,6 +50,10 @@ void Profiler::InitOnce() {
FLAG_profile_depth = kMaximumDepth;
}
Sample::InitOnce();
+ if (!FLAG_profile) {
+ return;
+ }
+ ASSERT(!initialized_);
sample_buffer_ = new SampleBuffer();
NativeSymbolResolver::InitOnce();
ThreadInterrupter::InitOnce();
« 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