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

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

Issue 1811613002: Timeline API fixes for Flutter (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/precompiler.cc ('k') | runtime/vm/service_isolate.cc » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
(...skipping 17 matching lines...) Expand all
28 #include "vm/object_store.h" 28 #include "vm/object_store.h"
29 #include "vm/parser.h" 29 #include "vm/parser.h"
30 #include "vm/port.h" 30 #include "vm/port.h"
31 #include "vm/profiler_service.h" 31 #include "vm/profiler_service.h"
32 #include "vm/reusable_handles.h" 32 #include "vm/reusable_handles.h"
33 #include "vm/service_event.h" 33 #include "vm/service_event.h"
34 #include "vm/service_isolate.h" 34 #include "vm/service_isolate.h"
35 #include "vm/source_report.h" 35 #include "vm/source_report.h"
36 #include "vm/stack_frame.h" 36 #include "vm/stack_frame.h"
37 #include "vm/symbols.h" 37 #include "vm/symbols.h"
38 #include "vm/timeline.h"
38 #include "vm/unicode.h" 39 #include "vm/unicode.h"
39 #include "vm/version.h" 40 #include "vm/version.h"
40 41
41 namespace dart { 42 namespace dart {
42 43
43 #define Z (T->zone()) 44 #define Z (T->zone())
44 45
45 46
46 DECLARE_FLAG(bool, trace_service); 47 DECLARE_FLAG(bool, trace_service);
47 DECLARE_FLAG(bool, trace_service_pause_events); 48 DECLARE_FLAG(bool, trace_service_pause_events);
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 if (metric_id == NULL) { 2864 if (metric_id == NULL) {
2864 PrintMissingParamError(js, "metricId"); 2865 PrintMissingParamError(js, "metricId");
2865 } 2866 }
2866 return false; 2867 return false;
2867 } 2868 }
2868 2869
2869 static const char* const timeline_streams_enum_names[] = { 2870 static const char* const timeline_streams_enum_names[] = {
2870 "all", 2871 "all",
2871 #define DEFINE_NAME(name, unused) \ 2872 #define DEFINE_NAME(name, unused) \
2872 #name, 2873 #name,
2873 ISOLATE_TIMELINE_STREAM_LIST(DEFINE_NAME) 2874 TIMELINE_STREAM_LIST(DEFINE_NAME)
2874 #undef DEFINE_NAME 2875 #undef DEFINE_NAME
2875 "VM",
2876 NULL 2876 NULL
2877 }; 2877 };
2878 2878
2879 static const MethodParameter* set_vm_timeline_flags_params[] = { 2879 static const MethodParameter* set_vm_timeline_flags_params[] = {
2880 NO_ISOLATE_PARAMETER, 2880 NO_ISOLATE_PARAMETER,
2881 new EnumListParameter("recordedStreams", 2881 new EnumListParameter("recordedStreams",
2882 false, 2882 false,
2883 timeline_streams_enum_names), 2883 timeline_streams_enum_names),
2884 NULL, 2884 NULL,
2885 }; 2885 };
(...skipping 22 matching lines...) Expand all
2908 2908
2909 const EnumListParameter* recorded_streams_param = 2909 const EnumListParameter* recorded_streams_param =
2910 static_cast<const EnumListParameter*>(set_vm_timeline_flags_params[1]); 2910 static_cast<const EnumListParameter*>(set_vm_timeline_flags_params[1]);
2911 2911
2912 const char* recorded_streams_str = js->LookupParam("recordedStreams"); 2912 const char* recorded_streams_str = js->LookupParam("recordedStreams");
2913 const char** recorded_streams = 2913 const char** recorded_streams =
2914 recorded_streams_param->Parse(thread->zone(), recorded_streams_str); 2914 recorded_streams_param->Parse(thread->zone(), recorded_streams_str);
2915 2915
2916 #define SET_ENABLE_STREAM(name, unused) \ 2916 #define SET_ENABLE_STREAM(name, unused) \
2917 Timeline::SetStream##name##Enabled(HasStream(recorded_streams, #name)); 2917 Timeline::SetStream##name##Enabled(HasStream(recorded_streams, #name));
2918 ISOLATE_TIMELINE_STREAM_LIST(SET_ENABLE_STREAM); 2918 TIMELINE_STREAM_LIST(SET_ENABLE_STREAM);
2919 #undef SET_ENABLE_STREAM 2919 #undef SET_ENABLE_STREAM
2920 Timeline::SetVMStreamEnabled(HasStream(recorded_streams, "VM"));
2921 2920
2922 PrintSuccess(js); 2921 PrintSuccess(js);
2923 2922
2924 return true; 2923 return true;
2925 } 2924 }
2926 2925
2927 2926
2928 static const MethodParameter* get_vm_timeline_flags_params[] = { 2927 static const MethodParameter* get_vm_timeline_flags_params[] = {
2929 NO_ISOLATE_PARAMETER, 2928 NO_ISOLATE_PARAMETER,
2930 NULL, 2929 NULL,
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
4106 if (strcmp(method_name, method.name) == 0) { 4105 if (strcmp(method_name, method.name) == 0) {
4107 return &method; 4106 return &method;
4108 } 4107 }
4109 } 4108 }
4110 return NULL; 4109 return NULL;
4111 } 4110 }
4112 4111
4113 #endif // !PRODUCT 4112 #endif // !PRODUCT
4114 4113
4115 } // namespace dart 4114 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698