Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate openjdk tests for openj9 and hotspot #2198

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

LongyuZhang
Copy link
Contributor

Signed-off-by: Longyu Zhang longyu.zhang@ibm.com

- Set paramaters in mk file for j9 and hotspot

Signed-off-by: Longyu Zhang <longyu.zhang@ibm.com>
@LongyuZhang
Copy link
Contributor Author

Test Links:

jdk16:
-j9: xliinux: 13415 zlinux: 13425 aix: 13422 mac: 13423 win: 13424
(Only failed with know issue: SealedClassesReflectionTest )
-hotspot: xlinux: 13418

jdk11:
-j9: xliinux: 13414
-hotspot: xlinux: 13417

jdk8:
-j9: xlinux: 13413
-hotspot: xlinux: 13416

Copy link
Contributor

@llxia llxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@llxia llxia requested a review from smlambert January 23, 2021 16:27
Copy link
Contributor

@sophia-guo sophia-guo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the change should also work in AdoptOpenJDK. I would prefer to have some grinders in AdoptOpenJDK so the reviewer can take a look at.

Copy link
Contributor

@smlambert smlambert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LongyuZhang and @llxia - I am very happy these are re-consolidated! We should make sure to announce broadly on OpenJ9 channels, in case people have grown accustomed to the _j9 target names.

@sophia-guo
Copy link
Contributor

sophia-guo commented Jan 23, 2021

I actually have one more question. Targets like jdk_lang against hotspot is running with Mode150 (-XX:+UseCompressedOops ), which looks no harm with this specific option. However as a strategy if later we need use a different mode Mode***, which is specific to openj9). What would it happen? Actually I will launch a grinder with arm32, will this work? it may work if Mode150 is "no" to 32. Faied with Mode1000, not sure.

https://ci.adoptopenjdk.net/view/work-in-progress/job/grinder_sandbox/243/console

Mode*** is kind of openj9 options adding to hotspot may or may not work.

@llxia
Copy link
Contributor

llxia commented Jan 23, 2021

Openj9 specific modes should not be used against hotspot. If we need to add an additional openj9 specific mode, then we need to create a separate target for it. Similar to tests in special.system. The purpose of this PR is to consolidate the targets if it is possible. At this point, Mode150, Mode650, Mode1000, and NoOptions are common modes that can be used for both openj9 and hotspot.

@sophia-guo
Copy link
Contributor

Ok, I forgot Mode150 and Mode 650 are introduced on purpose by #2146

@smlambert
Copy link
Contributor

smlambert commented Jan 23, 2021

For the time being there is no plan to repeat this set of tests with variations that are not common to all.

In the event that someone wants to add <variation>someVendorSpecific options</variation> our PR testing would tank, and the PR would have to be reworked... to either return to the duplication of targets with <vendor> tags or put the options in the openjdk.mk file as done with some j9 specifics in this PR.

Noting the behaviour of the different implementations are different. If you run with an option that hotspot does not recognize, it will hard stop and not run. On the reverse, if openj9 encounters an unrecognized option it warns about it and continues to run.

@sophia-guo
Copy link
Contributor

sophia-guo commented Jan 23, 2021

Not a blocker for merging this PR. Just throw out some thoughts for discussion.

If we need to add an additional openj9 specific mode, then we need to create a separate target for it.

That means it will depends on developer's knowledge to judge if the Mode*** is vendor specific. And based no that or based on the PR build results to decide if separate target need to be added. There is no extra documents to tell other developers or testers or triagers this information. I think it might be helpful if we can document this information( Mode*** ---> vendor).

If we will continue to use Mode story I think https://github.com/AdoptOpenJDK/TKG/blob/master/resources/modes.xml could help. All modes defined here are actually define key-value <envVar name="OPENJ9_JAVA_OPTIONS" value="****"/> https://github.com/AdoptOpenJDK/TKG/blob/master/resources/modes.xml.

Mode150:

	<mode number="150">
		<description>compressed references</description>
		<settings>
			<setting type="either">
				<clArg>-XX:+UseCompressedOops</clArg>
				<envVar name="OPENJ9_JAVA_OPTIONS" value="-XX:+UseCompressedOops"/>
			</setting>
		</settings>
	</mode>

Is it possible we use envVar to discriminate different Vendor/impl's JAVA_OPTIONS? or adding an element |< vendor> to define which the Mode works with which impl | vendor? Similar to the use of |< vendor> in playlist.xml. This way we will not need to separate targets based on if Mode works or not. Though there will be extra jobs for TKG. Just my two cents.

@smlambert
Copy link
Contributor

smlambert commented Jan 24, 2021

Good notes - I had thought about vendor specific variants (and leveraging the modes.xml / ottawa.csv mechanism that already skips for platforms to have TKG skip for impls, strip out modes that can't be used for a particular impl). We can watch to see if we have a use case for having to solve for this problem or not... it could be something lurking in the future.

Employing that approach would allow us to utilize more of the functional suite against the hotspot impl, which would be in itself a worthy reason (some functional tests would still be tagged as only openj9/ibm because they use internals, etc, but many are just tagged that way because of the modes in use).

@smlambert
Copy link
Contributor

I believe we are all good on this change, with the follow-up task of announcing it in Slack channels (for awareness of people who may be affected by the reunification of target names).

@smlambert smlambert merged commit 465d049 into adoptium:master Jan 25, 2021
@LongyuZhang
Copy link
Contributor Author

@smlambert Thanks for merging this PR.
BTW, the Adopt grinder also passed as @sophia-guo suggested:
jdk16:
-j9: xliinux: 6074 zlinux: 6076 aix: 6077 mac: 6078 win: 6079
-hotspot: xlinux: 6069

jdk11:
-j9: xliinux: 6075
-hotspot: xlinux: 6068

jdk8:
-j9: xlinux: 6065
-hotspot: xlinux: 6080

@smlambert
Copy link
Contributor

thanks @LongyuZhang !

@karianna karianna added this to the January 2021 milestone Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants