RFR: JDK-8307331: Correctly update line maps when class redefine rewrites bytecodes
Thomas Stuefe
stuefe at openjdk.org
Tue May 9 13:19:32 UTC 2023
On Thu, 4 May 2023 09:26:33 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
> This small change ensures that repeated bytecode rewrites necessitated by class pool index updates are applied cumulatively when updating the method line number table. The current code applies each change to the original table which means only the last one is applied (and even then with the wrong adjustment).
This looks fine to me. Thank you for the well written description text in the JBS issue.
I hesitated a bit at the use of TraceRelocator instead of our usual LogStream/LogTarget combination with UL, but I see that this is pre-existing usage, so its fine.
Another preexisting issue I noted is that CompressedWriteStream manages its internal buffer via RA, and grows inside RA too. That is suboptimal since we usually cannot reclaim the old buffer on resize since its rarely the top arena allocation. Oh, we also just allocate, we never even try resizing... (CompressedWriteStream::grow()).
-------------
PR Review: https://git.openjdk.org/jdk/pull/13795#pullrequestreview-1418608879
More information about the hotspot-runtime-dev
mailing list