RFR: 8293170: Improve encoding of the debuginfo nmethod section [v7]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Nov 14 17:33:31 UTC 2022
On Fri, 11 Nov 2022 12:33:17 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>
> - adding jtreg test for CompressedSparseDataReadStream impl
> - align java impl to cpp impl
> - rewrite the SparseDataWriteStream not to use _curr_byte
> - introduce and call flush() excplicitly, add the gtest
> - minor renaming. adding encoding examples table
> - cleanup and rename
> - cleanup
> - rewrite code without virtual functions
> - warning fix and name fix
> - optimize the encoding
> - ... and 2 more: https://git.openjdk.org/jdk/compare/f8e33862...637c94be
src/hotspot/share/code/compressedStream.cpp line 219:
> 217:
> 218: void CompressedSparseDataWriteStream::grow() {
> 219: int nsize = _size * 2;
Signed integer overflow is UB.
The correct assert:
assert(_size <= INT_MAX / 2, "debug data size must not exceed INT_MAX");
int nsize = _size * 2;
-------------
PR: https://git.openjdk.org/jdk/pull/10025
More information about the hotspot-compiler-dev
mailing list