RFR: 8310170: Use sp's argument to improve performance of outputStream::indent and remove SP_USE_TABS [v2]
Thomas Stuefe
stuefe at openjdk.org
Tue Jul 4 13:14:53 UTC 2023
On Tue, 4 Jul 2023 12:56:32 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> 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.
Ah, okay. Missed that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14502#discussion_r1252014298
More information about the hotspot-runtime-dev
mailing list