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

Unified Diff: runtime/vm/service.cc

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/scope_timer.h ('k') | runtime/vm/service_test.cc » ('j') | 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 404e8d3ee4d3ae1a9a0988f9cb82e293eae56723..f62e38f1698570d8616170358f3b2e6ce1db4a39 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2135,6 +2135,20 @@ static bool GetCpuProfile(Isolate* isolate, JSONStream* js) {
}
+static const MethodParameter* clear_cpu_profile_params[] = {
+ ISOLATE_PARAMETER,
+ NULL,
+};
+
+
+static bool ClearCpuProfile(Isolate* isolate, JSONStream* js) {
+ ProfilerService::ClearSamples();
+ JSONObject jsobj(js);
+ jsobj.AddProperty("type", "Success");
+ return true;
+}
+
+
static const MethodParameter* get_allocation_profile_params[] = {
ISOLATE_PARAMETER,
NULL,
@@ -2497,6 +2511,8 @@ static ServiceMethodDescriptor service_methods_[] = {
add_breakpoint_params },
{ "addBreakpointAtEntry", AddBreakpointAtEntry,
add_breakpoint_at_entry_params },
+ { "clearCpuProfile", ClearCpuProfile,
+ clear_cpu_profile_params },
{ "eval", Eval,
eval_params },
{ "getAllocationProfile", GetAllocationProfile,
« no previous file with comments | « runtime/vm/scope_timer.h ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698