-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jit: func_line alignment for line table
The changes from 5b4457e cause the line table to have extra entries when handling the last_error_offset. The line number from the subsequent function is mapped to the nop instruction following the error, and as a result, the line table suggests that the line is mapped in the former and current range. As an example, if you enable logging in jit-reader.c, and look for sets.erl, you would see something like: ``` Add range `sets:new/0-CodeInfoPrologue` (0x7f5fddf03f18, 0x7f5fddf03f48), 0 lines Add range `sets:new/0` (0x7f5fddf03f48, 0x7f5fddf04008), 3 lines sets.erl:170 sets.erl:171 sets.erl:177 Add range `sets:new/1-CodeInfoPrologue` (0x7f5fddf04008, 0x7f5fddf04038), 0 lines Add range `sets:new/1` (0x7f5fddf04038, 0x7f5fddf04118), 2 lines sets.erl:177 sets.erl:180 ``` which shows that line 177 is included twice, despite only being for sets:new/1. This can also be identified by using this GDB command: `maintenance info line-table sets.erl`. Move func_line back after the func label and emit the last error nop before the label. This ensures that the line is within the (possibly aligned) func range.
- Loading branch information
1 parent
36fb786
commit e5a9522
Showing
7 changed files
with
66 additions
and
35 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