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

Unified Diff: runtime/vm/service.cc

Issue 1525913002: Observatory: Include profiler samples in the timeline view. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index db05721f7a41c66553987b7d643ca609ebcd2014..36ee8097e22ef8531f5f0adafcb6b5d98523aa4a 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2617,7 +2617,6 @@ static bool GetVMTimeline(Thread* thread, JSONStream* js) {
ASSERT(timeline_recorder != NULL);
TimelineEventFilter filter;
timeline_recorder->PrintJSON(js, &filter);
-
return true;
}
@@ -2749,6 +2748,21 @@ static bool GetCpuProfile(Thread* thread, JSONStream* js) {
}
+static const MethodParameter* get_cpu_profile_timeline_params[] = {
+ ISOLATE_PARAMETER,
+ new EnumParameter("tags", true, tags_enum_names),
+ NULL,
+};
+
+
+static bool GetCpuProfileTimeline(Thread* thread, JSONStream* js) {
+ Profile::TagOrder tag_order =
+ EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values);
+ ProfilerService::PrintTimelineJSON(js, tag_order);
+ return true;
+}
+
+
static const MethodParameter* get_allocation_samples_params[] = {
ISOLATE_PARAMETER,
new EnumParameter("tags", true, tags_enum_names),
@@ -3481,6 +3495,8 @@ static const ServiceMethodDescriptor service_methods_[] = {
get_coverage_params },
{ "_getCpuProfile", GetCpuProfile,
get_cpu_profile_params },
+ { "_getCpuProfileTimeline", GetCpuProfileTimeline,
+ get_cpu_profile_timeline_params },
{ "getFlagList", GetFlagList,
get_flag_list_params },
{ "_getHeapMap", GetHeapMap,
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698