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

8296190: TestMD5Intrinsics and TestMD5MultiBlockIntrinsics don't test the intrinsics #10954

Closed
wants to merge 2 commits into from

Conversation

yftsai
Copy link
Contributor

@yftsai yftsai commented Nov 2, 2022

Increase WARMUP_ITERATIONS to get MD5 hash from the intrinsic.

Both TestMD5Intrinsics and TestMD5MultiBlockIntrinsics are run with options "-XX:CompileThreshold=500 -XX:Tier4InvocationThreshold=500", so the current value is too low for the intrinsic to be executed.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8296190: TestMD5Intrinsics and TestMD5MultiBlockIntrinsics don't test the intrinsics

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10954/head:pull/10954
$ git checkout pull/10954

Update a local copy of the PR:
$ git checkout pull/10954
$ git pull https://git.openjdk.org/jdk pull/10954/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10954

View PR using the GUI difftool:
$ git pr show -t 10954

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10954.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 2, 2022

👋 Welcome back yftsai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 2, 2022
@openjdk
Copy link

openjdk bot commented Nov 2, 2022

@yftsai The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Nov 2, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 2, 2022

Webrevs

Copy link
Member

@eastig eastig left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Lgtm, and trivial.

@openjdk
Copy link

openjdk bot commented Nov 2, 2022

@yftsai This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8296190: TestMD5Intrinsics and TestMD5MultiBlockIntrinsics don't test the intrinsics

Reviewed-by: eastigeevich, phh, simonis

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 706 new commits pushed to the master branch:

  • b685fc2: 8295685: Update Libpng to 1.6.38
  • 94eb25a: 8256072: Eliminate JVMTI tagmap rehashing
  • 4338f52: 8294241: Deprecate URL public constructors
  • 68209ad: 8288232: Address typos in jar man page
  • 2ff9d3a: 8294858: XMLStreamReader does not respect jdk.xml.maxXMLNameLimit=0 for namespace names
  • 72f74df: 8292427: Improve specification of InflaterInputStream.fill()
  • 53905e6: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)
  • 25dfcbd: 8289689: (fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS)
  • b7442d1: 8295653: Add a graph of the sealed class hierarchy for marked classes
  • 59a13b1: 8295872: [PPC64] JfrGetCallTrace: Need pc == nullptr check before frame constructor
  • ... and 696 more: https://git.openjdk.org/jdk/compare/d36abbe8dab3618a08a8a87f53411ed92823d471...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@eastig, @phohensee, @simonis) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 2, 2022
@yftsai
Copy link
Contributor Author

yftsai commented Nov 2, 2022

/integrate

@simonis
Copy link
Member

simonis commented Nov 2, 2022

I'm a little surprised that this isn't detected. The tests you mention have a verification step (i.e. compiler.testlibrary.intrinsics.Verifier) which should detect this. Can you please check why that is not the case and if this also affects other intrinsic tests?

Also, it is a little unfortunate, that the new warmup value still implicitly depends on the -XX:CompileThreshold=500 setting in the actual test. It would be more stable to get that value explicitly (e.g. by using the WhiteBox API) and use a strictly bigger warmup value.

Finally, I think the actual tests should be run with -Xbatch to be sure that the corresponding methods have really been compiled.

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 2, 2022
@openjdk
Copy link

openjdk bot commented Nov 2, 2022

@yftsai
Your change (at version b1ff22d) is now ready to be sponsored by a Committer.

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

I'm a little surprised that this isn't detected. The tests you mention have a verification step (i.e. compiler.testlibrary.intrinsics.Verifier) which should detect this. Can you please check why that is not the case and if this also affects other intrinsic tests?

Also, it is a little unfortunate, that the new warmup value still implicitly depends on the -XX:CompileThreshold=500 setting in the actual test. It would be more stable to get that value explicitly (e.g. by using the WhiteBox API) and use a strictly bigger warmup value.

Finally, I think the actual tests should be run with -Xbatch to be sure that the corresponding methods have really been compiled.

@phohensee
Copy link
Member

Hi, Volker. Perhaps we could let this patch go in to fix the immediate problem, and have Yifan file an issue for a definitive fix?

@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Nov 3, 2022
@yftsai
Copy link
Contributor Author

yftsai commented Nov 3, 2022

The verifier detects the intrinsic compiled/inlined somewhere, but it doesn't get executed. In other words, the verifier alone didn't guarantee the intrinsic tested. Other tests like TestSHA512Intrinsics have the same problem and are fixed as well.

WARMUP_ITERATIONS is now set strictly larger than Tier4InvocationThreshold.

Both TestMD5Intrinsics and TestMD5MultiBlockIntrinsics are run with -Xbatch.

@@ -54,7 +54,7 @@ public class DigestSanityTestBase {
private static final int MSG_SIZE = 1024;
private static final int OFFSET = 0;
private static final int ITERATIONS = 10000;
private static final int WARMUP_ITERATIONS = 550;
private static final int WARMUP_ITERATIONS = WHITE_BOX.getIntxVMFlag("Tier4InvocationThreshold").intValue() + 50;
Copy link
Member

Choose a reason for hiding this comment

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

If the flag Tier4InvocationThreshold is not set, what will happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default value, 5000, would be returned.

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

Hi Yi-Fan,

Thanks for doing the additional changes and for confirming that the test run with -Xbatch.

Looks good now.

Best regards,
Volker

@yftsai
Copy link
Contributor Author

yftsai commented Nov 3, 2022

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 3, 2022
@openjdk
Copy link

openjdk bot commented Nov 3, 2022

@yftsai
Your change (at version b11fe5a) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Lgtm.

@openjdk
Copy link

openjdk bot commented Nov 3, 2022

Going to push as commit f43bb9f.
Since your change was applied there have been 706 commits pushed to the master branch:

  • b685fc2: 8295685: Update Libpng to 1.6.38
  • 94eb25a: 8256072: Eliminate JVMTI tagmap rehashing
  • 4338f52: 8294241: Deprecate URL public constructors
  • 68209ad: 8288232: Address typos in jar man page
  • 2ff9d3a: 8294858: XMLStreamReader does not respect jdk.xml.maxXMLNameLimit=0 for namespace names
  • 72f74df: 8292427: Improve specification of InflaterInputStream.fill()
  • 53905e6: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)
  • 25dfcbd: 8289689: (fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS)
  • b7442d1: 8295653: Add a graph of the sealed class hierarchy for marked classes
  • 59a13b1: 8295872: [PPC64] JfrGetCallTrace: Need pc == nullptr check before frame constructor
  • ... and 696 more: https://git.openjdk.org/jdk/compare/d36abbe8dab3618a08a8a87f53411ed92823d471...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 3, 2022
@openjdk openjdk bot closed this Nov 3, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 3, 2022
@openjdk
Copy link

openjdk bot commented Nov 3, 2022

@phohensee @yftsai Pushed as commit f43bb9f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants