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

Unified Diff: runtime/vm/profiler_service.cc

Issue 2183993007: Add debug only counters to profiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « runtime/vm/profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 6b3d8398baf1ec314c4839c292ddabdb7b622f60..f17f38f7bbaf19b121942ef5db9fb7cc0d604ca8 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -2448,6 +2448,41 @@ void Profile::PrintHeaderJSON(JSONObject* obj) {
obj->AddProperty("timeSpan", MicrosecondsToSeconds(GetTimeSpan()));
obj->AddPropertyTimeMicros("timeOriginMicros", min_time());
obj->AddPropertyTimeMicros("timeExtentMicros", GetTimeSpan());
+
+ ProfilerCounters counters = Profiler::counters();
+ {
+ JSONObject counts(obj, "counters");
+ counts.AddProperty64(
+ "bail_out_unknown_task",
+ counters.bail_out_unknown_task);
+ counts.AddProperty64(
+ "bail_out_jump_to_exception_handler",
+ counters.bail_out_jump_to_exception_handler);
+ counts.AddProperty64(
+ "bail_out_check_isolate",
+ counters.bail_out_check_isolate);
+ counts.AddProperty64(
+ "single_frame_sample_deoptimizing",
+ counters.single_frame_sample_deoptimizing);
+ counts.AddProperty64(
+ "single_frame_sample_register_check",
+ counters.single_frame_sample_register_check);
+ counts.AddProperty64(
+ "single_frame_sample_get_and_validate_stack_bounds",
+ counters.single_frame_sample_get_and_validate_stack_bounds);
+ counts.AddProperty64(
+ "stack_walker_native",
+ counters.stack_walker_native);
+ counts.AddProperty64(
+ "stack_walker_dart_exit",
+ counters.stack_walker_dart_exit);
+ counts.AddProperty64(
+ "stack_walker_dart",
+ counters.stack_walker_dart);
+ counts.AddProperty64(
+ "stack_walker_none",
+ counters.stack_walker_none);
+ }
}
« no previous file with comments | « runtime/vm/profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698