[Ping] RFR: 8275731: CDS archived enums objects are recreated at runtime

2022-01-04 Thread Ioi Lam

Still looking for reviewers 

Thanks
- Ioi

On 12/1/21 1:02 PM, Ioi Lam wrote:

**Background:**

In the Java Language, Enums can be tested for equality, so the constants in an 
Enum type must be unique. Javac compiles an enum declaration like this:


public enum Day {  SUNDAY, MONDAY ... }


to


public class Day extends java.lang.Enum {
 public static final SUNDAY = new Day("SUNDAY");
 public static final MONDAY = new Day("MONDAY"); ...
}


With CDS archived heap objects, `Day::` is executed twice: once during 
`java -Xshare:dump`, and once during normal JVM execution. If the archived heap 
objects references one of the Enum constants created at dump time, we will violate 
the uniqueness requirements of the Enum constants at runtime. See the test case in 
the description of [JDK-8275731](https://bugs.openjdk.java.net/browse/JDK-8275731)

**Fix:**

During -Xshare:dump, if we discovered that an Enum constant of type X is archived, we 
archive all constants of type X. At Runtime, type X will skip the normal execution of 
`X::`. Instead, we run `HeapShared::initialize_enum_klass()` to 
retrieve all the constants of X that were saved at dump time.

This is safe as we know that `X::` has no observable side effect -- it 
only creates the constants of type X, as well as the synthetic value `X::$VALUES`, 
which cannot be observed until X is fully initialized.

**Verification:**

To avoid future problems, I added a new tool, CDSHeapVerifier, to look for 
similar problems where the archived heap objects reference a static field that 
may be recreated at runtime. There are some manual steps involved, but I 
analyzed the potential problems found by the tool are they are all safe (after 
the current bug is fixed). See cdsHeapVerifier.cpp for gory details. An example 
trace of this tool can be found at 
https://bugs.openjdk.java.net/secure/attachment/97242/enum_warning.txt

**Testing:**

Passed Oracle CI tiers 1-4. WIll run tier 5 as well.

-

Commit messages:
  - 8275731: CDS archived enums objects are recreated at runtime

Changes: https://git.openjdk.java.net/jdk/pull/6653/files
  Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6653&range=00
   Issue: https://bugs.openjdk.java.net/browse/JDK-8275731
   Stats: 829 lines in 16 files changed: 787 ins; 2 del; 40 mod
   Patch: https://git.openjdk.java.net/jdk/pull/6653.diff
   Fetch: git fetch https://git.openjdk.java.net/jdk pull/6653/head:pull/6653

PR: https://git.openjdk.java.net/jdk/pull/6653




Re: [jdk18] RFR: 8279370: jdk.jpackage/share/native/applauncher/JvmLauncher.cpp fails to build with GCC 6.3.0

2022-01-04 Thread Aleksey Shipilev
On Mon, 3 Jan 2022 21:18:12 GMT, Victor Dyakov  wrote:

> it requires @alexeysemenyukoracle review (owner of JDK-8274856 changeset)

Well, this looks trivial to me. Should we really wait @alexeysemenyukoracle, 
who, I assume, might be on NY holiday break?

-

PR: https://git.openjdk.java.net/jdk18/pull/74


Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v3]

2022-01-04 Thread Sandhya Viswanathan
On Tue, 4 Jan 2022 15:11:47 GMT, Jatin Bhateja  wrote:

>> Patch extends existing macrologic inferencing algorithm to handle masked 
>> logic operations.
>> 
>> Existing algorithm:
>> 
>> 1. Identify logic cone roots.
>> 2. Packs parent and logic child nodes into a MacroLogic node in bottom up 
>> traversal if input constraint are met.
>> i.e. maximum number of inputs which a macro logic node can have.
>> 3. Perform symbolic evaluation of logic expression tree by assigning value 
>> corresponding to a truth table column
>> to each input.
>> 4. Inputs along with encoded function together represents a macro logic node 
>> which mimics a truth table.
>> 
>> Modification:
>> Extended the packing algorithm to operate on both predicated or 
>> non-predicated logic nodes. Following
>> rules define the criteria under which nodes gets packed into a macro logic 
>> node:-
>> 
>> 1. Parent and both child nodes are all unmasked or masked with same 
>> predicates.
>> 2. Masked parent can be packed with left child if it is predicated and both 
>> have same prediates.
>> 3. Masked parent can be packed with right child if its un-predicated or has 
>> matching predication condition.
>> 4. An unmasked parent can be packed with an unmasked child.
>> 
>> New jtreg test case added with the patch exhaustively covers all the 
>> different combinations of predications of parent and
>> child nodes.
>> 
>> Following are the performance number for JMH benchmark included with the 
>> patch.
>> 
>> Machine Configuration:  Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (40C 2S 
>> Icelake Server)
>> 
>> Benchmark | ARRAYLEN | Baseline (ops/s) | Withopt (ops/s) | Gain ( 
>> withopt/baseline)
>> -- | -- | -- | -- | --
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 64 | 2365.421 | 5136.283 
>> | 2.171403315
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 128 | 2034.1 | 4073.381 | 
>> 2.002547072
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 256 | 1568.694 | 2811.975 
>> | 1.792558013
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 512 | 883.261 | 1662.771 
>> | 1.882536419
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 1024 | 469.513 | 732.81 | 
>> 1.560787454
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 64 | 273.049 | 552.106 | 
>> 2.022003377
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 128 | 219.624 | 359.775 | 
>> 1.63814064
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 256 | 131.649 | 182.23 | 
>> 1.384211046
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 512 | 71.452 | 81.522 | 
>> 1.140933774
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 1024 | 37.427 | 41.966 | 
>> 1.121276084
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 64 | 2805.759 | 3383.16 | 
>> 1.205791374
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 128 | 2069.012 | 2250.37 
>> | 1.087654397
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 256 | 1098.766 | 1101.996 
>> | 1.002939661
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 512 | 470.035 | 484.732 | 
>> 1.031267884
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 1024 | 202.827 | 209.073 
>> | 1.030794717
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 256 
>> | 3435.989 | 4418.09 | 1.285827749
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 512 
>> | 1524.803 | 1678.201 | 1.100601848
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 
>> 1024 | 972.501 | 1166.734 | 1.199725244
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 256 
>> | 5980.85 | 7584.17 | 1.268075608
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 512 
>> | 3258.108 | 3939.23 | 1.209054457
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 
>> 1024 | 1475.365 | 1511.159 | 1.024261115
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 256 
>> | 4208.766 | 4220.678 | 1.002830283
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 512 
>> | 2056.651 | 2049.489 | 0.99651764
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 
>> 1024 | 1110.461 | 1116.448 | 1.005391455
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 256 | 3259.348 | 3947.94 | 1.211266793
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 512 | 1515.147 | 1536.647 | 1.014190042
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 1024 | 911.58 | 1030.54 | 1.130498695
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 256 | 2034.611 | 2073.764 | 1.019243482
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 512 | 1110.659 | 1116.093 | 1.004892591
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 1024 | 559.269 | 559.651 | 1.000683034
>> o.o.b.jdk.incubator.vector.MaskedLogicOpt

Re: RFR: 8279453: Disable tools/jar/ReproducibleJar.java on 32-bit platforms

2022-01-04 Thread Brian Burkhalter
On Tue, 4 Jan 2022 16:46:09 GMT, Aleksey Shipilev  wrote:

> The real problem is Y2038 
> ([JDK-8279444](https://bugs.openjdk.java.net/browse/JDK-8279444)), which does 
> not look solvable at this time. So for test cleanliness, we might just 
> disable this test on 32-bit platforms.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug, affected test still passes
>  - [x]  Linux x86_32 fastdebug, affected test is now skipped

Marked as reviewed by bpb (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/6957


Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v3]

2022-01-04 Thread Vladimir Kozlov
On Tue, 4 Jan 2022 15:11:47 GMT, Jatin Bhateja  wrote:

>> Patch extends existing macrologic inferencing algorithm to handle masked 
>> logic operations.
>> 
>> Existing algorithm:
>> 
>> 1. Identify logic cone roots.
>> 2. Packs parent and logic child nodes into a MacroLogic node in bottom up 
>> traversal if input constraint are met.
>> i.e. maximum number of inputs which a macro logic node can have.
>> 3. Perform symbolic evaluation of logic expression tree by assigning value 
>> corresponding to a truth table column
>> to each input.
>> 4. Inputs along with encoded function together represents a macro logic node 
>> which mimics a truth table.
>> 
>> Modification:
>> Extended the packing algorithm to operate on both predicated or 
>> non-predicated logic nodes. Following
>> rules define the criteria under which nodes gets packed into a macro logic 
>> node:-
>> 
>> 1. Parent and both child nodes are all unmasked or masked with same 
>> predicates.
>> 2. Masked parent can be packed with left child if it is predicated and both 
>> have same prediates.
>> 3. Masked parent can be packed with right child if its un-predicated or has 
>> matching predication condition.
>> 4. An unmasked parent can be packed with an unmasked child.
>> 
>> New jtreg test case added with the patch exhaustively covers all the 
>> different combinations of predications of parent and
>> child nodes.
>> 
>> Following are the performance number for JMH benchmark included with the 
>> patch.
>> 
>> Machine Configuration:  Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (40C 2S 
>> Icelake Server)
>> 
>> Benchmark | ARRAYLEN | Baseline (ops/s) | Withopt (ops/s) | Gain ( 
>> withopt/baseline)
>> -- | -- | -- | -- | --
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 64 | 2365.421 | 5136.283 
>> | 2.171403315
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 128 | 2034.1 | 4073.381 | 
>> 2.002547072
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 256 | 1568.694 | 2811.975 
>> | 1.792558013
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 512 | 883.261 | 1662.771 
>> | 1.882536419
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 1024 | 469.513 | 732.81 | 
>> 1.560787454
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 64 | 273.049 | 552.106 | 
>> 2.022003377
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 128 | 219.624 | 359.775 | 
>> 1.63814064
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 256 | 131.649 | 182.23 | 
>> 1.384211046
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 512 | 71.452 | 81.522 | 
>> 1.140933774
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 1024 | 37.427 | 41.966 | 
>> 1.121276084
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 64 | 2805.759 | 3383.16 | 
>> 1.205791374
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 128 | 2069.012 | 2250.37 
>> | 1.087654397
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 256 | 1098.766 | 1101.996 
>> | 1.002939661
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 512 | 470.035 | 484.732 | 
>> 1.031267884
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 1024 | 202.827 | 209.073 
>> | 1.030794717
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 256 
>> | 3435.989 | 4418.09 | 1.285827749
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 512 
>> | 1524.803 | 1678.201 | 1.100601848
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 
>> 1024 | 972.501 | 1166.734 | 1.199725244
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 256 
>> | 5980.85 | 7584.17 | 1.268075608
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 512 
>> | 3258.108 | 3939.23 | 1.209054457
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 
>> 1024 | 1475.365 | 1511.159 | 1.024261115
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 256 
>> | 4208.766 | 4220.678 | 1.002830283
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 512 
>> | 2056.651 | 2049.489 | 0.99651764
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 
>> 1024 | 1110.461 | 1116.448 | 1.005391455
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 256 | 3259.348 | 3947.94 | 1.211266793
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 512 | 1515.147 | 1536.647 | 1.014190042
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 1024 | 911.58 | 1030.54 | 1.130498695
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 256 | 2034.611 | 2073.764 | 1.019243482
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 512 | 1110.659 | 1116.093 | 1.004892591
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 1024 | 559.269 | 559.651 | 1.000683034
>> o.o.b.jdk.incubator.vector.MaskedLogicOpt

Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v3]

2022-01-04 Thread Vladimir Kozlov
On Tue, 4 Jan 2022 15:11:47 GMT, Jatin Bhateja  wrote:

>> Patch extends existing macrologic inferencing algorithm to handle masked 
>> logic operations.
>> 
>> Existing algorithm:
>> 
>> 1. Identify logic cone roots.
>> 2. Packs parent and logic child nodes into a MacroLogic node in bottom up 
>> traversal if input constraint are met.
>> i.e. maximum number of inputs which a macro logic node can have.
>> 3. Perform symbolic evaluation of logic expression tree by assigning value 
>> corresponding to a truth table column
>> to each input.
>> 4. Inputs along with encoded function together represents a macro logic node 
>> which mimics a truth table.
>> 
>> Modification:
>> Extended the packing algorithm to operate on both predicated or 
>> non-predicated logic nodes. Following
>> rules define the criteria under which nodes gets packed into a macro logic 
>> node:-
>> 
>> 1. Parent and both child nodes are all unmasked or masked with same 
>> predicates.
>> 2. Masked parent can be packed with left child if it is predicated and both 
>> have same prediates.
>> 3. Masked parent can be packed with right child if its un-predicated or has 
>> matching predication condition.
>> 4. An unmasked parent can be packed with an unmasked child.
>> 
>> New jtreg test case added with the patch exhaustively covers all the 
>> different combinations of predications of parent and
>> child nodes.
>> 
>> Following are the performance number for JMH benchmark included with the 
>> patch.
>> 
>> Machine Configuration:  Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (40C 2S 
>> Icelake Server)
>> 
>> Benchmark | ARRAYLEN | Baseline (ops/s) | Withopt (ops/s) | Gain ( 
>> withopt/baseline)
>> -- | -- | -- | -- | --
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 64 | 2365.421 | 5136.283 
>> | 2.171403315
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 128 | 2034.1 | 4073.381 | 
>> 2.002547072
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 256 | 1568.694 | 2811.975 
>> | 1.792558013
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 512 | 883.261 | 1662.771 
>> | 1.882536419
>> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 1024 | 469.513 | 732.81 | 
>> 1.560787454
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 64 | 273.049 | 552.106 | 
>> 2.022003377
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 128 | 219.624 | 359.775 | 
>> 1.63814064
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 256 | 131.649 | 182.23 | 
>> 1.384211046
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 512 | 71.452 | 81.522 | 
>> 1.140933774
>> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 1024 | 37.427 | 41.966 | 
>> 1.121276084
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 64 | 2805.759 | 3383.16 | 
>> 1.205791374
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 128 | 2069.012 | 2250.37 
>> | 1.087654397
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 256 | 1098.766 | 1101.996 
>> | 1.002939661
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 512 | 470.035 | 484.732 | 
>> 1.031267884
>> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 1024 | 202.827 | 209.073 
>> | 1.030794717
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 256 
>> | 3435.989 | 4418.09 | 1.285827749
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 512 
>> | 1524.803 | 1678.201 | 1.100601848
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 
>> 1024 | 972.501 | 1166.734 | 1.199725244
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 256 
>> | 5980.85 | 7584.17 | 1.268075608
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 512 
>> | 3258.108 | 3939.23 | 1.209054457
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 
>> 1024 | 1475.365 | 1511.159 | 1.024261115
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 256 
>> | 4208.766 | 4220.678 | 1.002830283
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 512 
>> | 2056.651 | 2049.489 | 0.99651764
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 
>> 1024 | 1110.461 | 1116.448 | 1.005391455
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 256 | 3259.348 | 3947.94 | 1.211266793
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 512 | 1515.147 | 1536.647 | 1.014190042
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
>> 1024 | 911.58 | 1030.54 | 1.130498695
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 256 | 2034.611 | 2073.764 | 1.019243482
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 512 | 1110.659 | 1116.093 | 1.004892591
>> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
>> 1024 | 559.269 | 559.651 | 1.000683034
>> o.o.b.jdk.incubator.vector.MaskedLogicOpt

Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v2]

2022-01-04 Thread Vladimir Kozlov
On Tue, 4 Jan 2022 15:01:22 GMT, Jatin Bhateja  wrote:

>> src/hotspot/cpu/x86/x86.ad line 1900:
>> 
>>> 1898: 
>>> 1899: case Op_MacroLogicV:
>>> 1900:   if(bt != T_INT && bt != T_LONG) {
>> 
>> Missing `VM_Version::supports_evex()` check?
>
> Hi @vnkozlov, we already have that check (UseAVX < 3) in match_rule_supported 
> routine which gets called from this function.

Good.

-

PR: https://git.openjdk.java.net/jdk/pull/6893


Re: RFR: 8279453: Disable tools/jar/ReproducibleJar.java on 32-bit platforms

2022-01-04 Thread Alan Bateman
On Tue, 4 Jan 2022 16:46:09 GMT, Aleksey Shipilev  wrote:

> The real problem is Y2038 
> ([JDK-8279444](https://bugs.openjdk.java.net/browse/JDK-8279444)), which does 
> not look solvable at this time. So for test cleanliness, we might just 
> disable this test on 32-bit platforms.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug, affected test still passes
>  - [x]  Linux x86_32 fastdebug, affected test is now skipped

Marked as reviewed by alanb (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/6957


RFR: 8279453: Disable tools/jar/ReproducibleJar.java on 32-bit platforms

2022-01-04 Thread Aleksey Shipilev
The real problem is Y2038 
([JDK-8279444](https://bugs.openjdk.java.net/browse/JDK-8279444)), which does 
not look solvable at this time. So for test cleanliness, we might just disable 
this test on 32-bit platforms.

Additional testing:
 - [x] Linux x86_64 fastdebug, affected test still passes
 - [x]  Linux x86_32 fastdebug, affected test is now skipped

-

Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk/pull/6957/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6957&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279453
  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6957.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6957/head:pull/6957

PR: https://git.openjdk.java.net/jdk/pull/6957


Re: [jdk18] RFR: 8278897: Alignment of heap segments is not enforced correctly [v2]

2022-01-04 Thread Jorn Vernee
On Tue, 4 Jan 2022 11:39:08 GMT, Maurizio Cimadamore  
wrote:

>> This PR fixes an issue with alignment constraints not being enforced 
>> correctly on on-heap segments dereference/copy operations. Alignment of 
>> on-heap segments cannot be computed exactly, as alignment of elements in 
>> arrays is, ultimately a VM implementation detail. Because of this, alignment 
>> checks on heap segments can fail or pass depending on the platform being 
>> used.
>> 
>> For more details about the problem and the solution please refer to:
>> https://mail.openjdk.java.net/pipermail/panama-dev/2021-November/015852.html
>
> Maurizio Cimadamore has updated the pull request with a new target base due 
> to a merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains two additional 
> commits since the last revision:
> 
>  - Merge branch 'master' into heap-align
>  - Initial push

Marked as reviewed by jvernee (Reviewer).

-

PR: https://git.openjdk.java.net/jdk18/pull/37


Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v3]

2022-01-04 Thread Jatin Bhateja
> Patch extends existing macrologic inferencing algorithm to handle masked 
> logic operations.
> 
> Existing algorithm:
> 
> 1. Identify logic cone roots.
> 2. Packs parent and logic child nodes into a MacroLogic node in bottom up 
> traversal if input constraint are met.
> i.e. maximum number of inputs which a macro logic node can have.
> 3. Perform symbolic evaluation of logic expression tree by assigning value 
> corresponding to a truth table column
> to each input.
> 4. Inputs along with encoded function together represents a macro logic node 
> which mimics a truth table.
> 
> Modification:
> Extended the packing algorithm to operate on both predicated or 
> non-predicated logic nodes. Following
> rules define the criteria under which nodes gets packed into a macro logic 
> node:-
> 
> 1. Parent and both child nodes are all unmasked or masked with same 
> predicates.
> 2. Masked parent can be packed with left child if it is predicated and both 
> have same prediates.
> 3. Masked parent can be packed with right child if its un-predicated or has 
> matching predication condition.
> 4. An unmasked parent can be packed with an unmasked child.
> 
> New jtreg test case added with the patch exhaustively covers all the 
> different combinations of predications of parent and
> child nodes.
> 
> Following are the performance number for JMH benchmark included with the 
> patch.
> 
> Machine Configuration:  Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (40C 2S 
> Icelake Server)
> 
> Benchmark | ARRAYLEN | Baseline (ops/s) | Withopt (ops/s) | Gain ( 
> withopt/baseline)
> -- | -- | -- | -- | --
> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 64 | 2365.421 | 5136.283 | 
> 2.171403315
> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 128 | 2034.1 | 4073.381 | 
> 2.002547072
> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 256 | 1568.694 | 2811.975 
> | 1.792558013
> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 512 | 883.261 | 1662.771 | 
> 1.882536419
> o.o.b.vm.compiler.MacroLogicOpt.workload1_caller | 1024 | 469.513 | 732.81 | 
> 1.560787454
> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 64 | 273.049 | 552.106 | 
> 2.022003377
> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 128 | 219.624 | 359.775 | 
> 1.63814064
> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 256 | 131.649 | 182.23 | 
> 1.384211046
> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 512 | 71.452 | 81.522 | 
> 1.140933774
> o.o.b.vm.compiler.MacroLogicOpt.workload2_caller | 1024 | 37.427 | 41.966 | 
> 1.121276084
> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 64 | 2805.759 | 3383.16 | 
> 1.205791374
> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 128 | 2069.012 | 2250.37 | 
> 1.087654397
> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 256 | 1098.766 | 1101.996 
> | 1.002939661
> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 512 | 470.035 | 484.732 | 
> 1.031267884
> o.o.b.vm.compiler.MacroLogicOpt.workload3_caller | 1024 | 202.827 | 209.073 | 
> 1.030794717
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 256 
> | 3435.989 | 4418.09 | 1.285827749
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 512 
> | 1524.803 | 1678.201 | 1.100601848
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt128 | 1024 
> | 972.501 | 1166.734 | 1.199725244
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 256 
> | 5980.85 | 7584.17 | 1.268075608
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 512 
> | 3258.108 | 3939.23 | 1.209054457
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt256 | 1024 
> | 1475.365 | 1511.159 | 1.024261115
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 256 
> | 4208.766 | 4220.678 | 1.002830283
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 512 
> | 2056.651 | 2049.489 | 0.99651764
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationInt512 | 1024 
> | 1110.461 | 1116.448 | 1.005391455
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 256 
> | 3259.348 | 3947.94 | 1.211266793
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 512 
> | 1515.147 | 1536.647 | 1.014190042
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong256 | 
> 1024 | 911.58 | 1030.54 | 1.130498695
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 256 
> | 2034.611 | 2073.764 | 1.019243482
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 512 
> | 1110.659 | 1116.093 | 1.004892591
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.bitwiseBlendOperationLong512 | 
> 1024 | 559.269 | 559.651 | 1.000683034
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.maskedLogicOperationsInt128 | 256 
> | 3636.141 | 4446.505 | 1.222863745
> o.o.b.jdk.incubator.vector.MaskedLogicOpts.maskedLogicOperationsInt128 | 512 
> | 

Re: RFR: 8273322: Enhance macro logic optimization for masked logic operations. [v2]

2022-01-04 Thread Jatin Bhateja
On Tue, 4 Jan 2022 02:21:35 GMT, Vladimir Kozlov  wrote:

>> Jatin Bhateja has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains two additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8273322
>>  - 8273322: Enhance macro logic optimization for masked logic operations.
>
> src/hotspot/cpu/x86/x86.ad line 1900:
> 
>> 1898: 
>> 1899: case Op_MacroLogicV:
>> 1900:   if(bt != T_INT && bt != T_LONG) {
> 
> Missing `VM_Version::supports_evex()` check?

Hi @vnkozlov, we already have that check (UseAVX < 3) in match_rule_supported 
routine which gets called from this function.

-

PR: https://git.openjdk.java.net/jdk/pull/6893


Re: [jdk18] RFR: 8278897: Alignment of heap segments is not enforced correctly [v2]

2022-01-04 Thread Maurizio Cimadamore
> This PR fixes an issue with alignment constraints not being enforced 
> correctly on on-heap segments dereference/copy operations. Alignment of 
> on-heap segments cannot be computed exactly, as alignment of elements in 
> arrays is, ultimately a VM implementation detail. Because of this, alignment 
> checks on heap segments can fail or pass depending on the platform being used.
> 
> For more details about the problem and the solution please refer to:
> https://mail.openjdk.java.net/pipermail/panama-dev/2021-November/015852.html

Maurizio Cimadamore has updated the pull request with a new target base due to 
a merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains two additional 
commits since the last revision:

 - Merge branch 'master' into heap-align
 - Initial push

-

Changes:
  - all: https://git.openjdk.java.net/jdk18/pull/37/files
  - new: https://git.openjdk.java.net/jdk18/pull/37/files/40a3acc3..3a860afa

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=37&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=37&range=00-01

  Stats: 2046 lines in 116 files changed: 1430 ins; 125 del; 491 mod
  Patch: https://git.openjdk.java.net/jdk18/pull/37.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/37/head:pull/37

PR: https://git.openjdk.java.net/jdk18/pull/37