-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metrics for WrappedPrimitivesPass at the end of the pass list
Summary: WrappedPrimitivesPass works by inserting constants into dex code, with the goal of leaving behind unnecessary instructions that use the wrapper type so that later passes can remove them. This leads to a simple design, but reporting metrics on the efficacy of the optimization, at the point in which WrappedPrimitivesPass runs, is not feasible. To provide such information, I suggest we run an informational pass towards the end that reports how many fields/usages of such wrapper types exist in the final output of Redex, and a corresponding metric about the input program. Additionally, provide trace outputs that suggest where an unremoved wrapper type might be getting used in the app. This is of course tricky to report at the end of the pass list, after code has been moved around, so a guess is made by looking for nearby SourceBlock entries. Reviewed By: thezhangwei Differential Revision: D64548498 fbshipit-source-id: 5edeac99ce4bc76882aaca4572316224473030c5
- Loading branch information
1 parent
98b5472
commit eb940d3
Showing
3 changed files
with
222 additions
and
2 deletions.
There are no files selected for viewing
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