Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Add an option to enable relocating new translations and prologues into dead regions in the TC. The recycle-tc interface handles tracking and updating TC meta-data when recycling old translations, and a new ReusableCodeBlock class allows free/allocInner to track free ranges within the TC. For the most part code has to be written at the frontier and relocated into a free region. The allocator is currently pretty dumb, it can coalesce adjacent blocks, and adjust the frontier of the code-block. I didn't group free regions into size classes, or do much other than favoring low addresses to prevent fragmentation. At some point it may be worth exploring TC compaction by relocating live translations to fill free code-blocks. Tests with sandcastle have shown that the current method is a noticable improvement. For now the option is defaulted to off (unless built with HHVM_REUSE_TC), it may be worth having it on in non-repo mode by default. Reviewed By: @markw65 Differential Revision: D1989755
- Loading branch information
Showing
25 changed files
with
1,257 additions
and
80 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
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.