RFR: 8310170: Use sp's argument to improve performance of outputStream::indent and remove SP_USE_TABS [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Jul 4 12:59:00 UTC 2023


On Tue, 4 Jul 2023 12:46:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove SP_USE_TABS
>
> src/hotspot/share/utilities/ostream.cpp line 190:
> 
>> 188: 
>> 189: void outputStream::sp(int count) {
>> 190:   if (count < 0)  return;
> 
> Is this  needed?

The `count < 0` check? Yes, as Shipilev mentioned:

>Looks okay. I thought what would happen if _indentation < _position, but sp() seems to handle count < 0 fine.

So it's nice that we don't have to care at the call site.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14502#discussion_r1251996343


More information about the hotspot-runtime-dev mailing list