JDK-8281318 : Improve jfr/event/allocation tests reliability
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 17,18,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-07
  • Updated: 2022-03-16
  • Resolved: 2022-02-11
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 17 JDK 19
17.0.4Fixed 19 b10Fixed
Related Reports
Relates :  
Relates :  
Description
$ CONF=linux-x86-server-fastdebug make run-test TEST=jdk/jfr/event/allocation/TestObjectAllocationInNewTLABEvent.java

STDOUT:
STDERR:
java.lang.RuntimeException: Too few tlab objects allocated: expected 50 >= 80
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertGreaterThanOrEqual(Asserts.java:288)
	at jdk.jfr.event.allocation.TestObjectAllocationInNewTLABEvent.main(TestObjectAllocationInNewTLABEvent.java:78)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:828)

I think the test makes questionably assumptions about the size of byte array allocated, which fail on 32-bit platforms.
Comments
Fix Request (17u, 18u) Fixes JFR test on x86_32. Applies cleanly. Tests pass in x86_64 and x86_32 modes. Needs JDK-8281638 as the follow-up.
14-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/240 Date: 2022-03-11 15:53:57 +0000
11-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/42 Date: 2022-03-11 15:22:51 +0000
11-03-2022

Changeset: 65831eb2 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-02-11 06:45:13 +0000 URL: https://git.openjdk.java.net/jdk/commit/65831eb294b6f1f5f99988836c00005d41c27fd3
11-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7365 Date: 2022-02-07 09:34:15 +0000
07-02-2022