RFR: 8229517: Support for optional asynchronous/buffered logging [v17]
Xin Liu
xliu at openjdk.java.net
Fri May 21 16:48:12 UTC 2021
On Fri, 21 May 2021 09:43:36 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update according to reviewer's feedback.
>
> src/hotspot/share/logging/logFileOutput.cpp line 312:
>
>> 310: if (aio_writer != nullptr) {
>> 311: aio_writer->enqueue(*this, decorations, msg);
>> 312: return -1;
>
> Any difference between returning 0 and -1 here? Could you add some comments if any?
This is interesting! Thanks for the comment.
I take a look at logFileStreamOuptut.cpp again, `LogFileStreamOutput::write` returns -1 when it runs into some errors.
I feel it's more appropriate to return 0 here. The value suggests that 'succeed but the written bytes is unknown.'
so far, it doesn't matter because nobody reads this return value.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3135
More information about the hotspot-dev
mailing list