On Thu, 7 Oct 2021 05:54:55 GMT, Kim Barrett <kbarr...@openjdk.org> wrote:
>> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotspot/share/asm/codeBuffer.hpp line 369: > >> 367: // addresses in a sibling section. >> 368: >> 369: class CodeBuffer: public ResourceObj DEBUG_ONLY(COMMA private Scrubber) >> { > > Deriving from ResourceObj rather than the previous fakery seems good. I > think the multiple-inheritance derivation from Scrubber could be removed, > instead adding ~CodeBuffer to do the zapping. That was how it looked when I started this fix (and it was rebased out to the Scrubber class by JDK-8264207). I will not change it back in this fix as the multiple inheritance problem is not introduced here. Another reason is that the authors of JDK-8264207 must have thought it looked better the way it is now. Personally I do not know. > src/hotspot/share/memory/allocation.cpp line 154: > >> 152: >> 153: #ifdef ASSERT >> 154: thread_local ResourceObj::RecentAllocations >> ResourceObj::_recent_allocations; > > Don't use `thread_local`. See the style guide. Will fix. ------------- PR: https://git.openjdk.java.net/jdk/pull/5387