RFR: 8293170: Improve encoding of the debuginfo nmethod section [v16]
Evgeny Astigeevich
eastigeevich at openjdk.org
Tue Dec 13 13:48:41 UTC 2022
On Tue, 6 Dec 2022 16:38: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 with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>
> - minor api refactoring: start_scope and roll_back instead of position and set_position
> - buffer() returns const array
> - cleanup, rename
> - warning fix
> - add test for buffer grow
> - 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
> - ... and 7 more: https://git.openjdk.org/jdk/compare/1e468320...e9269942
Hotspot/share/code looks good to me. Just a few minor changes.
src/hotspot/share/code/compressedStream.hpp line 121:
> 119:
> 120: public:
> 121: CompressedSparseData(int position = 0) {
As it is one-argument constructor, let it be `explicit CompressedSparseData`.
src/hotspot/share/code/compressedStream.hpp line 201:
> 199: // Start grouped data. Return a byte offset position in the stream where grouped data begins
> 200: int start_scope() {
> 201: align(); // a side effect!
I think we don't need the comment here.
src/hotspot/share/code/compressedStream.hpp line 209:
> 207: _position = pos;
> 208: _bit_position = 0;
> 209: assert(_position < _size, "set_position is only used for rollback");
Should we change the assert and move it to the beginning of the function?
assert(pos <= _position, "new position must be rollback the current position"
-------------
Changes requested by eastigeevich (Committer).
PR: https://git.openjdk.org/jdk/pull/10025
More information about the hotspot-compiler-dev
mailing list