Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread Jie Fu

Thank you so much, David.

On 2019/7/22 下午3:26, David Holmes wrote:

On 22/07/2019 5:14 pm, Jie Fu wrote:

Hi David,

On 2019/7/22 下午2:55, David Holmes wrote:

Did you use -N when generating the webrev? You shouldn't in this case.

Yes, I had used `ksh webrev.ksh -u jiefu -N -r 55752` to generate 
webrev.02.


Updated: http://cr.openjdk.java.net/~jiefu/8225648/webrev.03/
webrev.03 was generated by `ksh webrev.ksh -c 8225648`.
Is that right?


Yep :)

Sponsored.

Cheers,
David
-


Thanks a lot.
Best regards,
Jie






Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread David Holmes

On 22/07/2019 5:14 pm, Jie Fu wrote:

Hi David,

On 2019/7/22 下午2:55, David Holmes wrote:

Did you use -N when generating the webrev? You shouldn't in this case.

Yes, I had used `ksh webrev.ksh -u jiefu -N -r 55752` to generate 
webrev.02.


Updated: http://cr.openjdk.java.net/~jiefu/8225648/webrev.03/
webrev.03 was generated by `ksh webrev.ksh -c 8225648`.
Is that right?


Yep :)

Sponsored.

Cheers,
David
-


Thanks a lot.
Best regards,
Jie




Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread Jie Fu

Hi David,

On 2019/7/22 下午2:55, David Holmes wrote:

Did you use -N when generating the webrev? You shouldn't in this case.


Yes, I had used `ksh webrev.ksh -u jiefu -N -r 55752` to generate webrev.02.

Updated: http://cr.openjdk.java.net/~jiefu/8225648/webrev.03/
webrev.03 was generated by `ksh webrev.ksh -c 8225648`.
Is that right?

Thanks a lot.
Best regards,
Jie




Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread David Holmes

Hi Jie,

On 22/07/2019 4:39 pm, Jie Fu wrote:

Hi David,

Thanks for correcting me and sorry for that.


No problem, it's a learning curve for everyone.


Updated: http://cr.openjdk.java.net/~jiefu/8225648/webrev.02/


The patch is still not a proper changeset:

http://cr.openjdk.java.net/~jiefu/8225648/webrev.02/jdk-dev.patch

--- old/test/jdk/java/lang/annotation/loaderLeak/Main.java	2019-07-22 
14:33:23.086509297 +0800
+++ new/test/jdk/java/lang/annotation/loaderLeak/Main.java	2019-07-22 
14:33:22.850508806 +0800

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights 
reserved.

  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,7 @@
 if (c.get() == null) throw new AssertionError();
 System.gc();
 System.gc();
+Reference.reachabilityFence(loader);
 loader = null;

 // Might require multiple calls to System.gc() for weak-references

Did you use -N when generating the webrev? You shouldn't in this case.

Thanks,
David


Thanks a lot.
Best regards,
Jie

On 2019/7/22 下午2:22, David Holmes wrote:

Hi Jie,

On 22/07/2019 4:18 pm, Jie Fu wrote:

Hi all,

Could someone help to push this: 
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/ ?

I need a sponsor.


To prepare your patch for your sponsor you should commit it with the 
correct format commit message, including reviewers, so that the 
sponsor can just do an hg import from the URL of the changeset in your 
webrev - or somewhere else you point them to.


Cheers,
David


It had been fully reviewed by Alan and Ioi and can be applied cleanly.

Thanks a lot.
Best regards,
Jie


 Forwarded Message 
Subject: Re: RFR: 8225648:[TESTBUG] 
java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

Date: Thu, 20 Jun 2019 12:09:24 +0100
From: Alan Bateman 
To: Jie Fu 
CC: core-libs-dev@openjdk.java.net



On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan





Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread Jie Fu

Hi David,

Thanks for correcting me and sorry for that.
Updated: http://cr.openjdk.java.net/~jiefu/8225648/webrev.02/

Thanks a lot.
Best regards,
Jie

On 2019/7/22 下午2:22, David Holmes wrote:

Hi Jie,

On 22/07/2019 4:18 pm, Jie Fu wrote:

Hi all,

Could someone help to push this: 
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/ ?

I need a sponsor.


To prepare your patch for your sponsor you should commit it with the 
correct format commit message, including reviewers, so that the 
sponsor can just do an hg import from the URL of the changeset in your 
webrev - or somewhere else you point them to.


Cheers,
David


It had been fully reviewed by Alan and Ioi and can be applied cleanly.

Thanks a lot.
Best regards,
Jie


 Forwarded Message 
Subject: Re: RFR: 8225648:[TESTBUG] 
java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

Date: Thu, 20 Jun 2019 12:09:24 +0100
From: Alan Bateman 
To: Jie Fu 
CC: core-libs-dev@openjdk.java.net



On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan





Re: Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread David Holmes

Hi Jie,

On 22/07/2019 4:18 pm, Jie Fu wrote:

Hi all,

Could someone help to push this: 
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/ ?

I need a sponsor.


To prepare your patch for your sponsor you should commit it with the 
correct format commit message, including reviewers, so that the sponsor 
can just do an hg import from the URL of the changeset in your webrev - 
or somewhere else you point them to.


Cheers,
David


It had been fully reviewed by Alan and Ioi and can be applied cleanly.

Thanks a lot.
Best regards,
Jie


 Forwarded Message 
Subject: Re: RFR: 8225648:[TESTBUG] 
java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

Date: Thu, 20 Jun 2019 12:09:24 +0100
From: Alan Bateman 
To: Jie Fu 
CC: core-libs-dev@openjdk.java.net



On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan



Fwd: Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-07-22 Thread Jie Fu

Hi all,

Could someone help to push this: 
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/ ?

I need a sponsor.

It had been fully reviewed by Alan and Ioi and can be applied cleanly.

Thanks a lot.
Best regards,
Jie


 Forwarded Message 
Subject: 	Re: RFR: 8225648:[TESTBUG] 
java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

Date:   Thu, 20 Jun 2019 12:09:24 +0100
From:   Alan Bateman 
To: Jie Fu 
CC: core-libs-dev@openjdk.java.net



On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan



Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-23 Thread Jie Fu

Hi Alan,

I need your help to push it.
Could you please sponsor it?

Thanks a lot.
Best regards,
Jie

On 2019/6/20 下午7:09, Alan Bateman wrote:

On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan




Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-20 Thread Alan Bateman

On 19/06/2019 07:36, Jie Fu wrote:

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

I don't see any objections so go ahead.

-Alan


Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-19 Thread Jie Fu

Hi Alan,

I've updated the patch by adding the review info.
http://cr.openjdk.java.net/~jiefu/8225648/webrev.01/

Is it OK to be pushed?

Thanks a lot.
Best regards,
Jie

On 2019/6/19 下午2:04, Ioi Lam wrote:

Sure, you can add me as reviewer.

Thanks


On Jun 18, 2019, at 10:54 PM, Jie Fu  wrote:

Hi Ioi,

Are you OK if I add you as a reviewer for the change: 
http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

Thanks a lot.
Best regards,
Jie


On 2019/6/13 下午4:33, Jie Fu wrote:
Hi Ioi,

Thank you for your review.
You've taught me another way to fix this issue.

Reference.reachabilityFence seems to be widely used to handle this situation.
For example, you can just grep it in the test dir like this:

~/jdk-dev/test$ grep reachabilityFence . -r | wc -l
62


I think both approaches can solve this problem.
However, reachabilityFence seems more readable than a static field.

Thanks a lot.
Best regards,
Jie


On 2019/6/13 下午3:48, Ioi Lam wrote:
Hi Jie,

Instead of using an obscure call Reference.reachabilityFence(loader), how about just 
making "loader" a static field in the test class, so it will be kept alive 
until it's explicitly set to null?

Thanks
- Ioi


On 6/12/19 1:37 AM, Jie Fu wrote:
Hi all,

JBS:https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object "loader"[1] 
which was optimized out by JIT with liveness analysis optimization.
It seems that this case is only suitable for testing interpreters which is not 
friendly to optimized JITs at all.

Although not every test would work with Xcomp (for various reasons), it's 
beneficial to make more tests suitable for JIT testing.
I just hope tests in tier1 would pass with Xcomp.
The goal seems to be reached if this bug and JDK-8225644[2] could be fixed.

Could you please review it?

Thanks a lot.
Best regards,
Jie

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/ae3dbc712839/test/jdk/java/lang/annotation/loaderLeak/Main.java#l48
[2] https://bugs.openjdk.java.net/browse/JDK-8225644






Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-13 Thread Jie Fu

Hi Ioi,

Thank you for your review.
You've taught me another way to fix this issue.

Reference.reachabilityFence seems to be widely used to handle this 
situation.

For example, you can just grep it in the test dir like this:

~/jdk-dev/test$ grep reachabilityFence . -r | wc -l
62


I think both approaches can solve this problem.
However, reachabilityFence seems more readable than a static field.

Thanks a lot.
Best regards,
Jie

On 2019/6/13 下午3:48, Ioi Lam wrote:

Hi Jie,

Instead of using an obscure call Reference.reachabilityFence(loader), 
how about just making "loader" a static field in the test class, so it 
will be kept alive until it's explicitly set to null?


Thanks
- Ioi

On 6/12/19 1:37 AM, Jie Fu wrote:

Hi all,

JBS:    https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object 
"loader"[1] which was optimized out by JIT with liveness analysis 
optimization.
It seems that this case is only suitable for testing interpreters 
which is not friendly to optimized JITs at all.


Although not every test would work with Xcomp (for various reasons), 
it's beneficial to make more tests suitable for JIT testing.

I just hope tests in tier1 would pass with Xcomp.
The goal seems to be reached if this bug and JDK-8225644[2] could be 
fixed.


Could you please review it?

Thanks a lot.
Best regards,
Jie

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/ae3dbc712839/test/jdk/java/lang/annotation/loaderLeak/Main.java#l48

[2] https://bugs.openjdk.java.net/browse/JDK-8225644








Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-13 Thread Jie Fu

Thanks Alan for your review.
And could you please sponsor it?

Thanks a lot.
Best regards,
Jie

On 2019/6/13 下午3:40, Alan Bateman wrote:

On 12/06/2019 09:37, Jie Fu wrote:

Hi all,

JBS:    https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object 
"loader"[1] which was optimized out by JIT with liveness analysis 
optimization.
It seems that this case is only suitable for testing interpreters 
which is not friendly to optimized JITs at all.

This looks okay to me.

-Alan




Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-13 Thread Ioi Lam

Hi Jie,

Instead of using an obscure call Reference.reachabilityFence(loader), 
how about just making "loader" a static field in the test class, so it 
will be kept alive until it's explicitly set to null?


Thanks
- Ioi

On 6/12/19 1:37 AM, Jie Fu wrote:

Hi all,

JBS:    https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object 
"loader"[1] which was optimized out by JIT with liveness analysis 
optimization.
It seems that this case is only suitable for testing interpreters 
which is not friendly to optimized JITs at all.


Although not every test would work with Xcomp (for various reasons), 
it's beneficial to make more tests suitable for JIT testing.

I just hope tests in tier1 would pass with Xcomp.
The goal seems to be reached if this bug and JDK-8225644[2] could be 
fixed.


Could you please review it?

Thanks a lot.
Best regards,
Jie

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/ae3dbc712839/test/jdk/java/lang/annotation/loaderLeak/Main.java#l48

[2] https://bugs.openjdk.java.net/browse/JDK-8225644






Re: RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-13 Thread Alan Bateman

On 12/06/2019 09:37, Jie Fu wrote:

Hi all,

JBS:    https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object 
"loader"[1] which was optimized out by JIT with liveness analysis 
optimization.
It seems that this case is only suitable for testing interpreters 
which is not friendly to optimized JITs at all.

This looks okay to me.

-Alan


RFR: 8225648:[TESTBUG] java/lang/annotation/loaderLeak/Main.java fails with -Xcomp

2019-06-12 Thread Jie Fu

Hi all,

JBS:    https://bugs.openjdk.java.net/browse/JDK-8225648
Webrev: http://cr.openjdk.java.net/~jiefu/8225648/webrev.00/

The failure was caused by the lost of an OopMap item for the object 
"loader"[1] which was optimized out by JIT with liveness analysis 
optimization.
It seems that this case is only suitable for testing interpreters which 
is not friendly to optimized JITs at all.


Although not every test would work with Xcomp (for various reasons), 
it's beneficial to make more tests suitable for JIT testing.

I just hope tests in tier1 would pass with Xcomp.
The goal seems to be reached if this bug and JDK-8225644[2] could be fixed.

Could you please review it?

Thanks a lot.
Best regards,
Jie

[1] 
http://hg.openjdk.java.net/jdk/jdk/file/ae3dbc712839/test/jdk/java/lang/annotation/loaderLeak/Main.java#l48

[2] https://bugs.openjdk.java.net/browse/JDK-8225644