JDK-8211141 : jdk/jfr/event/compiler/TestCodeSweeperStats.java fails with Error: Value not atLeast1, field='sweepCount'
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-09-26
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12Resolved
Related Reports
Duplicate :  
Relates :  
Description
----------messages:(5/619)----------
command: main -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats
reason: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileOnly=jdk.jfr.event.compiler.TestCodeSweeperStats::dummyMethod -XX:+SegmentedCodeCache jdk.jfr.event.compiler.TestCodeSweeperStats 
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules jdk.jfr,java.management
elapsed time (seconds): 14.421
----------configuration:(3/51)----------
Boot Layer
  add modules: jdk.jfr java.management

----------System.out:(32/664)----------
compile 0
1 compiler directives added
compile 1
1 compiler directives added
compile 2
1 compiler directives added
compile 3
1 compiler directives added
compile 4
1 compiler directives added
compile 5
1 compiler directives added
compile 6
1 compiler directives added
compile 7
1 compiler directives added
compile 8
1 compiler directives added
compile 9
1 compiler directives added
All methods deoptimized
Error: Value not atLeast1, field='sweepCount', value='0': expected 0 >= 1
Failed event:
CodeSweeperStatistics {
  startTime = 13556792683
  sweepCount = 0
  methodReclaimedCount = 0
  totalSweepTime = 10988
  peakFractionTime = 2210
  peakSweepTime = 10988
}

----------System.err:(18/1284)----------
java.lang.RuntimeException: Value not atLeast1, field='sweepCount', value='0': expected 0 >= 1
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertGreaterThanOrEqual(Asserts.java:288)
	at jdk.test.lib.jfr.EventField.lambda$atLeast$4(EventField.java:76)
	at jdk.test.lib.jfr.EventField.doAssert(EventField.java:116)
	at jdk.test.lib.jfr.EventField.atLeast(EventField.java:76)
	at jdk.jfr.event.compiler.TestCodeSweeperStats.main(TestCodeSweeperStats.java:80)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:835)
Comments
Seems to be the same issue as JDK-8211129
26-09-2018

The problem was introduced by JDK-8132849. Roman, could you please have a look?
26-09-2018

ILW = Test fails because code cache sweeping event was not triggered, single test on tier5, no workaround = MMH = P3
26-09-2018