RFR: 8229517: Support for optional asynchronous/buffered logging [v17]
Albert Mingkun Yang
ayang at openjdk.java.net
Fri May 21 18:38:31 UTC 2021
On Fri, 21 May 2021 17:29:47 GMT, Xin Liu <xliu at openjdk.org> wrote:
> remove if not in use?
Yes, please.
Shouldn't this assertion be triggered as it is now? Why no failing tests?
>> 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.
I see; `0` seems better then. Thanks for the clarification.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3135
More information about the hotspot-dev
mailing list