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

8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available #3627

Closed
wants to merge 9 commits into from

Conversation

stsypanov
Copy link
Contributor

@stsypanov stsypanov commented Apr 22, 2021

Hello, from discussion in #3464 I've found out, that in a few of JDK core classes, e.g. in j.l.Class expressions like baseName.replace('.', '/') + '/' + name are not compiled into invokedynamic-based code, but into one using StringBuilder. This happens due to some bootstraping issues.

However the code like

private String getSimpleName0() {
    if (isArray()) {
        return getComponentType().getSimpleName() + "[]";
    }
    //...
}

can be improved via replacement of + with String.concat() call.

I've used this benchmark to measure impact:

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Fork(jvmArgsAppend = {"-Xms2g", "-Xmx2g"})
public class ClassMethodsBenchmark {
  private final Class<? extends Object[]> arrayClass = Object[].class;
  private Method descriptorString;

  @Setup
  public void setUp() throws NoSuchMethodException {
    //fore some reason compiler doesn't allow me to call Class.descriptorString() directly
    descriptorString = Class.class.getDeclaredMethod("descriptorString");
  }

  @Benchmark
  public Object descriptorString() throws Exception {
    return descriptorString.invoke(arrayClass);
  }

  @Benchmark
  public Object typeName() {
    return arrayClass.getTypeName();
  }
}

and got those results

                                                   Mode  Cnt     Score     Error   Units
descriptorString                                   avgt   60    91.480 ±   1.839   ns/op
descriptorString:·gc.alloc.rate.norm               avgt   60   404.008 ±   4.033    B/op
descriptorString:·gc.churn.G1_Eden_Space           avgt   60  2791.866 ± 181.589  MB/sec
descriptorString:·gc.churn.G1_Eden_Space.norm      avgt   60   401.702 ±  26.047    B/op
descriptorString:·gc.churn.G1_Survivor_Space       avgt   60     0.003 ±   0.001  MB/sec
descriptorString:·gc.churn.G1_Survivor_Space.norm  avgt   60    ≈ 10⁻³              B/op
descriptorString:·gc.count                         avgt   60   205.000            counts
descriptorString:·gc.time                          avgt   60   216.000                ms

patched
                                                   Mode  Cnt     Score     Error   Units
descriptorString                                   avgt   60    65.016 ±   3.446   ns/op
descriptorString:·gc.alloc.rate                    avgt   60  2844.240 ± 115.719  MB/sec
descriptorString:·gc.alloc.rate.norm               avgt   60   288.006 ±   0.001    B/op
descriptorString:·gc.churn.G1_Eden_Space           avgt   60  2832.996 ± 206.939  MB/sec
descriptorString:·gc.churn.G1_Eden_Space.norm      avgt   60   286.955 ±  17.853    B/op
descriptorString:·gc.churn.G1_Survivor_Space       avgt   60     0.003 ±   0.001  MB/sec
descriptorString:·gc.churn.G1_Survivor_Space.norm  avgt   60    ≈ 10⁻³              B/op
descriptorString:·gc.count                         avgt   60   208.000            counts
descriptorString:·gc.time                          avgt   60   228.000                ms
-----------------
typeName                                           avgt   60    34.273 ±   0.480   ns/op
typeName:·gc.alloc.rate                            avgt   60  3265.356 ±  45.113  MB/sec
typeName:·gc.alloc.rate.norm                       avgt   60   176.004 ±   0.001    B/op
typeName:·gc.churn.G1_Eden_Space                   avgt   60  3268.454 ± 134.458  MB/sec
typeName:·gc.churn.G1_Eden_Space.norm              avgt   60   176.109 ±   6.595    B/op
typeName:·gc.churn.G1_Survivor_Space               avgt   60     0.003 ±   0.001  MB/sec
typeName:·gc.churn.G1_Survivor_Space.norm          avgt   60    ≈ 10⁻⁴              B/op
typeName:·gc.count                                 avgt   60   240.000            counts
typeName:·gc.time                                  avgt   60   255.000                ms

patched

typeName                                           avgt   60    15.787 ±   0.214   ns/op
typeName:·gc.alloc.rate                            avgt   60  2577.554 ±  32.339  MB/sec
typeName:·gc.alloc.rate.norm                       avgt   60    64.001 ±   0.001    B/op
typeName:·gc.churn.G1_Eden_Space                   avgt   60  2574.039 ± 147.774  MB/sec
typeName:·gc.churn.G1_Eden_Space.norm              avgt   60    63.895 ±   3.511    B/op
typeName:·gc.churn.G1_Survivor_Space               avgt   60     0.003 ±   0.001  MB/sec
typeName:·gc.churn.G1_Survivor_Space.norm          avgt   60    ≈ 10⁻⁴              B/op
typeName:·gc.count                                 avgt   60   189.000            counts
typeName:·gc.time                                  avgt   60   199.000                ms

I think this patch is likely to improve reflection operations related to arrays.

If one finds this patch useful, then I'll create a ticket to track this. Also it'd be nice to have a list of classes, that are compiled in the same way as j.l.Class (i.e. have no access to invokedynamic) so I could look into them for other snippets where two String are joined so concat-based optimization is possible.

Pre-sizing of StringBuilder for Class.gdescriptorString() and Class.getCanonicalName0() is one more improvement opportunity here.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3627/head:pull/3627
$ git checkout pull/3627

Update a local copy of the PR:
$ git checkout pull/3627
$ git pull https://git.openjdk.java.net/jdk pull/3627/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3627

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3627.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 22, 2021

👋 Welcome back stsypanov! 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
Copy link

openjdk bot commented Apr 22, 2021

@stsypanov 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 Apr 22, 2021
@stsypanov stsypanov changed the title Use String.concat() where invokedynamic-based String concatenation is not available Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available Apr 23, 2021
@@ -4348,7 +4348,7 @@ public String descriptorString() {
return Wrapper.forPrimitiveType(this).basicTypeString();

if (isArray()) {
return "[" + componentType.descriptorString();
return "[".concat(componentType.descriptorString());
Copy link
Member

Choose a reason for hiding this comment

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

This could be optimized further for multi-dimensional arrays:

if (isArray()) {
  int arrayDepth = 1;
  Class<?> ct = componentType;
  while (ct.isArray()) {
    arrayDepth++;
    ct = ct.componentType;
  }
  return "[".repeat(arrayDepth).concat(ct.descriptorString());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But isn't componentType.descriptorString() does this itself? Also multi-dimensional arrays are quite an infrequent usecase, aren't they?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it's just an optimization. Current code wouldbuild "[[..[[LFoo;" by recursively going down to Foo, build and return "LFoo;", then do "[" + "LFoo;", and so on. Infrequent enough that we can ignore it, sure, but since it's effectively reducing the algorithmic complexity from O(n*m) to O(n+m) I should at least mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that TestPrimitiveArrayCriticalWithBadParam constantly fails, so I'd probably revert this change

@stsypanov
Copy link
Contributor Author

/issue 8266972

@openjdk openjdk bot changed the title Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available 8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available May 12, 2021
@openjdk
Copy link

openjdk bot commented May 12, 2021

@stsypanov The primary solved issue for a PR is set through the PR title. Since the current title does not contain an issue reference, it will now be updated.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 12, 2021
@mlbridge
Copy link

mlbridge bot commented May 12, 2021

@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Michael Kroll on core-libs-dev:

Hello,

just being curious here:
Before we start to change every usage of String+String into String.concat, shouldn't the compiler be so smart to do that for us?
Currently it compiles to invokedynamic if available and to using StringBuilder otherwise. Now why doesn't it compile to String.concat instead of StringBuilder for the case when invokedynamic is not available as target?

greets,
Michael

Am 12. Mai 2021 15:04:21 MESZ schrieb "?????? ???????" <github.com+10835776+stsypanov at openjdk.java.net>:

@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Claes Redestad on core-libs-dev:

Hi,

I gave this some thought the other day when looking at one of Sergey's
patches.

I'm no expert on javac but I think translating to String::concat is
likely to be a bit harder than it seems. It's not a static method, so
the left hand side must be non-null. This is something I believe javac
can't prove in the general case. Corner cases such as when the left
hand side is a String literal, of course, but that would be of limited
utility.

There are more convoluted solutions that might work if one squints (add
public static concat methods and translate calls into those?), but the
question we need to be asking ourselves is really if it is worth our
time - and the added complexity? The answer is likely no.

It might help some if you're targeting java 8 or using javac as a
frontend for non-JVM targets (lol!), but going forward I think it would
mostly help java.base and a few other JDK modules where the
invokedynamic translation can't be used due bootstrapping issues. And in
most of those cases it won't really matter for performance anyhow.

That's why I think using String::concat on a case-by-case basis in those
few OpenJDK modules where indified string concat is not applicable is
enough. When we see that it helps. And then only sparingly.

Hope this clarifies how I reason about this.

/Claes

On 2021-05-12 22:49, Michael Kroll wrote:

Hello,

just being curious here:
Before we start to change every usage of String+String into String.concat, shouldn't the compiler be so smart to do that for us?
Currently it compiles to invokedynamic if available and to using StringBuilder otherwise. Now why doesn't it compile to String.concat instead of StringBuilder for the case when invokedynamic is not available as target?

greets,
Michael

Am 12. Mai 2021 15:04:21 MESZ schrieb "?????? ???????" <github.com+10835776+stsypanov at openjdk.java.net>:

@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Сергей Цыпанов on core-libs-dev:

Before we start to change every usage of String+String into String.concat, shouldn't the compiler be so smart to do that for us?
Currently it compiles to invokedynamic if available and to using StringBuilder otherwise. Now why doesn't it compile to String.concat instead of StringBuilder for the case when invokedynamic is not available as target?

I think the main reason is that

String str = "smth is " + null;

returns "smth is null" and with current implementation of String.concat()
the same expression throws NPE. See the code of String.concat():

public String concat(String str) {
if (str.isEmpty()) {
return this;
}
return StringConcatHelper.simpleConcat(this, str);
}

Regards,
Sergey

@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Michael Kroll on core-libs-dev:

Okay, that makes sense.
Thanks for clarifying.

Greetings,
Michael

Am 13. Mai 2021 00:45:13 MESZ schrieb Claes Redestad <claes.redestad at oracle.com>:

Hi,

I gave this some thought the other day when looking at one of Sergey's
patches.

I'm no expert on javac but I think translating to String::concat is
likely to be a bit harder than it seems. It's not a static method, so
the left hand side must be non-null. This is something I believe javac
can't prove in the general case. Corner cases such as when the left
hand side is a String literal, of course, but that would be of limited
utility.

There are more convoluted solutions that might work if one squints (add
public static concat methods and translate calls into those?), but the
question we need to be asking ourselves is really if it is worth our
time - and the added complexity? The answer is likely no.

It might help some if you're targeting java 8 or using javac as a
frontend for non-JVM targets (lol!), but going forward I think it would
mostly help java.base and a few other JDK modules where the
invokedynamic translation can't be used due bootstrapping issues. And
in
most of those cases it won't really matter for performance anyhow.

That's why I think using String::concat on a case-by-case basis in
those
few OpenJDK modules where indified string concat is not applicable is
enough. When we see that it helps. And then only sparingly.

Hope this clarifies how I reason about this.

/Claes

On 2021-05-12 22:49, Michael Kroll wrote:

Hello,

just being curious here:
Before we start to change every usage of String+String into
String.concat, shouldn't the compiler be so smart to do that for us?
Currently it compiles to invokedynamic if available and to using
StringBuilder otherwise. Now why doesn't it compile to String.concat
instead of StringBuilder for the case when invokedynamic is not
available as target?

greets,
Michael

Am 12. Mai 2021 15:04:21 MESZ schrieb "?????? ???????"
<github.com+10835776+stsypanov at openjdk.java.net>:

Hello, from discussion in https://github.com//pull/3464
I've
found out, that in a few of JDK core classes, e.g. in `j.l.Class`
expressions like `baseName.replace('.', '/') + '/' + name` are not
compiled into `invokedynamic`-based code, but into one using
`StringBuilder`. This happens due to some bootstraping issues.

However the code like

private String getSimpleName0() {
if (isArray()) {
return getComponentType().getSimpleName() + "[]";
}
//...
}

can be improved via replacement of `+` with `String.concat()` call.

I've used this benchmark to measure impact:

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Fork(jvmArgsAppend = {"-Xms2g", "-Xmx2g"})
public class ClassMethodsBenchmark {
private final Class<? extends Object[]> arrayClass =
Object[].class;
private Method descriptorString;

@Setup
public void setUp() throws NoSuchMethodException {
//fore some reason compiler doesn't allow me to call
Class.descriptorString() directly
descriptorString =
Class.class.getDeclaredMethod("descriptorString");
}

@Benchmark
public Object descriptorString() throws Exception {
return descriptorString.invoke(arrayClass);
}

@Benchmark
public Object typeName() {
return arrayClass.getTypeName();
}
}

and got those results

                              Mode  Cnt     Score     Error  

Units

descriptorString avgt 60
91.480
? 1.839 ns/op
descriptorString:?gc.alloc.rate.norm avgt 60
404.008
? 4.033 B/op
descriptorString:?gc.churn.G1_Eden_Space avgt 60
2791.866
? 181.589 MB/sec
descriptorString:?gc.churn.G1_Eden_Space.norm avgt 60
401.702
? 26.047 B/op
descriptorString:?gc.churn.G1_Survivor_Space avgt 60
0.003
? 0.001 MB/sec
descriptorString:?gc.churn.G1_Survivor_Space.norm avgt 60 ?
10??
B/op
descriptorString:?gc.count avgt 60
205.000
counts
descriptorString:?gc.time avgt 60
216.000
ms

patched
Mode Cnt Score Error
Units
descriptorString avgt 60
65.016
? 3.446 ns/op
descriptorString:?gc.alloc.rate avgt 60
2844.240
? 115.719 MB/sec
descriptorString:?gc.alloc.rate.norm avgt 60
288.006
? 0.001 B/op
descriptorString:?gc.churn.G1_Eden_Space avgt 60
2832.996
? 206.939 MB/sec
descriptorString:?gc.churn.G1_Eden_Space.norm avgt 60
286.955
? 17.853 B/op
descriptorString:?gc.churn.G1_Survivor_Space avgt 60
0.003
? 0.001 MB/sec
descriptorString:?gc.churn.G1_Survivor_Space.norm avgt 60 ?
10??
B/op
descriptorString:?gc.count avgt 60
208.000
counts
descriptorString:?gc.time avgt 60
228.000
ms
-----------------
typeName avgt 60
34.273
? 0.480 ns/op
typeName:?gc.alloc.rate avgt 60
3265.356
? 45.113 MB/sec
typeName:?gc.alloc.rate.norm avgt 60
176.004
? 0.001 B/op
typeName:?gc.churn.G1_Eden_Space avgt 60
3268.454
? 134.458 MB/sec
typeName:?gc.churn.G1_Eden_Space.norm avgt 60
176.109
? 6.595 B/op
typeName:?gc.churn.G1_Survivor_Space avgt 60
0.003
? 0.001 MB/sec
typeName:?gc.churn.G1_Survivor_Space.norm avgt 60 ?
10??
B/op
typeName:?gc.count avgt 60
240.000
counts
typeName:?gc.time avgt 60
255.000
ms

patched

typeName avgt 60
15.787
? 0.214 ns/op
typeName:?gc.alloc.rate avgt 60
2577.554
? 32.339 MB/sec
typeName:?gc.alloc.rate.norm avgt 60
64.001
? 0.001 B/op
typeName:?gc.churn.G1_Eden_Space avgt 60
2574.039
? 147.774 MB/sec
typeName:?gc.churn.G1_Eden_Space.norm avgt 60
63.895
? 3.511 B/op
typeName:?gc.churn.G1_Survivor_Space avgt 60
0.003
? 0.001 MB/sec
typeName:?gc.churn.G1_Survivor_Space.norm avgt 60 ?
10??
B/op
typeName:?gc.count avgt 60
189.000
counts
typeName:?gc.time avgt 60
199.000
ms

I think this patch is likely to improve reflection operations
related
to arrays.

If one finds this patch useful, then I'll create a ticket to track
this. Also it'd be nice to have a list of classes, that are compiled
in
the same way as `j.l.Class` (i.e. have no access to `invokedynamic`)
so
I could look into them for other snippets where two String are
joined
so `concat`-based optimization is possible.

Pre-sizing of `StringBuilder` for `Class.gdescriptorString()` and
`Class.getCanonicalName0()` is one more improvement opportunity
here.

-------------

Commit messages:
- Use String.concat() where invokedynamic-based String concatenation
is

@stsypanov
Copy link
Contributor Author

Spotted one more method to be improved:

@State(Scope.Benchmark)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Fork(jvmArgsAppend = {"-Xms2g", "-Xmx2g"})
public class ClassToStringBenchmark {
    private final Class<?> clazzWithShortName = Object.class;
    private final Class<?> interfaceWithShortName = Serializable.class;
    private final Class<?> primitive = int.class;

    @Benchmark
    public String classToString() {
        return clazzWithShortName.toString();
    }

    @Benchmark
    public String interfaceToString() {
        return interfaceWithShortName.toString();
    }

    @Benchmark
    public String primitiveToString() {
        return primitive.toString();
    }
}

giving

before
                                                    Mode  Cnt     Score     Error   Units
classToString                                       avgt   50    30,769 ±   0,352   ns/op
classToString:·gc.alloc.rate                        avgt   50  3769,212 ±  42,959  MB/sec
classToString:·gc.alloc.rate.norm                   avgt   50   152,003 ±   0,001    B/op
classToString:·gc.churn.G1_Eden_Space               avgt   50  3776,990 ± 112,309  MB/sec
classToString:·gc.churn.G1_Eden_Space.norm          avgt   50   152,328 ±   4,317    B/op
classToString:·gc.churn.G1_Survivor_Space           avgt   50     0,004 ±   0,001  MB/sec
classToString:·gc.churn.G1_Survivor_Space.norm      avgt   50    ≈ 10⁻⁴              B/op
classToString:·gc.count                             avgt   50   385,000            counts
classToString:·gc.time                              avgt   50   378,000                ms

interfaceToString                                   avgt   50    35,571 ±   0,583   ns/op
interfaceToString:·gc.alloc.rate                    avgt   50  3433,504 ±  52,056  MB/sec
interfaceToString:·gc.alloc.rate.norm               avgt   50   160,003 ±   0,001    B/op
interfaceToString:·gc.churn.G1_Eden_Space           avgt   50  3443,384 ±  91,647  MB/sec
interfaceToString:·gc.churn.G1_Eden_Space.norm      avgt   50   160,456 ±   3,454    B/op
interfaceToString:·gc.churn.G1_Survivor_Space       avgt   50     0,004 ±   0,001  MB/sec
interfaceToString:·gc.churn.G1_Survivor_Space.norm  avgt   50    ≈ 10⁻⁴              B/op
interfaceToString:·gc.count                         avgt   50   351,000            counts
interfaceToString:·gc.time                          avgt   50   351,000                ms

primitiveToString                                   avgt   50    20,193 ±   0,369   ns/op
primitiveToString:·gc.alloc.rate                    avgt   50  3932,425 ±  68,453  MB/sec
primitiveToString:·gc.alloc.rate.norm               avgt   50   104,002 ±   0,001    B/op
primitiveToString:·gc.churn.G1_Eden_Space           avgt   50  3943,662 ± 119,781  MB/sec
primitiveToString:·gc.churn.G1_Eden_Space.norm      avgt   50   104,305 ±   2,678    B/op
primitiveToString:·gc.churn.G1_Survivor_Space       avgt   50     0,005 ±   0,001  MB/sec
primitiveToString:·gc.churn.G1_Survivor_Space.norm  avgt   50    ≈ 10⁻⁴              B/op
primitiveToString:·gc.count                         avgt   50   402,000            counts
primitiveToString:·gc.time                          avgt   50   387,000                ms

after

                                                    Mode  Cnt     Score     Error   Units
classToString                                       avgt   50    13,552 ±   0,114   ns/op
classToString:·gc.alloc.rate                        avgt   50  3602,305 ±  27,881  MB/sec
classToString:·gc.alloc.rate.norm                   avgt   50    64,001 ±   0,001    B/op
classToString:·gc.churn.G1_Eden_Space               avgt   50  3619,864 ± 119,002  MB/sec
classToString:·gc.churn.G1_Eden_Space.norm          avgt   50    64,318 ±   2,081    B/op
classToString:·gc.churn.G1_Survivor_Space           avgt   50     0,004 ±   0,001  MB/sec
classToString:·gc.churn.G1_Survivor_Space.norm      avgt   50    ≈ 10⁻⁴              B/op
classToString:·gc.count                             avgt   50   369,000            counts
classToString:·gc.time                              avgt   50   366,000                ms

interfaceToString                                   avgt   50    16,480 ±   0,113   ns/op
interfaceToString:·gc.alloc.rate                    avgt   50  3332,045 ±  21,628  MB/sec
interfaceToString:·gc.alloc.rate.norm               avgt   50    72,001 ±   0,001    B/op
interfaceToString:·gc.churn.G1_Eden_Space           avgt   50  3335,296 ±  98,091  MB/sec
interfaceToString:·gc.churn.G1_Eden_Space.norm      avgt   50    72,086 ±   2,187    B/op
interfaceToString:·gc.churn.G1_Survivor_Space       avgt   50     0,004 ±   0,001  MB/sec
interfaceToString:·gc.churn.G1_Survivor_Space.norm  avgt   50    ≈ 10⁻⁴              B/op
interfaceToString:·gc.count                         avgt   50   340,000            counts
interfaceToString:·gc.time                          avgt   50   337,000                ms

primitiveToString                                   avgt   50     5,992 ±   0,079   ns/op
primitiveToString:·gc.alloc.rate                    avgt   50  3056,666 ±  39,390  MB/sec
primitiveToString:·gc.alloc.rate.norm               avgt   50    24,000 ±   0,001    B/op
primitiveToString:·gc.churn.G1_Eden_Space           avgt   50  3070,543 ± 107,567  MB/sec
primitiveToString:·gc.churn.G1_Eden_Space.norm      avgt   50    24,114 ±   0,814    B/op
primitiveToString:·gc.churn.G1_Survivor_Space       avgt   50     0,004 ±   0,001  MB/sec
primitiveToString:·gc.churn.G1_Survivor_Space.norm  avgt   50    ≈ 10⁻⁵              B/op
primitiveToString:·gc.count                         avgt   50   313,000            counts
primitiveToString:·gc.time                          avgt   50   310,000                ms

@openjdk
Copy link

openjdk bot commented Jul 8, 2021

⚠️ @stsypanov This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

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.

Looks fine to me.

@openjdk
Copy link

openjdk bot commented Aug 2, 2021

⚠️ @stsypanov 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 class-concat
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Aug 2, 2021

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

8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available

Reviewed-by: redestad

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

  • 7cc1eb3: Merge
  • e351de3: 8271272: C2: assert(!had_error) failed: bad dominance
  • 6180cf1: 8271512: ProblemList serviceability/sa/sadebugd/DebugdConnectTest.java due to 8270326
  • a1b5b81: 8271507: ProblemList SA tests that are failing with ZGC due to JDK-8248912
  • 4bc9b04: 8263059: security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java fails due to revoked cert
  • d6bb846: 8248899: security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java fails, Certificate has been revoked
  • 71ca0c0: 8270848: Redundant unsafe opmask register allocation in some instruction patterns.
  • 6c68ce2: 8270947: AArch64: C1: use zero_words to initialize all objects
  • cd7e30e: 8271242: Add Arena regression tests
  • 5b3c418: 8270321: Startup regressions in 18-b5 caused by JDK-8266310
  • ... and 62 more: https://git.openjdk.java.net/jdk/compare/36aefa351afeb5fd6b87060e06c1e8060afb87a0...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 (@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 Aug 2, 2021
@stsypanov
Copy link
Contributor Author

/integrate

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

openjdk bot commented Aug 2, 2021

@stsypanov
Your change (at version 7e846a2) is now ready to be sponsored by a Committer.

@stsypanov
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Aug 2, 2021

@stsypanov
Your change (at version 7e846a2) is now ready to be sponsored by a Committer.

@cl4es
Copy link
Member

cl4es commented Aug 2, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 2, 2021

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

  • 72145f3: 8269665: Clean-up toString() methods of some primitive wrappers
  • 7cc1eb3: Merge
  • e351de3: 8271272: C2: assert(!had_error) failed: bad dominance
  • 6180cf1: 8271512: ProblemList serviceability/sa/sadebugd/DebugdConnectTest.java due to 8270326
  • a1b5b81: 8271507: ProblemList SA tests that are failing with ZGC due to JDK-8248912
  • 4bc9b04: 8263059: security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java fails due to revoked cert
  • d6bb846: 8248899: security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java fails, Certificate has been revoked
  • 71ca0c0: 8270848: Redundant unsafe opmask register allocation in some instruction patterns.
  • 6c68ce2: 8270947: AArch64: C1: use zero_words to initialize all objects
  • cd7e30e: 8271242: Add Arena regression tests
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/36aefa351afeb5fd6b87060e06c1e8060afb87a0...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 2, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Aug 2, 2021
@openjdk
Copy link

openjdk bot commented Aug 2, 2021

@cl4es @stsypanov Pushed as commit 6c4c48f.

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

@stsypanov stsypanov deleted the class-concat branch August 2, 2021 12:55
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.

2 participants