RFR: 8330532: Improve line-oriented text parsing in HotSpot [v4]

Ioi Lam iklam at openjdk.org
Mon May 6 21:59:55 UTC 2024


On Thu, 2 May 2024 10:12:47 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - BlockInputStream is used by gtest only, so moved it there
>>  - removed unused set_position(), etc
>>  - removed _must_free
>
> src/hotspot/share/utilities/istream.cpp line 173:
> 
>> 171:     assert(_buffer_size > 0, "");
>> 172:     // and continue with at least a little buffer
>> 173:   }
> 
> Get rid of this branch, small buffer now default.

Fixed.

> src/hotspot/share/utilities/istream.hpp line 236:
> 
>> 234:     _end(0),
>> 235:     _next(0),
>> 236:     _line_count(0) {}
> 
> Explicitly initialize the `_small_buffer` (`0` it out?). Set `_buffer` and `_buffer_size` to the small buffer by default.

Fixed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1591598064
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1591597908


More information about the hotspot-dev mailing list