-
Notifications
You must be signed in to change notification settings - Fork 6k
Inform the Dart VM when snapshots are safe to use with madvise(DONTNEED). #29320
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. |
aaf78c3
to
4c985ef
Compare
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.
Thanks! A simple test for this in file_unittest.cc
would be great. Just one that checks that file, malloc, and non-owned mappings say the right things about the don't-need safety.
Also, the nit about writable mappings and the advisability. But I may be misunderstanding how that works.
17fd986
to
7314463
Compare
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.
The Resolve
functions in dart_snapshot.cc
should pass dontneed_safe = true
when constructing the NonOwnedMapping
7314463
to
cf0e395
Compare
Done. |
* 921872d Roll Skia from 762a01fd999e to 721388ecdbbe (4 revisions) (flutter/engine#29390) * 5a6fa26 Make an interface for FlBinaryMessenger * 3510312 Make an interface for FlPluginRegistrar * a99f373 Make an interface for FlTextureRegistrar * ed44967 Fix widget reference handling * 98333c8 Move mock objects into separate modules * 71c8a9c Can't test FlView on a server - no display * 367e371 Update licenses * eb7401c Roll Skia from 721388ecdbbe to b5450fb9015b (2 revisions) (flutter/engine#29392) * 111b80e Inform the Dart VM when snapshots are safe to use with madvise(DONTNEED). (flutter/engine#29320) * 684323c [fuchsia] Remove unused sdk_ext.gni. (flutter/engine#29393) * 3a0a63c Roll Skia from b5450fb9015b to 9fc189f1cbdf (2 revisions) (flutter/engine#29394)
* 921872d Roll Skia from 762a01fd999e to 721388ecdbbe (4 revisions) (flutter/engine#29390) * 5a6fa26 Make an interface for FlBinaryMessenger * 3510312 Make an interface for FlPluginRegistrar * a99f373 Make an interface for FlTextureRegistrar * ed44967 Fix widget reference handling * 98333c8 Move mock objects into separate modules * 71c8a9c Can't test FlView on a server - no display * 367e371 Update licenses * eb7401c Roll Skia from 721388ecdbbe to b5450fb9015b (2 revisions) (flutter/engine#29392) * 111b80e Inform the Dart VM when snapshots are safe to use with madvise(DONTNEED). (flutter/engine#29320) * 684323c [fuchsia] Remove unused sdk_ext.gni. (flutter/engine#29393) * 3a0a63c Roll Skia from b5450fb9015b to 9fc189f1cbdf (2 revisions) (flutter/engine#29394)
Bug: dart-lang/sdk#44019
Bug: flutter/flutter#92120