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

Side by Side Diff: runtime/vm/profiler_service.cc

Issue 1152553010: Fix the profiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « 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 (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/profiler_service.h" 5 #include "vm/profiler_service.h"
6 6
7 #include "vm/growable_array.h" 7 #include "vm/growable_array.h"
8 #include "vm/native_symbol.h" 8 #include "vm/native_symbol.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } else { 193 } else {
194 inclusive_ticks_++; 194 inclusive_ticks_++;
195 // Mark the last serial we ticked the inclusive count. 195 // Mark the last serial we ticked the inclusive count.
196 inclusive_tick_serial_ = serial; 196 inclusive_tick_serial_ = serial;
197 } 197 }
198 } 198 }
199 199
200 void PrintToJSONObject(JSONObject* func) { 200 void PrintToJSONObject(JSONObject* func) {
201 func->AddProperty("type", "@Function"); 201 func->AddProperty("type", "@Function");
202 func->AddProperty("name", name()); 202 func->AddProperty("name", name());
203 func->AddProperty("kind", KindToCString(kind())); 203 func->AddProperty("_kind", KindToCString(kind()));
204 } 204 }
205 205
206 void PrintToJSONArray(JSONArray* functions) { 206 void PrintToJSONArray(JSONArray* functions) {
207 JSONObject obj(functions); 207 JSONObject obj(functions);
208 obj.AddProperty("kind", KindToCString(kind())); 208 obj.AddProperty("kind", KindToCString(kind()));
209 obj.AddPropertyF("inclusiveTicks", "%" Pd "", inclusive_ticks()); 209 obj.AddPropertyF("inclusiveTicks", "%" Pd "", inclusive_ticks());
210 obj.AddPropertyF("exclusiveTicks", "%" Pd "", exclusive_ticks()); 210 obj.AddPropertyF("exclusiveTicks", "%" Pd "", exclusive_ticks());
211 if (kind() == kDartFunction) { 211 if (kind() == kDartFunction) {
212 ASSERT(!function_.IsNull()); 212 ASSERT(!function_.IsNull());
213 obj.AddProperty("function", function_); 213 obj.AddProperty("function", function_);
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 ASSERT(sample_buffer != NULL); 2362 ASSERT(sample_buffer != NULL);
2363 2363
2364 ClearProfileVisitor clear_profile(isolate); 2364 ClearProfileVisitor clear_profile(isolate);
2365 sample_buffer->VisitSamples(&clear_profile); 2365 sample_buffer->VisitSamples(&clear_profile);
2366 2366
2367 // Enable profile interrupts. 2367 // Enable profile interrupts.
2368 Profiler::BeginExecution(isolate); 2368 Profiler::BeginExecution(isolate);
2369 } 2369 }
2370 2370
2371 } // namespace dart 2371 } // namespace dart
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