Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Inform the Dart VM when snapshots are safe to use with madvise(DONTNEED). #29320

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

rmacnak-google
Copy link
Contributor

@flutter-dashboard
Copy link

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.

Copy link
Member

@chinmaygarde chinmaygarde left a 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.

Copy link
Member

@jason-simmons jason-simmons left a 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

@rmacnak-google
Copy link
Contributor Author

Done.

@a-siva a-siva merged commit 111b80e into flutter:master Oct 28, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 29, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Oct 29, 2021
* 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)
WizzXu pushed a commit to WizzXu/flutter that referenced this pull request Nov 19, 2021
* 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)
@rmacnak-google rmacnak-google deleted the madvise branch August 16, 2022 21:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants