This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Courgette] Using LabelManager to reduce Courgette-apply peak RAM by …
…25%. AssemblyProgram previously allocates new Label instances as it parses an executable and emits instructions. This CL replaces the flow by using LabelManager to precompute Labels in one array. This allows us to reduce Courgette-apply peak RAM by 25%, measured by "choke RAM until failure" method. Details: - We precompute Labels in AssemblyProgram::PrecomputeLabels(), which relies on RvaVisitor inherited classes for architecture-specific extraction of abs32 and rel32 targets. - TrimLabel()'s complex post-processing flow is simplified using PrecomputeLabels(), which runs before main file parse. - This requires RemoveUnusedRel32Locations() to update rel32. - Deprecating C_TRIM_FAILED error message. - Moving more common functionality to Disassembler, but duplicating some code for win32-x86 and win32-x64 to follow existing pattern. BUG=613216 Review-Url: https://codereview.chromium.org/1935203002 Cr-Commit-Position: refs/heads/master@{#394815}
- Loading branch information
1 parent
10cf76e
commit c803763
Showing
24 changed files
with
416 additions
and
253 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
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
Oops, something went wrong.