From: Jeff A. <ja...@fa...> - 2021-01-07 18:18:53
|
On 07/01/2021 11:50, Andrew Haley wrote: > On 1/6/21 4:28 PM, Jeff Allen wrote: >>> And to see if intrinsic methods are being utilized or not and where in >>> compiled code, you can add: >>> -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions >>> -XX:+PrintInlining >>> >> Unlock has to come first, it seems. I've experimented with those options >> and found what they produced was pretty incomprehensible. I never made >> the disassembly option work. > If you're interested in persisting a bit more, I can help with this. I did persist thanks, and found a pre-built hsdis which produced the disassembly from which I got the few lines in the e-mail. (Also, I confess I am working on Windows.) So now I just have the comprehension problem. I will return to this, but for now it is enough to have a sense where it falls short. Some of the things I hoped for happen, some don't, and I know roughly what I will try. >> Going back and trying a little harder, thanks to your suggestion, I got >> further this morning. The output remains too complex for me to follow >> (so many jumps!), but a superficial inspection supports the conjectures >> I made based only on timing. > WRT intrinsics: if there's something important, we can do it. Thanks! I don't think I know yet what would be critical, but will bank the offer. Thad is clearly knowledgeable in this area, but I didn't see the mixed results from my first use of invokedynamic as a failure of the JVM to use intrinsics. I've probably misunderstood. The method handle adaptors mostly represent stack manipulations (or simply register selections) around the ultimate arithmetic operations, and I think the JVM will get the idea if I can decrease the nesting to the point where inlining completes. However, if it doesn't do so in critical cases, it's good to have somewhere to go. Jeff Allen |