RFR: 8339492: StackMapDecoder::writeFrames makes lots of allocations [v2]
David M. Lloyd
duke at openjdk.org
Wed Sep 4 13:24:18 UTC 2024
On Wed, 4 Sep 2024 01:06:10 GMT, Shaojin Wen <swen at openjdk.org> wrote:
> It looks good, but can you provide the codeSize before and after the change? For example, add the JVM startup parameters `-XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining` to find `writeFrames` and see if this PR will change from less than 325 to greater than 325.
>
> If codeSize changes from less than 325 to >325, the code that constructs the exception can be extracted to a separate method. String concatenation in java.base is implemented using StringBuilder, which will cause codeSize to expand.
I'm still trying to find a test which I can run that exercises this method. But in the meantime I did look at it with `javac` and the bytecode size of the method is 213 bytes, so I would expect it to be OK. If that's good enough then I'll leave it there, otherwise I'll keep trying to find test(s) which exercise this method.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20841#issuecomment-2329032795
More information about the core-libs-dev
mailing list