-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a specialized snapshot for launching the service isolate in profile mode on Android #29245
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works on Android ATM but it should be trivial to wire up the profile AOT test harness to also generate this separate dylib and specify its path in the fixtures. That way, all host tests will use this new stuff.
common/settings.h
Outdated
@@ -116,6 +116,10 @@ struct Settings { | |||
// case the primary path to the library can not be loaded. | |||
std::vector<std::string> application_library_path; | |||
|
|||
// Path to a library containing compiled Dart code usable for launching | |||
// the VM service isolate. | |||
std::string vmservice_snapshot_library_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be similar to the application_library_path
where a vector of paths is specified?
@@ -134,7 +134,12 @@ template("flutter_snapshot") { | |||
"--assembly=" + rebase_path(snapshot_assembly), | |||
] | |||
} else if (is_android) { | |||
libapp = "$target_gen_dir/android/libs/$android_app_abi/libapp.so" | |||
if (defined(invoker.output_aot_lib)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output_aot_lib
is a bit obscure and undocumented. Can we make this an required argument (and update existing callers) and add an assertion at the top of this template saying what this is meant to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added documentation. I'd prefer to keep this parameter optional - in all other cases callers will be building conventional app snapshots and will want to use the default filename expected by the embedding.
BTW, what kind of improvements were observed in the test case under investigation? |
68651ff
to
1177490
Compare
It looked like there was a decrease in total memory usage similar to the size of the app snapshot. |
Sounds good. Are you planning on patching the test harness in this patch? |
1177490
to
a351ab7
Compare
Added support for the VM service snapshot in the test harness on Linux |
a351ab7
to
c36f067
Compare
…file mode on Android Fixes flutter/flutter#91382
c36f067
to
e384c10
Compare
Can this PR be merged ? |
…e in profile mode on Android (flutter/engine#29245)
Fixes flutter/flutter#91382