RFR: 8273372: More precise ResourceMark in ReferenceProcessor

Thomas Schatzl tschatzl at openjdk.java.net
Tue Sep 7 11:25:38 UTC 2021


On Mon, 6 Sep 2021 08:26:37 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple change of moving `ResourceMark` closer to where it is actually required.
> 
> Test: tier1-6

Looking at it a bit more, probably all of these `gc, scavenge` log messages should get the same treatment with the local `ResourceMark`. They will otherwise eat tons of memory as every string for every object will be newly allocated in the resource area.

That does not preclude just removing these, but my opinion stands: at the point when you need those, you'll have likely exhausted lots of other avenues already. However maybe this is just my feeling because G1 does not have these, and there you'll need to add messages always. An alternative could be to add similar messages to G1?

It would be good if somebody else could give his opinion.

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

PR: https://git.openjdk.java.net/jdk/pull/5375



More information about the hotspot-gc-dev mailing list