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

8311220: Optimization for StringLatin UpperLower #14751

Conversation

wenshao
Copy link
Contributor

@wenshao wenshao commented Jul 3, 2023

Benchmark Result

sh make/devkit/createJMHBundle.sh
bash configure --with-jmh=build/jmh/jars
make test TEST="micro:java.lang.StringUpperLower.*"

1. aliyun_ecs_c8i.xlarge

  • cpu : intel xeon sapphire rapids (x64)
-Benchmark                      Mode  Cnt   Score   Error  Units (baseline)
-StringUpperLower.lowerToLower  avgt   15  27.180 ± 0.017  ns/op
-StringUpperLower.lowerToUpper  avgt   15  47.196 ± 0.066  ns/op
-StringUpperLower.mixedToLower  avgt   15  32.307 ± 0.072  ns/op
-StringUpperLower.mixedToUpper  avgt   15  44.005 ± 0.414  ns/op
-StringUpperLower.upperToLower  avgt   15  32.310 ± 0.033  ns/op
-StringUpperLower.upperToUpper  avgt   15  42.053 ± 0.341  ns/op

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 01)
+StringUpperLower.lowerToLower  avgt   15  16.964 ± 0.021  ns/op (+60.96%)
+StringUpperLower.lowerToUpper  avgt   15  46.491 ± 0.036  ns/op (+1.51%)
+StringUpperLower.mixedToLower  avgt   15  35.947 ± 0.254  ns/op (-10.12%)
+StringUpperLower.mixedToUpper  avgt   15  41.976 ± 0.326  ns/op (+4.83%)
+StringUpperLower.upperToLower  avgt   15  33.466 ± 4.036  ns/op (-3.45%)
+StringUpperLower.upperToUpper  avgt   15  17.446 ± 1.036  ns/op (+141.04%)

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 00)
+StringUpperLower.lowerToLower  avgt   15  16.976 ± 0.043  ns/op (+60.160)
+StringUpperLower.lowerToUpper  avgt   15  46.373 ± 0.086  ns/op (+1.77%)
+StringUpperLower.mixedToLower  avgt   15  32.018 ± 0.061  ns/op (+0.9%)
+StringUpperLower.mixedToUpper  avgt   15  42.019 ± 0.473  ns/op (+4.72%)
+StringUpperLower.upperToLower  avgt   15  32.052 ± 0.051  ns/op (+0.8%)
+StringUpperLower.upperToUpper  avgt   15  16.978 ± 0.190  ns/op (+147.69%)

2. aliyun_ecs_c8a.xlarge

  • cpu : amd epc genoa (x64)
-Benchmark                      Mode  Cnt   Score   Error  Units (baseline)
-StringUpperLower.lowerToLower  avgt   15  22.164 ± 0.021  ns/op
-StringUpperLower.lowerToUpper  avgt   15  46.113 ± 0.047  ns/op
-StringUpperLower.mixedToLower  avgt   15  28.501 ± 0.037  ns/op
-StringUpperLower.mixedToUpper  avgt   15  38.782 ± 0.038  ns/op
-StringUpperLower.upperToLower  avgt   15  28.625 ± 0.162  ns/op
-StringUpperLower.upperToUpper  avgt   15  27.960 ± 0.038  ns/op

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 01)
+StringUpperLower.lowerToLower  avgt   15  15.268 ± 0.015  ns/op (+45.16%)
+StringUpperLower.lowerToUpper  avgt   15  47.125 ± 0.183  ns/op (-2.14%)
+StringUpperLower.mixedToLower  avgt   15  31.120 ± 0.434  ns/op (-8.41%)
+StringUpperLower.mixedToUpper  avgt   15  38.150 ± 0.062  ns/op (-1.65%)
+StringUpperLower.upperToLower  avgt   15  29.254 ± 3.628  ns/op (-2.15%)
+StringUpperLower.upperToUpper  avgt   15  17.415 ± 0.024  ns/op (+60.55%)

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 00)
+StringUpperLower.lowerToLower  avgt   15  15.273 ± 0.012  ns/op (+45.18%)
+StringUpperLower.lowerToUpper  avgt   15  46.939 ± 0.037  ns/op (-1.75%)
+StringUpperLower.mixedToLower  avgt   15  27.978 ± 0.015  ns/op (+1.86%)
+StringUpperLower.mixedToUpper  avgt   15  38.120 ± 0.047  ns/op (+1.73%)
+StringUpperLower.upperToLower  avgt   15  27.994 ± 0.053  ns/op (+2.25%)
+StringUpperLower.upperToUpper  avgt   15  17.405 ± 0.006  ns/op (+60.64%)

3. aliyun_ecs_c8y.xlarge

  • cpu : aliyun yitian 710 (aarch64)
-Benchmark                      Mode  Cnt   Score   Error  Units (baseline)
-StringUpperLower.lowerToLower  avgt   15  29.035 ± 0.142  ns/op
-StringUpperLower.lowerToUpper  avgt   15  85.791 ± 0.387  ns/op
-StringUpperLower.mixedToLower  avgt   15  40.410 ± 1.023  ns/op
-StringUpperLower.mixedToUpper  avgt   15  72.904 ± 0.682  ns/op
-StringUpperLower.upperToLower  avgt   15  40.495 ± 0.990  ns/op
-StringUpperLower.upperToUpper  avgt   15  39.665 ± 0.036  ns/op

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 01)
+StringUpperLower.lowerToLower  avgt   15  23.253 ± 0.052  ns/op (+24.86%)
+StringUpperLower.lowerToUpper  avgt   15  84.439 ± 0.542  ns/op (+1.60%)
+StringUpperLower.mixedToLower  avgt   15  36.637 ± 1.616  ns/op (+10.29%)
+StringUpperLower.mixedToUpper  avgt   15  72.239 ± 1.287  ns/op (+0.92%)
+StringUpperLower.upperToLower  avgt   15  37.384 ± 1.698  ns/op (+8.32%)
+StringUpperLower.upperToUpper  avgt   15  17.571 ± 0.168  ns/op (+125.74%)

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 00)
+StringUpperLower.lowerToLower  avgt   15  23.222 ± 0.035  ns/op (+25.03%)
+StringUpperLower.lowerToUpper  avgt   15  84.958 ± 0.725  ns/op (+0.98%)
+StringUpperLower.mixedToLower  avgt   15  40.931 ± 0.947  ns/op (-1.27%)
+StringUpperLower.mixedToUpper  avgt   15  71.845 ± 1.128  ns/op (+1.47%)
+StringUpperLower.upperToLower  avgt   15  40.967 ± 1.430  ns/op (-1.52%)
+StringUpperLower.upperToUpper  avgt   15  17.545 ± 0.159  ns/op (+126.07%)

4. MacBookPro M1 Pro

-Benchmark                      Mode  Cnt   Score    Error  Units (baseline)
-StringUpperLower.lowerToLower  avgt   15  22.454 ±  0.160  ns/op
-StringUpperLower.lowerToUpper  avgt   15  60.394 ±  8.811  ns/op
-StringUpperLower.mixedToLower  avgt   15  57.825 ± 10.782  ns/op
-StringUpperLower.mixedToUpper  avgt   15  57.414 ±  7.899  ns/op
-StringUpperLower.upperToLower  avgt   15  55.500 ± 10.547  ns/op
-StringUpperLower.upperToUpper  avgt   15  24.637 ±  0.146  ns/op

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 01)
+StringUpperLower.lowerToLower  avgt   15  15.445 ± 0.250  ns/op (+45.38%)
+StringUpperLower.lowerToUpper  avgt   15  61.510 ± 6.137  ns/op (-1.81%)
+StringUpperLower.mixedToLower  avgt   15  53.643 ± 7.837  ns/op (+7.98%)
+StringUpperLower.mixedToUpper  avgt   15  63.017 ± 9.045  ns/op (-8.88%)
+StringUpperLower.upperToLower  avgt   15  49.983 ± 8.048  ns/op (+11.03%
+StringUpperLower.upperToUpper  avgt   15  10.717 ± 0.012  ns/op (+129.88%)

+Benchmark                      Mode  Cnt   Score   Error  Units (Update 00)
+StringUpperLower.lowerToLower  avgt   15  15.854 ± 0.032  ns/op (+41.62%)
+StringUpperLower.lowerToUpper  avgt   15  48.417 ± 0.305  ns/op (+24.73%)
+StringUpperLower.mixedToLower  avgt   15  36.338 ± 0.346  ns/op (+59.13%)
+StringUpperLower.mixedToUpper  avgt   15  42.371 ± 0.376  ns/op (+35.50%)
+StringUpperLower.upperToLower  avgt   15  36.342 ± 0.324  ns/op (+52.71%)
+StringUpperLower.upperToUpper  avgt   15  11.149 ± 0.018  ns/op (+120.97%)

5. Orange Pi 5 Plus

CPU : Rockchip RK3588 (aarch64)

-Benchmark                      Mode  Cnt    Score   Error  Units (baseline)
-StringUpperLower.lowerToLower  avgt   15   64.597 ± 0.211  ns/op
-StringUpperLower.lowerToUpper  avgt   15  146.723 ± 1.420  ns/op
-StringUpperLower.mixedToLower  avgt   15   78.629 ± 0.589  ns/op
-StringUpperLower.mixedToUpper  avgt   15  124.889 ± 1.358  ns/op
-StringUpperLower.upperToLower  avgt   15   78.981 ± 1.318  ns/op
-StringUpperLower.upperToUpper  avgt   15   61.466 ± 0.150  ns/op

+Benchmark                      Mode  Cnt    Score   Error  Units (Update 01)
+StringUpperLower.lowerToLower  avgt   15   40.878 ± 0.117  ns/op (+58.02%)
+StringUpperLower.lowerToUpper  avgt   15  133.625 ± 1.620  ns/op (+9.80%)
+StringUpperLower.mixedToLower  avgt   15   64.574 ± 3.145  ns/op (+21.76%)
+StringUpperLower.mixedToUpper  avgt   15  120.725 ± 0.640  ns/op (+3.44%)
+StringUpperLower.upperToLower  avgt   15   62.394 ± 1.001  ns/op (+26.58%)
+StringUpperLower.upperToUpper  avgt   15   30.765 ± 0.050  ns/op (+99.79%)

+Benchmark                      Mode  Cnt    Score   Error  Units (Update 00)
+StringUpperLower.lowerToLower  avgt   15   41.060 ± 0.254  ns/op (+57.32%)
+StringUpperLower.lowerToUpper  avgt   15  136.750 ± 4.522  ns/op (+7.29%)
+StringUpperLower.mixedToLower  avgt   15   77.984 ± 0.953  ns/op (+8.27%)
+StringUpperLower.mixedToUpper  avgt   15  121.449 ± 1.466  ns/op (+2.83%)
+StringUpperLower.upperToLower  avgt   15   77.787 ± 0.722  ns/op (+1.53%)
+StringUpperLower.upperToUpper  avgt   15   30.798 ± 0.145  ns/op (+99.57%)

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-8311220: Optimization for StringLatin UpperLower (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14751

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 3, 2023

👋 Welcome back wenshao! 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 Jul 3, 2023
@openjdk
Copy link

openjdk bot commented Jul 3, 2023

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Jul 3, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 3, 2023

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 3, 2023

@wenshao This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@wenshao
Copy link
Contributor Author

wenshao commented Aug 6, 2023

Is anyone working on this PR?

@wenshao
Copy link
Contributor Author

wenshao commented Aug 24, 2023

@AlanBateman It has been more than 1 month, can you help me to review this PR?

@wenshao
Copy link
Contributor Author

wenshao commented Aug 25, 2023

@AlanBateman can you help me to review this PR?

@wenshao
Copy link
Contributor Author

wenshao commented Aug 31, 2023

@cl4es can you help me to review this PR?

Copy link
Member

@cl4es cl4es left a comment

Choose a reason for hiding this comment

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

I think this overall looks reasonable, but I think a more thorough proof / test would help to build confidence that all these changes are semantically neutral.

The isLowerCaseEx needs to explain why two lower-case codepoints are omitted (perhaps this should be hasUpperCase?)

@@ -90,6 +90,10 @@ class CharacterDataLatin1 extends CharacterData {
return (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
}

boolean isLowerCaseEx(int ch) {
return ch >= 'a' && (ch <= 'z' || ch == 181 || (ch >= 223 && ch != 247));
Copy link
Member

Choose a reason for hiding this comment

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

What is the contract for this? Specifically there are two special superscripte codepoints (170 and 186) which are lower-case (Character.isLowerCase(170) => true) but doesn't have an upper-case (Character.toUpperCase(170) => 170). It seems reasonable to exclude them if only used for operations like toUpper/toLower (since they won't change), but it should be spelled out to avoid surprises.

For consistency I think we should use hex literals in this file, e.g. 0xDF instead of 223

Copy link
Contributor Author

@wenshao wenshao Sep 1, 2023

Choose a reason for hiding this comment

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

The current implementation of the isLowerCaseEx method and the previous implementation "cp != CharacterDataLatin1.instance.toUpperCaseEx(cp)"
The result is exactly the same.

The code below compares all numbers in [-128, 128]

import sun.misc.Unsafe;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;

public class CharacterDataLatin1Test {
    public static void main(String[] args) throws Throwable {
        for (int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; ++i) {
            byte b = (byte) i;
            int cp = b & 0xff;

            boolean r0 = cp != toUpperCaseEx(cp);
            boolean r1 = isLowerCaseEx(cp);
            if (r0) {
                System.out.println(cp + "\t0x" + Integer.toHexString(cp)
                        + "\t" + new String(new byte[] {b}, StandardCharsets.ISO_8859_1));
            }

            if (r0 != r1) {
                System.out.println("error " + i);
            }
        }
    }

    static boolean isLowerCaseEx(int ch) {
        return ch >= 'a' && (ch <= 'z' || ch == 0xb5 || (ch >= 0xdf && ch != 0xf7));
    }

    static int toUpperCaseEx(int cp) throws Throwable {
        Field theUnsafeField = Unsafe.class.getDeclaredField("theUnsafe");
        theUnsafeField.setAccessible(true);
        Unsafe unsafe = (Unsafe) theUnsafeField.get(null);

        Class<?> charbinClass = Class.forName("java.lang.CharacterDataLatin1");
        Field field = charbinClass.getDeclaredField("instance");
        long fieldOffset = unsafe.staticFieldOffset(field);
        Object instance = unsafe.getObject(charbinClass, fieldOffset);

        Class lookupClass = MethodHandles.Lookup.class;
        Field implLookup = lookupClass.getDeclaredField("IMPL_LOOKUP");
        MethodHandles.Lookup trustedLookup = (MethodHandles.Lookup) unsafe.getObject(lookupClass,
                UNSAFE.staticFieldOffset(implLookup));

        MethodHandles.lookup();
        MethodHandle toLowerCase = trustedLookup
                .findVirtual(charbinClass, "toUpperCaseEx", MethodType.methodType(int.class, int.class));

        return (Integer) toLowerCase.invoke(instance, cp);
    }
}

@wenshao
Copy link
Contributor Author

wenshao commented Sep 1, 2023

I think this overall looks reasonable, but I think a more thorough proof / test would help to build confidence that all these changes are semantically neutral.

The isLowerCaseEx needs to explain why two lower-case codepoints are omitted (perhaps this should be hasUpperCase?)

String str1 = new String(new byte[]{(byte) 0xb5}, StandardCharsets.ISO_8859_1);
String str2 = new String(new byte[]{(byte) 0xdf}, StandardCharsets.ISO_8859_1);
System.out.println(str1 + "\t" + str1.toUpperCase());
System.out.println(str2 + "\t" + str2.toUpperCase());

result :

µ	Μ
ß	SS

0xb5 and 0xdf call toUpperCaseEx return and input are different, these two codepoints are to ensure that the behavior has not changed.

@cl4es
Copy link
Member

cl4es commented Sep 3, 2023

The two odd codepoints I was curious about are 0xaa and 0xba, both of which are lower-case according to Character.isLowerCase(..) but does not actually have an uppercase. The Unicode data categorize these two as Lo, Letter, other, so I'm a little confused how they got tagged as lowercase.

Character.toUpperCaseEx is specified as adhering to the definition of the unicode data (unlike some legacy java character definition that might differ subtly) so perhaps it's reasonable to specify this newly invented isLowerCaseEx as strictly adhering to the unicode data in which case I think 0xaa and 0xbb should not be considered lower case. I am not a domain expert and would like someone like @naotoj to weigh in here. But either way we should think about how to specify this kind of method to keep it precise. Even if it's only internal code..

I suggested hasUpperCase (or maybe hasUpperCaseEx) as a way out of this particular conundrum, since it makes perfect sense to define a method named like that to be equivalent to return cp != CharacterDataLatin1.instance.toUpperCaseEx(cp);

@wenshao
Copy link
Contributor Author

wenshao commented Sep 3, 2023

The two odd codepoints I was curious about are 0xaa and 0xba, both of which are lower-case according to Character.isLowerCase(..) but does not actually have an uppercase. The Unicode data categorize these two as Lo, Letter, other, so I'm a little confused how they got tagged as lowercase.

Character.toUpperCaseEx is specified as adhering to the definition of the unicode data (unlike some legacy java character definition that might differ subtly) so perhaps it's reasonable to specify this newly invented isLowerCaseEx as strictly adhering to the unicode data in which case I think 0xaa and 0xbb should not be considered lower case. I am not a domain expert and would like someone like @naotoj to weigh in here. But either way we should think about how to specify this kind of method to keep it precise. Even if it's only internal code..

I suggested hasUpperCase (or maybe hasUpperCaseEx) as a way out of this particular conundrum, since it makes perfect sense to define a method named like that to be equivalent to return cp != CharacterDataLatin1.instance.toUpperCaseEx(cp);

i have renamed isLowerCaseEx to hasNotUpperCaseEx, is this ok?

@wenshao
Copy link
Contributor Author

wenshao commented Sep 3, 2023

Now the build has failed, and git rebase can solve the failure. Is there any other way?

@cl4es
Copy link
Member

cl4es commented Sep 3, 2023

The preferred route is to merge in then push changes from master to your PR branch.

@cl4es
Copy link
Member

cl4es commented Sep 3, 2023

hasNotUpperCaseEx sounds wrong. hasUpperCaseMapping?

@wenshao
Copy link
Contributor Author

wenshao commented Sep 4, 2023

The preferred route is to merge in then push changes from master to your PR branch.

Merge will cause a lot of file changes

@wenshao
Copy link
Contributor Author

wenshao commented Sep 4, 2023

hasNotUpperCaseEx sounds wrong. hasUpperCaseMapping?

i have renamed hasNotUpperCaseEx to hasUpperCaseMapping.

@wenshao
Copy link
Contributor Author

wenshao commented Sep 6, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Sep 6, 2023

@wenshao This pull request has not yet been marked as ready for integration.

@@ -90,6 +90,10 @@ class CharacterDataLatin1 extends CharacterData {
return (getPropertiesEx(ch) & $$maskOtherLowercase) != 0;
}

boolean hasUpperCaseMapping(int ch) {
Copy link
Member

Choose a reason for hiding this comment

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

This method is incorrectly named; it actually tests that a char has no upper case mapping. I recommend fixing this by keeping the method name while removing the double ! at this return and at the if down below to simplify the logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now use a local variable notUpperCaseEx, I prefer this, without adding a method.

Copy link
Member

Choose a reason for hiding this comment

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

I'd have preferred @liach's solution (remove the double negative and keeping the method with name unchanged) but this is OK too.

@openjdk
Copy link

openjdk bot commented Sep 18, 2023

⚠️ @wenshao the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout optimization_for_string_latin1_upper_lower
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@wenshao 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:

8311220: Optimization for StringLatin UpperLower

Reviewed-by: redestad, liach

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 9 new commits pushed to the master branch:

  • 2e2d49c: 8316400: Exclude jdk/jfr/event/runtime/TestResidentSetSizeEvent.java on AIX
  • bf9d1e2: 8316399: Exclude java/net/MulticastSocket/Promiscuous.java on AIX
  • 21c2dac: 8315706: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java real fix for failure on AIX
  • ecce2af: 8316357: Serial: Remove unused GenCollectedHeap::space_containing
  • 3828dc9: 8314236: Overflow in Collections.rotate
  • 1203e11: 8294969: Convert jdk.jdeps javap to use the Classfile API
  • fbc766e: 8315988: Parallel: Make TestAggressiveHeap use createTestJvm
  • aa0ebee: 8316341: sun/security/pkcs11/PKCS11Test.java needs adjustment on Linux ppc64le Ubuntu 22
  • ca3fe7b: 8315932: runtime/InvocationTests spend a lot of time on dependency verification

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 (@cl4es) 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 Sep 18, 2023
@@ -422,8 +422,7 @@ public static String toLowerCase(String str, byte[] value, Locale locale) {
final int len = value.length;
// Now check if there are any characters that need to be changed, or are surrogate
Copy link
Contributor

Choose a reason for hiding this comment

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

Pre-existing: , or are surrogate the mention of surrogate is misleading; this is a latin1 string and cannot contain a surrogate.
Here and in the toLowerCaseEx method.

@wenshao
Copy link
Contributor Author

wenshao commented Sep 18, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

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

@@ -608,7 +602,8 @@ public static String toUpperCase(String str, byte[] value, Locale locale) {
// Now check if there are any characters that need to be changed, or are surrogate
Copy link
Member

Choose a reason for hiding this comment

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

Can you fix this one too for consistency? I'll sponsor either way after some testing.

@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Sep 18, 2023
@cl4es
Copy link
Member

cl4es commented Sep 18, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@cl4es The PR has been updated since the change author (@wenshao) issued the integrate command - the author must perform this command again.

@wenshao
Copy link
Contributor Author

wenshao commented Sep 18, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@wenshao
Your change (at version 397d49f) is now ready to be sponsored by a Committer.

@cl4es
Copy link
Member

cl4es commented Sep 18, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 18, 2023

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

  • 2e2d49c: 8316400: Exclude jdk/jfr/event/runtime/TestResidentSetSizeEvent.java on AIX
  • bf9d1e2: 8316399: Exclude java/net/MulticastSocket/Promiscuous.java on AIX
  • 21c2dac: 8315706: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java real fix for failure on AIX
  • ecce2af: 8316357: Serial: Remove unused GenCollectedHeap::space_containing
  • 3828dc9: 8314236: Overflow in Collections.rotate
  • 1203e11: 8294969: Convert jdk.jdeps javap to use the Classfile API
  • fbc766e: 8315988: Parallel: Make TestAggressiveHeap use createTestJvm
  • aa0ebee: 8316341: sun/security/pkcs11/PKCS11Test.java needs adjustment on Linux ppc64le Ubuntu 22
  • ca3fe7b: 8315932: runtime/InvocationTests spend a lot of time on dependency verification

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 18, 2023
@openjdk openjdk bot closed this Sep 18, 2023
@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 Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@cl4es @wenshao Pushed as commit f09b7af.

💡 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
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants