RFR [XS] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR [XS] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false

Ioi Lam
Please review the follow change:

     https://bugs.openjdk.java.net/browse/JDK-8190191
http://cr.openjdk.java.net/~iklam/jdk10/8190191-jfr-event-retransform-false.v01.open/

Background:

When -XX:FlightRecorderOptions=retransform=false is given in the
command-line,
subclasses of jdk.jfr.Event are instrumented at load time with
information that's
specific to the current JVM lifetime. As a result, we cannot perform
such instrumentation at CDS dump time.

A more complicated CDS solution would load these classes from the archive,
and re-do the runtime instrumentation. However, there are only a very
small number of these classes. The performance benefit of archiving them
does not justify the extra complication.

Hence, in this fix, we just identify these classes and exclude them
from the CDS archive during run time.

(Because JFR is still a closed feature, the test cases are in the closed
repo ...)

Thanks
- Ioi

Reply | Threaded
Open this post in threaded view
|

Re: RFR [S] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false (closed repo)

Ioi Lam
Hi,

Here are the closed test cases:

http://ioilinux.us.oracle.com/webrev/jdk10/8190191-jfr-event-retransform-false.v01.closed/

Thanks
- Ioi


On 10/26/17 4:26 PM, Ioi Lam wrote:

> Please review the follow change:
>
>     https://bugs.openjdk.java.net/browse/JDK-8190191
> http://cr.openjdk.java.net/~iklam/jdk10/8190191-jfr-event-retransform-false.v01.open/ 
>
>
> Background:
>
> When -XX:FlightRecorderOptions=retransform=false is given in the
> command-line,
> subclasses of jdk.jfr.Event are instrumented at load time with
> information that's
> specific to the current JVM lifetime. As a result, we cannot perform
> such instrumentation at CDS dump time.
>
> A more complicated CDS solution would load these classes from the
> archive,
> and re-do the runtime instrumentation. However, there are only a very
> small number of these classes. The performance benefit of archiving them
> does not justify the extra complication.
>
> Hence, in this fix, we just identify these classes and exclude them
> from the CDS archive during run time.
>
> (Because JFR is still a closed feature, the test cases are in the
> closed repo ...)
>
> Thanks
> - Ioi
>

Reply | Threaded
Open this post in threaded view
|

Re: RFR [XS] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false

Jiangli Zhou
In reply to this post by Ioi Lam
Hi Ioi,

SystemDictionary::reorder_dictionary_for_sharing() and Dictionary::reorder_dictionary_for_sharing() are only used for CDS code. Could you please add CDS_ONLY() to the function definitions and put the implementation under #if INCLUDE_CDS.

Thanks,
Jiangli
 

> On Oct 26, 2017, at 4:26 PM, Ioi Lam <[hidden email]> wrote:
>
> Please review the follow change:
>
>     https://bugs.openjdk.java.net/browse/JDK-8190191
> http://cr.openjdk.java.net/~iklam/jdk10/8190191-jfr-event-retransform-false.v01.open/
>
> Background:
>
> When -XX:FlightRecorderOptions=retransform=false is given in the command-line,
> subclasses of jdk.jfr.Event are instrumented at load time with information that's
> specific to the current JVM lifetime. As a result, we cannot perform
> such instrumentation at CDS dump time.
>
> A more complicated CDS solution would load these classes from the archive,
> and re-do the runtime instrumentation. However, there are only a very
> small number of these classes. The performance benefit of archiving them
> does not justify the extra complication.
>
> Hence, in this fix, we just identify these classes and exclude them
> from the CDS archive during run time.
>
> (Because JFR is still a closed feature, the test cases are in the closed repo ...)
>
> Thanks
> - Ioi
>

Reply | Threaded
Open this post in threaded view
|

Re: RFR [XS] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false

serguei.spitsyn@oracle.com
In reply to this post by Ioi Lam
Hi Ioi,

It looks good modulo the comment from Jiangli.

Thanks,
Serguei

On 10/26/17 16:26, Ioi Lam wrote:

> Please review the follow change:
>
>     https://bugs.openjdk.java.net/browse/JDK-8190191
> http://cr.openjdk.java.net/~iklam/jdk10/8190191-jfr-event-retransform-false.v01.open/ 
>
>
> Background:
>
> When -XX:FlightRecorderOptions=retransform=false is given in the
> command-line,
> subclasses of jdk.jfr.Event are instrumented at load time with
> information that's
> specific to the current JVM lifetime. As a result, we cannot perform
> such instrumentation at CDS dump time.
>
> A more complicated CDS solution would load these classes from the
> archive,
> and re-do the runtime instrumentation. However, there are only a very
> small number of these classes. The performance benefit of archiving them
> does not justify the extra complication.
>
> Hence, in this fix, we just identify these classes and exclude them
> from the CDS archive during run time.
>
> (Because JFR is still a closed feature, the test cases are in the
> closed repo ...)
>
> Thanks
> - Ioi
>

Reply | Threaded
Open this post in threaded view
|

Re: RFR [XS] Subclasses of jdk.jfr.Event loaded from CDS breaks -XX:FlightRecorderOptions=retransform=false

Ioi Lam
In reply to this post by Jiangli Zhou
Hi Jiangli & Sergei,

Thanks for your review. I have updated the code as suggested by Jiangli
and pushed.

- Ioi


On 10/26/17 6:00 PM, Jiangli Zhou wrote:

> Hi Ioi,
>
> SystemDictionary::reorder_dictionary_for_sharing() and Dictionary::reorder_dictionary_for_sharing() are only used for CDS code. Could you please add CDS_ONLY() to the function definitions and put the implementation under #if INCLUDE_CDS.
>
> Thanks,
> Jiangli
>  
>> On Oct 26, 2017, at 4:26 PM, Ioi Lam <[hidden email]> wrote:
>>
>> Please review the follow change:
>>
>>      https://bugs.openjdk.java.net/browse/JDK-8190191
>> http://cr.openjdk.java.net/~iklam/jdk10/8190191-jfr-event-retransform-false.v01.open/
>>
>> Background:
>>
>> When -XX:FlightRecorderOptions=retransform=false is given in the command-line,
>> subclasses of jdk.jfr.Event are instrumented at load time with information that's
>> specific to the current JVM lifetime. As a result, we cannot perform
>> such instrumentation at CDS dump time.
>>
>> A more complicated CDS solution would load these classes from the archive,
>> and re-do the runtime instrumentation. However, there are only a very
>> small number of these classes. The performance benefit of archiving them
>> does not justify the extra complication.
>>
>> Hence, in this fix, we just identify these classes and exclude them
>> from the CDS archive during run time.
>>
>> (Because JFR is still a closed feature, the test cases are in the closed repo ...)
>>
>> Thanks
>> - Ioi
>>