Profile counters can cause severe performance degradation when several threads are executing the same code.
This can be remedied by updating the shared profile counters less frequently, maintaining some thread-local counters. This will inevitably mean that generated profile code will be more complex and impose more runtime overhead, albeit overhead that does not rapidly rise with thread count. Therefore a different profiling mode would be needed, probably enabled by a command-line switch and perhaps a JMX control.
Ref: "The Cost of Profiling in the HotSpot Virtual Machine" https://dl.acm.org/doi/10.1145/3679007.3685055
This can be remedied by updating the shared profile counters less frequently, maintaining some thread-local counters. This will inevitably mean that generated profile code will be more complex and impose more runtime overhead, albeit overhead that does not rapidly rise with thread count. Therefore a different profiling mode would be needed, probably enabled by a command-line switch and perhaps a JMX control.
Ref: "The Cost of Profiling in the HotSpot Virtual Machine" https://dl.acm.org/doi/10.1145/3679007.3685055
- duplicates
-
JDK-8134940 TieredCompilation profiling can exhibit poor scalability
-
- Open
-