RFR: 8341481: [perf] vframeStreamCommon constructor may be optimized
Derek White
drwhite at openjdk.org
Fri Nov 22 18:11:17 UTC 2024
On Sat, 16 Nov 2024 00:20:10 GMT, Vladimir Ivanov <vaivanov at openjdk.org> wrote:
> Optimize constructor to skip extra copy for registers. The tier1 tests are OK. The Specjvm2008 benchmark reports ~1% improvement.
@kimbarrett - Hi! This is the issue with copy constructors that I mentioned in the parking lot a while back.
The existing code for stack walking by vFrames is allocating multiple KB for 2 temporary RegisterMap structs, and copying between them via default copy constructors. The temps are unnecessary.
We believe the performance boost in SPECjbb and SPECjvm:serial are more due to not polluting the L1 cache (improving cache hit rates of other code) than the actual instruction overhead of the copy.
I tried to make the RegisterMap copy constructor private so no one would use it, but there are one or two cases that still use the copy constructor that we didn't have a fix for - maybe you'll see something. Oops, I can't find the examples right off.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22173#issuecomment-2494459792
More information about the serviceability-dev
mailing list