RFR(s): 8224193: stringStream should not use Resouce Area

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon May 20 14:56:38 UTC 2019


Hi Thomas, 

this looks good and it would be great to get rid of the 
limitation to nested ResourceMarks.

But I see two advantages of the resource allocation we
lose with your change:
  * Cache locality. Repeated allocations will all use the same
    memory in the arena keeping cache misses (even cold misses)
    minimal.
  * The resource area is designed to have very low overhead of
     the memory management.  

What do you think?

... I like the optimization of as_String() you propose in the other
change :)

Best regards,
  Goetz.

> -----Original Message-----
> From: hotspot-runtime-dev <hotspot-runtime-dev-bounces at openjdk.java.net>
> On Behalf Of Thomas Stüfe
> Sent: Montag, 20. Mai 2019 15:25
> To: Hotspot dev runtime <hotspot-runtime-dev at openjdk.java.net>
> Subject: RFR(s): 8224193: stringStream should not use Resouce Area
> 
> Hi all,
> 
> may I please have reviews for the following bug fix:
> 
> issue: https://bugs.openjdk.java.net/browse/JDK-8224193
> cr:
> http://cr.openjdk.java.net/~stuefe/webrevs/8224193-stringstream-shall-not-
> use-resource-array/webrev.00/webrev/
> 
> In short, stringStream uses resource area which is a poor choice -
> depending on the logging we do, this may crash or assert and if it does not
> it at least wastes memory.
> 
> Note that I kept the change as simple as possible. There are other possible
> improvements beside pure code cleanup, for which I opened follow up issues
> https://bugs.openjdk.java.net/browse/JDK-8224212 and
> https://bugs.openjdk.java.net/browse/JDK-8224213.
> 
> Thanks, Thomas


More information about the hotspot-runtime-dev mailing list