[jdk17u-dev] RFR: 8292989: Avoid dynamic memory in AsyncLogWriter [v2]

Xin Liu xliu at openjdk.org
Thu Aug 10 17:54:28 UTC 2023


On Thu, 10 Aug 2023 11:23:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> https://bugs.openjdk.org/browse/JDK-8309067 (not fixed, should be dealt with first)

okay.  I will work on [JDK-8309067](https://bugs.openjdk.org/browse/JDK-8309067)

> src/hotspot/share/logging/logAsyncWriter.cpp line 77:
> 
>> 75:   if (!_buffer->push_back(output, decorations, msg)) {
>> 76:     bool p_created;
>> 77:     uint32_t* counter = _stats.put_if_absent(output, 0, &p_created);
> 
> Just checking: the rewrite `add_if_absent` -> `put_if_absent` is needed, because the underlying type changed, right?

Correct. I change from hashtable.hpp to resourceHash.hpp because the later supports arena allocator.

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/1630#issuecomment-1673639791
PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1630#discussion_r1290468080


More information about the jdk-updates-dev mailing list