mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-17 05:45:05 +00:00
8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks
Reviewed-by: sgehwolf, alanb
This commit is contained in:
parent
2b6dbc71d8
commit
dd18d76b4c
@ -49,8 +49,8 @@ class OperatingSystemImpl extends BaseOperatingSystemImpl
|
||||
private ContainerCpuTicks processLoadTicks = new ProcessCpuTicks();
|
||||
|
||||
private abstract class ContainerCpuTicks {
|
||||
private long usageTicks = 0;
|
||||
private long totalTicks = 0;
|
||||
private volatile long usageTicks;
|
||||
private volatile long totalTicks;
|
||||
|
||||
private double getUsageDividesTotal(long usageTicks, long totalTicks) {
|
||||
// If cpu quota or cpu shares are in effect. Calculate the cpu load
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user