mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 09:53:18 +00:00
8379917: JFR: Method timing event can have incorrect minimum value
Reviewed-by: mgronlun
This commit is contained in:
parent
1ea8ef92bc
commit
28830e2155
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,10 +46,10 @@ record TimedMethod(AtomicLong invocations, AtomicLong time, AtomicLong minimum,
|
||||
while (true) {
|
||||
long max = maximum.get();
|
||||
if (duration <= max) {
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (maximum.weakCompareAndSetVolatile(max, duration)) {
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user