RFR: 8293170: Improve encoding of the debuginfo nmethod section [v9]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Nov 14 17:33:20 UTC 2022
On Mon, 14 Nov 2022 16:01:01 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:
>> The nmethod "scopes data" section is 10% of the size of nmethod. Now the data is compressed using the Pack200 algorithm, which is good for encoding small integers (LineNumberTable, etc). Using the fact that half of the data in the partition contains zeros, I reduce its size by another 30%.
>>
>> Testing: jtreg hotspot&jdk, Renaissance benchmarks
>
> Boris Ulasevich has updated the pull request incrementally with one additional commit since the last revision:
>
> warning fix
Changes requested by eastigeevich (Committer).
src/hotspot/share/code/compressedStream.cpp line 192:
> 190: if (_position >= _size) {
> 191: grow();
> 192: }
Now we have these checks spread across the code.
There are two actions changing `_postion`:
- `_position++`
- `set_position`
We can replace `_position++` with `inc_position` where we can have the check with `grow`.
Regarding `set_position `, I have looked at its current uses.
Its uses are to support shared debug info:
- We write info.
- We check if we have written the same info.
- If yes, we use the one written before and roll back position.
If I haven't missed other uses, the meaning of `set_position` is to roll back. In such case, no `grow` is needed. I suggest to rename `set_position` to `roll_back_to` or `move_back_to`.
src/hotspot/share/code/compressedStream.hpp line 184:
> 182: }
> 183:
> 184: void flush() {
Why do we need `flush` if we modify data in place?
-------------
PR: https://git.openjdk.org/jdk/pull/10025
More information about the hotspot-compiler-dev
mailing list