RFR: 8251850: Simplify ResourceMark constructors using delegation
Kim Barrett
kim.barrett at oracle.com
Tue Aug 25 02:30:30 UTC 2020
> On Aug 22, 2020, at 2:13 AM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
> Good.
>
> + // Only report the first occurrence of an allocating thread that
> + // is missing a ResourceMark, to avoid possible recursive errors
> + // in error handling.
>
> The comment is clear. Should be still clear 40 years from now when we all moved on from git and there is only one guy left who can read git history :)
Assuming nobody deletes most of the comment (as happened to the original comment) and that
git history is still readable. I’ve lost *so* much digital data due to formats becoming unreadable.
> Very minor nit: comment is somewhat imprecise here:
>
> + case 18: {
> + // Allocation from resource area without a ResourceMark.
> + Thread::current()->resource_area()->allocate_bytes(100);
> + break;
> + }
>
> because this is only true if this function is called from argument handling where no RM has been established yet.
Good point. I've tweaked the code and the comment.
New webrevs:
full: https://cr.openjdk.java.net/~kbarrett/8251850/open.03/
incr: https://cr.openjdk.java.net/~kbarrett/8251850/open.03.inc/
Reran the ErrorHandler.java test locally.
> I am fine with this change. I leave if up to you if you change the comment or not.
>
> Cheers, Thomas
Thanks, but since I (lightly) touched the code again…
More information about the hotspot-runtime-dev
mailing list