RFR(s): 8224193: stringStream should not use Resouce Area
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Mon May 20 22:05:26 UTC 2019
http://cr.openjdk.java.net/~stuefe/webrevs/8224193-stringstream-shall-not-use-resource-array/webrev.00/webrev/test/hotspot/gtest/utilities/test_ostream.cpp.html
In the test, you don't use the argument short_len, but pass true.
55 written += print_lorem(&ss, true);
This change makes a lot of sense, and is better than moving around
ResourceMarks outside of print functions to be in the outermost scope of
whatever string one is trying to print. I fixed the typo in the bug, so
can you fix it in the synopsis when you check it in as well.
Thanks,
Coleen
On 5/20/19 9:25 AM, Thomas Stüfe wrote:
> 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