On Fri, 23 Sep 2022 19:53:56 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Try out Coleen's suggestion > > src/hotspot/share/memory/allocation.hpp line 219: > >> 217: }; >> 218: >> 219: class DynCHeapObj { > > I tried this and it seems to work: If you make CHeapObj new operators take > MEMFLAGS f = F, where F is the default value, you could not have this class > and make outputStream inherit from CHeapObj<mtInternal\> and the new calls > will override mtInternal. I guess the risk is that you get mtInternal if you > forget the parameter to new. Good idea! I implemented this instead. > src/hotspot/share/opto/compile.cpp line 4413: > >> 4411: // print_inlining_init is actually called several times. >> 4412: print_inlining_stream_free(); >> 4413: _print_inlining_stream = new (mtCompiler) stringStream(); > > These now need a delete (which is good because it doesn't need an explicit > destructor call). We'll wait and see how https://github.com/openjdk/jdk/pull/10396 turns out before merging this :-). ------------- PR: https://git.openjdk.org/jdk/pull/10412