-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add "relaxed_keep_class_members " option
Summary: Both *RMU and DelInit remove "unreachable" fields and methods. (RMU also removes unreachable classes, but that's not important for this story.) They differ in what they consider "unreachable". RMU somewhat straightforwardly visits everything that reachable from some roots, and conditionally holds on root fields and methods in reachable classes. (There's a little quirk where it keeps all volatile ifields, some of which DelInit will actually happily remove, but that's a minor detail.) DelInit is... less intuitive. On one side, it's more aggressive when it comes to discarding root fields and methods, as it only considers some ways in which their class is referenced --- I think the intuition is that it only consider those kind of references which are "actually" (= historically observed to be) used to access fields and methods via reflection or from native code. On the other side, it's more conservative than RMU, as it also considers the `marked_by_string` flag in addition to the `root` flag, and it may keep extra constructors for undisclosed reasons, and it keeps all ifields and vmethods of instantiable classes. However, RMU might cut some or all those before or after DelInit. This diffs introduces a new option to RMU that relaxes what members need to be kept, tightening what's considered reachable in RMU, in a way that exactly cuts out what DelInit considers unreachable. We effectively get the intersection between both schemes, but combined in a single reachability visitor, which then identifies a bit more unreachable objects in a single run. This is a behavior preserving diff, as the new option is disabled. Reviewed By: agampe Differential Revision: D45628244 fbshipit-source-id: 55a2c24878370cd675a3a4eaed022d4d518e0163
- Loading branch information
1 parent
58f69be
commit 70544ce
Showing
8 changed files
with
441 additions
and
94 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters