Repository navigation
flutter.mojo should expose all traces in observatory timeline #861
Copy link
Copy link
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitydependency: fuchsiaFuchsia team may need to help usFuchsia team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Description
Currently, only some traces show up in the observatory timeline when running flutter.mojo. Notably missing is the GPU thread. @chinmaygarde got things working w/ the below patch so that we could troubleshoot a particular issue, but this bug is to track the proper solution.
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index ccc2d58..48f73b5 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -644,6 +644,17 @@ void Service::InvokeMethod(Isolate* I, const Array& msg) {
}
const char* c_method_name = method_name.ToCString();
+ EmbedderServiceHandler* handler = FindIsolateEmbedderHandler(c_method_name);
+ if (handler == NULL) {
+ handler = FindRootEmbedderHandler(c_method_name);
+ }
+
+ if (handler != NULL) {
+ EmbedderHandleMessage(handler, &js);
+ js.PostReply();
+ return;
+ }
+
const ServiceMethodDescriptor* method = FindMethod(c_method_name);
if (method != NULL) {
if (!ValidateParameters(method->parameters, &js)) {
@@ -660,17 +671,6 @@ void Service::InvokeMethod(Isolate* I, const Array& msg) {
return;
}
- EmbedderServiceHandler* handler = FindIsolateEmbedderHandler(c_method_name);
- if (handler == NULL) {
- handler = FindRootEmbedderHandler(c_method_name);
- }
-
- if (handler != NULL) {
- EmbedderHandleMessage(handler, &js);
- js.PostReply();
- return;
- }
-
const Instance& extension_handler = Instance::Handle(Z,
I->LookupServiceExtensionHandler(method_name));
if (!extension_handler.IsNull()) {diff --git a/sky/shell/tracing_controller.cc b/sky/shell/tracing_controller.cc
index 6a940c6..5059a0e 100644
--- a/sky/shell/tracing_controller.cc
+++ b/sky/shell/tracing_controller.cc
@@ -21,8 +21,8 @@ namespace shell {
const char kBaseTraceStart[] = "{\"traceEvents\":[";
const char kBaseTraceEnd[] = "]}";
-const char kObservatoryMethodStartTracing[] = "flutter_startTracing";
-const char kObservatoryMethodStopTracing[] = "flutter_stopTracing";
+const char kObservatoryMethodStartTracing[] = "_setVMTimelineFlag";
+const char kObservatoryMethodStopTracing[] = "_getVMTimeline";
const char kObservatoryResultOk[] = "{\"success\" : true}";
const char kObservatoryResultFail[] = "{\"success\" : false}";Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitydependency: fuchsiaFuchsia team may need to help usFuchsia team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Activity
eseidelGoogle commentedon May 13, 2016
Is this still an issue? Or is this what flutter-team-archive/engine#2674 is seeking to fix?
abarth commentedon Oct 16, 2016
flutter.mojo isn't a thing anymore.
github-actions commentedon Aug 8, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.