From marcus.hirt at oracle.com Fri Jun 1 09:40:24 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 01 Jun 2018 11:40:24 +0200 Subject: Review request: JMC-6021: Adding gitignore file. Message-ID: <2C4FF216-E572-4901-8C2C-D7E39E6F3E02@oracle.com> Adding a .gitignore file: http://cr.openjdk.java.net/~hirt/JMC-6021/webrev.0/ /M From ola.westin at oracle.com Fri Jun 1 14:02:04 2018 From: ola.westin at oracle.com (Ola Westin) Date: Fri, 1 Jun 2018 16:02:04 +0200 Subject: Review request: JMC-6021: Adding gitignore file. In-Reply-To: <2C4FF216-E572-4901-8C2C-D7E39E6F3E02@oracle.com> References: <2C4FF216-E572-4901-8C2C-D7E39E6F3E02@oracle.com> Message-ID: <85bb6be0-5628-d0ac-950e-10aff8ffad98@oracle.com> Looks good. /Ola On 2018-06-01 11:40, Marcus Hirt wrote: > Adding a .gitignore file: > > http://cr.openjdk.java.net/~hirt/JMC-6021/webrev.0/ > > > > /M > From marcus.hirt at oracle.com Fri Jun 1 16:42:10 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Fri, 01 Jun 2018 16:42:10 +0000 Subject: hg: jmc/jmc: JMC-6021: Adding a .gitignore file, just in case. Message-ID: <201806011642.w51GgAh5022099@aojmv0008.oracle.com> Changeset: 6292fae1c26d Author: hirt Date: 2018-06-01 18:41 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/6292fae1c26d JMC-6021: Adding a .gitignore file, just in case. Reviewed-by: owestin + .gitignore From sharath.ballal at oracle.com Mon Jun 4 06:36:09 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Sun, 3 Jun 2018 23:36:09 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <5B0BE3FD.1090104@oracle.com> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> Message-ID: <222485d7-af79-46f9-a6fb-a786dda3269a@default> Hi Erik, The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); if (flrService == null) { throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); } else if (flrService.isEnabled() || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); recorder.resetWarning(); return new StartRecordingWizard(model, recorder); } else { return null; } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { // Oracle JDK, if (!cf.isCommercialFeaturesEnabled()) { Ask user if CF should be unlocked. if (user answers yes) { cf.enableCommercialFeatures(); } else { return; } } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { Inform user the Flight Recorder capabilities are not available return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik > Erik, > > Modified webrev is at > http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ > > > Thanks, > Sharath > > > -----Original Message----- > From: Sharath Ballal > Sent: Saturday, May 26, 2018 11:30 PM > To: Erik Gahlin > Cc: jmc-dev at openjdk.java.net > Subject: RE: Review Request: JMC-5893: Commercial features check > removed in JDK 11 > > Thanks Erik, I will make the changes and send new webrev. > > > Thanks, > Sharath > > > -----Original Message----- > From: Erik Gahlin > Sent: Saturday, May 26, 2018 11:26 PM > To: Sharath Ballal > Cc: jmc-dev at openjdk.java.net > Subject: Re: Review Request: JMC-5893: Commercial features check > removed in JDK 11 > > Hi Sharath, > >> On 26 May 2018, at 14:33, Sharath Ballal wrote: >> >> Hi Erik, >> >> Thanks for the review. >> >> I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". >> For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? > Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. > > >> (Actually if I check only for jdk.management.jfr:type=FlightRecorder >> it is enough since we only want this check to work in 11) > It should be sufficient. > > From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. > > I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. > > Thanks > Erik > > >> javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder >> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) >> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) >> ... >> ... >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Erik Gahlin >> Sent: Friday, May 25, 2018 3:16 PM >> To: jmc-dev at openjdk.java.net >> Subject: Re: Review Request: JMC-5893: Commercial features check >> removed in JDK 11 >> >> Hi Sharath, >> >> As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". >> >> If this is incorrect, we have a terrible bug that has gone unnoticed. >> >> Erik >> >>> Please review the fix for: >>> >>> >>> >>> JBS: https://bugs.openjdk.java.net/browse/JMC-5893 >>> >>> >>> >>> Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ >>> >>> >>> >>> Following is the description of the testing done and result: >>> >>> >>> >>> Ran mvn verify successfully. >>> >>> OpenJDK 11 - Does not show "Commercial feature" dialog box. >>> Recording can be done, but cannot be loaded due to JMC-5895 >>> >>> OracleJDK 11 - Shows "Commercial feature" dialog box as >>> "UnlockCommercialFeatures" flag is still present. Recording can be >>> done, but cannot be loaded due to JMC-5895 >>> >>> OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight >>> Recorder is not supported below 7U4. (same message without fix from >>> a standalone client) >>> >>> OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). >>> >>> >>> >>> Thanks, >>> >>> Sharath >>> >>> >>> >>> From guru.hb at oracle.com Mon Jun 4 08:00:39 2018 From: guru.hb at oracle.com (Guru) Date: Mon, 4 Jun 2018 13:30:39 +0530 Subject: Review Request: JMC-6034: Update Platform definition and remove jre config In-Reply-To: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> Message-ID: <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6034 Web rev : http://cr.openjdk.java.net/~ghb/JMC-6034/webrev.0/ Solution : Updated the Platform definition file with latest version and removed `a.jre.javase and config.a.jre.javase` which is not required any more. Thanks, Guru From marcus.hirt at oracle.com Mon Jun 4 08:36:29 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Mon, 04 Jun 2018 10:36:29 +0200 Subject: Review Request: JMC-6034: Update Platform definition and remove jre config In-Reply-To: <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> Message-ID: <3FBD55D0-8764-4552-871A-023754D83373@oracle.com> Looks good! /M From: Guru Date: Monday, 4 June 2018 at 10:00 To: Klara Ward , Marcus Hirt , Sharath Ballal Cc: , Henrik Dafg?rd Subject: Review Request: JMC-6034: Update Platform definition and remove jre config Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6034 Web rev : http://cr.openjdk.java.net/~ghb/JMC-6034/webrev.0/ Solution : Updated the Platform definition file with latest version and removed `a.jre.javase and config.a.jre.javase` which is not required any more. Thanks, Guru From guru.hb at oracle.com Mon Jun 4 08:39:31 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Mon, 04 Jun 2018 08:39:31 +0000 Subject: hg: jmc/jmc: JMC-6034: Update Platform definition and remove jre config Message-ID: <201806040839.w548dVBp009838@aojmv0008.oracle.com> Changeset: 4cdef377d11c Author: ghb Date: 2018-06-04 14:09 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/4cdef377d11c JMC-6034: Update Platform definition and remove jre config Reviewed-by: hirt ! releng/platform-definitions/platform-definition-photon/platform-definition-photon.target From klara.ward at oracle.com Mon Jun 4 08:58:11 2018 From: klara.ward at oracle.com (klara.ward at oracle.com) Date: Mon, 04 Jun 2018 08:58:11 +0000 Subject: hg: jmc/jmc: JMC-6022: Use hg changeset in version properties Message-ID: <201806040858.w548wCeN015844@aojmv0008.oracle.com> Changeset: f53acaca7a1c Author: klward Date: 2018-06-04 10:32 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/f53acaca7a1c JMC-6022: Use hg changeset in version properties Use create goal from buildnumber plugin to get hg changeset as buildNumber. Will also work for git if changing the scmConnection property. Reviewed-by: hirt ! application/org.openjdk.jmc.rcp.application/src/main/resources/about.mappings ! application/org.openjdk.jmc.ui.common/src/main/resources/version.properties ! pom.xml From guru.hb at oracle.com Tue Jun 5 17:25:41 2018 From: guru.hb at oracle.com (Guru) Date: Tue, 5 Jun 2018 22:55:41 +0530 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> Message-ID: Hi Klara, Thanks for your suggestion and Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-5996 Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 Solution : Updated the Tyco version from 1.0.0 to 1.1.0. Test : Verified the License property generated in ?content.xml? and also observed the License dialog prompted while installing the updates. Thanks, Guru From sharath.ballal at oracle.com Wed Jun 6 15:17:19 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Wed, 6 Jun 2018 08:17:19 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <222485d7-af79-46f9-a6fb-a786dda3269a@default> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> Message-ID: PING.. any more comments. Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Monday, June 04, 2018 12:06 PM To: Erik Gahlin Cc: jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Erik, The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); if (flrService == null) { throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); } else if (flrService.isEnabled() || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); recorder.resetWarning(); return new StartRecordingWizard(model, recorder); } else { return null; } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { // Oracle JDK, if (!cf.isCommercialFeaturesEnabled()) { Ask user if CF should be unlocked. if (user answers yes) { cf.enableCommercialFeatures(); } else { return; } } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { Inform user the Flight Recorder capabilities are not available return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik > Erik, > > Modified webrev is at > http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ > > > Thanks, > Sharath > > > -----Original Message----- > From: Sharath Ballal > Sent: Saturday, May 26, 2018 11:30 PM > To: Erik Gahlin > Cc: jmc-dev at openjdk.java.net > Subject: RE: Review Request: JMC-5893: Commercial features check > removed in JDK 11 > > Thanks Erik, I will make the changes and send new webrev. > > > Thanks, > Sharath > > > -----Original Message----- > From: Erik Gahlin > Sent: Saturday, May 26, 2018 11:26 PM > To: Sharath Ballal > Cc: jmc-dev at openjdk.java.net > Subject: Re: Review Request: JMC-5893: Commercial features check > removed in JDK 11 > > Hi Sharath, > >> On 26 May 2018, at 14:33, Sharath Ballal wrote: >> >> Hi Erik, >> >> Thanks for the review. >> >> I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". >> For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? > Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. > > >> (Actually if I check only for jdk.management.jfr:type=FlightRecorder >> it is enough since we only want this check to work in 11) > It should be sufficient. > > From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. > > I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. > > Thanks > Erik > > >> javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder >> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) >> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) >> ... >> ... >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Erik Gahlin >> Sent: Friday, May 25, 2018 3:16 PM >> To: jmc-dev at openjdk.java.net >> Subject: Re: Review Request: JMC-5893: Commercial features check >> removed in JDK 11 >> >> Hi Sharath, >> >> As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". >> >> If this is incorrect, we have a terrible bug that has gone unnoticed. >> >> Erik >> >>> Please review the fix for: >>> >>> >>> >>> JBS: https://bugs.openjdk.java.net/browse/JMC-5893 >>> >>> >>> >>> Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ >>> >>> >>> >>> Following is the description of the testing done and result: >>> >>> >>> >>> Ran mvn verify successfully. >>> >>> OpenJDK 11 - Does not show "Commercial feature" dialog box. >>> Recording can be done, but cannot be loaded due to JMC-5895 >>> >>> OracleJDK 11 - Shows "Commercial feature" dialog box as >>> "UnlockCommercialFeatures" flag is still present. Recording can be >>> done, but cannot be loaded due to JMC-5895 >>> >>> OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>> >>> OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>> >>> OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight >>> Recorder is not supported below 7U4. (same message without fix from >>> a standalone client) >>> >>> OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). >>> >>> >>> >>> Thanks, >>> >>> Sharath >>> >>> >>> >>> From sharath.ballal at oracle.com Fri Jun 8 09:32:56 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Fri, 8 Jun 2018 02:32:56 -0700 (PDT) Subject: RFR: JMC-5895 - JFR in JDK 11 changed event paths from 'com.oracle.jdk' to 'jdk', and type paths from 'com.oracle.jfr.types' to 'jdk.types' Message-ID: <5f87519e-3436-48f6-aae8-1fabac75d634@default> Hello, Pls review fix for the following P1 issue: ID: https://bugs.openjdk.java.net/browse/JMC-5895 Webrev: http://cr.openjdk.java.net/~sballal/JMC-5895/webrev.00/ Thanks, Sharath From viplove.p.paliwal at oracle.com Fri Jun 8 06:30:58 2018 From: viplove.p.paliwal at oracle.com (Viplove Paliwal) Date: Fri, 8 Jun 2018 06:30:58 +0000 (UTC) Subject: JMC-6031 review Message-ID: <6d94bd27-e126-4733-860a-60294125a3e1@default> Hi Team, Please review the small fix for HYPERLINK "https://bugs.openjdk.java.net/browse/JMC-6031"JMC-6031. I have attached the diff in the mail. Thanks, Viplove From marcus.hirt at oracle.com Fri Jun 8 13:03:00 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 08 Jun 2018 06:03:00 -0700 Subject: JMC-6031 review In-Reply-To: <6d94bd27-e126-4733-860a-60294125a3e1@default> References: <6d94bd27-e126-4733-860a-60294125a3e1@default> Message-ID: Hi Viplove, Is there a reason why you removed the mnemonic (&)? Kind regards, Marcus ?On 2018-06-08, 04:39, "jmc-dev on behalf of Viplove Paliwal" wrote: Hi Team, Please review the small fix for HYPERLINK "https://bugs.openjdk.java.net/browse/JMC-6031"JMC-6031. I have attached the diff in the mail. Thanks, Viplove From marcus.hirt at oracle.com Fri Jun 8 13:27:00 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Fri, 08 Jun 2018 13:27:00 +0000 Subject: hg: jmc/jmc: JMC-6031: The menu item "Java Mission Control Help" in Help menu should be "JDK Mission Control Help". Message-ID: <201806081327.w58DR083028015@aojmv0008.oracle.com> Changeset: 614c1d0b9520 Author: hirt Date: 2018-06-08 06:26 -0700 URL: http://hg.openjdk.java.net/jmc/jmc/rev/614c1d0b9520 JMC-6031: The menu item "Java Mission Control Help" in Help menu should be "JDK Mission Control Help". Reviewed-by: hirt Contributed-by: Viplove Paliwal ! application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties From guru.hb at oracle.com Fri Jun 8 16:13:06 2018 From: guru.hb at oracle.com (Guru) Date: Fri, 8 Jun 2018 21:43:06 +0530 Subject: Review request for JMC-6045 : JMC 7.0.0 update ide and rcp landing page with correct url's Message-ID: <33C86C7E-5B24-4AB4-9F3F-57AAB1684011@oracle.com> Please review the fix for updating landing page (ide and rcp) with correct url's JBS : https://bugs.openjdk.java.net/browse/JMC-6045 Web rev : http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.0/ Thanks, Guru From klara.ward at oracle.com Tue Jun 12 09:29:36 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 11:29:36 +0200 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> Message-ID: <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> Hi Guru, Did you see the javafx classpath issue caused by upgrading to Tycho 1.1.0 in https://bugs.openjdk.java.net/browse/JMC-5859 Is that resolved now? // Klara On 2018-06-05 19:25, Guru wrote: > Hi Klara, > > Thanks for your suggestion and Please review the fix for > JBS : https://bugs.openjdk.java.net/browse/JMC-5996 > Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 > > > Solution : Updated the Tyco version from 1.0.0 to 1.1.0. > Test : Verified the License property generated in ?content.xml? and > also observed the License dialog prompted while installing the updates. > > Thanks, > Guru From klara.ward at oracle.com Tue Jun 12 09:42:07 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 11:42:07 +0200 Subject: Review request for JMC-6045 : JMC 7.0.0 update ide and rcp landing page with correct url's In-Reply-To: <33C86C7E-5B24-4AB4-9F3F-57AAB1684011@oracle.com> References: <33C86C7E-5B24-4AB4-9F3F-57AAB1684011@oracle.com> Message-ID: A few comments: * IDE page has one "Mission Control" without the "JDK" prefix, maybe that is intentional? * I assume the offline url needs to be updated again to remove the '-ea' suffix for the zip file name? * Is there also a bug to update the screenshots? They say "Oracle Java Mission Control" in the window title.. * In application/org.openjdk.jmc.updatesite.ide/src/main/resources/update-site-instructions/index.html, the updatesite url should be '...missioncontrol/updatesites/openjdk/7.0.0/eclipse/' instead of '...missioncontrol/updatesites/oracle/7.0.0/eclipse/' * Maybe these screenshots needs to be updated as well... // Klara On 2018-06-08 18:13, Guru wrote: > Please review the fix for updating landing page (ide and rcp) with > correct url's > JBS : https://bugs.openjdk.java.net/browse/JMC-6045 > Web rev : http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.0/ > > > Thanks, > Guru From guru.hb at oracle.com Tue Jun 12 09:42:40 2018 From: guru.hb at oracle.com (Guru) Date: Tue, 12 Jun 2018 15:12:40 +0530 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> Message-ID: <2C6DBB49-A53B-4867-A427-AEB2BEE38E24@oracle.com> Yes, I observed the compilation failure on Windows (though Mac it works i.e compilation and works as expected). "[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar -> [Help 1]?. Same for Tyco 1.1.0 as well.. Thanks, Guru > On 12-Jun-2018, at 2:59 PM, Klara Ward wrote: > > Hi Guru, > > Did you see the javafx classpath issue caused by upgrading to Tycho > 1.1.0 in https://bugs.openjdk.java.net/browse/JMC-5859 > Is that resolved now? > > // Klara > > > On 2018-06-05 19:25, Guru wrote: >> Hi Klara, >> >> Thanks for your suggestion and Please review the fix for >> JBS : https://bugs.openjdk.java.net/browse/JMC-5996 >> Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 >> >> >> Solution : Updated the Tyco version from 1.0.0 to 1.1.0. >> Test : Verified the License property generated in ?content.xml? and >> also observed the License dialog prompted while installing the updates. >> >> Thanks, >> Guru > > From klara.ward at oracle.com Tue Jun 12 10:00:34 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 12:00:34 +0200 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: <2C6DBB49-A53B-4867-A427-AEB2BEE38E24@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> <2C6DBB49-A53B-4867-A427-AEB2BEE38E24@oracle.com> Message-ID: I believe Ola tried to find a solution for this, but never had the time to solve it. Did you try Tycho 1.2.0 which seems to be released in May. // Klara On 2018-06-12 11:42, Guru wrote: > Yes, I observed the compilation failure on Windows (though Mac it > works i.e compilation and works as expected). > > "[ERROR] Failed to execute goal > org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile > (default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error > compiling: Illegal char <:> at index 74: > D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar > -> [Help 1]?. > > Same for Tyco 1.1.0 as well.. > > Thanks, > Guru > >> On 12-Jun-2018, at 2:59 PM, Klara Ward > > wrote: >> >> Hi Guru, >> >> Did you see the javafx classpath issue caused by upgrading to Tycho >> 1.1.0 in https://bugs.openjdk.java.net/browse/JMC-5859 >> Is that resolved now? >> >> // Klara >> >> >> On 2018-06-05 19:25, Guru wrote: >>> Hi Klara, >>> >>> Thanks for your suggestion and Please review the fix for >>> JBS : https://bugs.openjdk.java.net/browse/JMC-5996 >>> Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 >>> >>> >>> >>> Solution : Updated the Tyco version from 1.0.0 to 1.1.0. >>> Test : Verified the License property generated in ?content.xml? and >>> also observed the License dialog prompted while installing the updates. >>> >>> Thanks, >>> Guru >> >> > From guru.hb at oracle.com Tue Jun 12 14:04:59 2018 From: guru.hb at oracle.com (Guru) Date: Tue, 12 Jun 2018 19:34:59 +0530 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> <2C6DBB49-A53B-4867-A427-AEB2BEE38E24@oracle.com> Message-ID: Yes, I tried with 1.2.0 as well and getting the same compilation failure. @Ola, Do suggest if you have pointer for this failure (Compiling JMC with Tyco 1.1.0 or with 1.2.0. Thanks, Guru > On 12-Jun-2018, at 3:30 PM, Klara Ward wrote: > > I believe Ola tried to find a solution for this, but never had the time to solve it. > > Did you try Tycho 1.2.0 which seems to be released in May. > > // Klara > > On 2018-06-12 11:42, Guru wrote: >> Yes, I observed the compilation failure on Windows (though Mac it works i.e compilation and works as expected). >> >> "[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar -> [Help 1]?. >> >> Same for Tyco 1.1.0 as well.. >> >> Thanks, >> Guru >> >>> On 12-Jun-2018, at 2:59 PM, Klara Ward > wrote: >>> >>> Hi Guru, >>> >>> Did you see the javafx classpath issue caused by upgrading to Tycho >>> 1.1.0 in https://bugs.openjdk.java.net/browse/JMC-5859 >>> Is that resolved now? >>> >>> // Klara >>> >>> >>> On 2018-06-05 19:25, Guru wrote: >>>> Hi Klara, >>>> >>>> Thanks for your suggestion and Please review the fix for >>>> JBS : https://bugs.openjdk.java.net/browse/JMC-5996 >>>> Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 >>>> > >>>> >>>> Solution : Updated the Tyco version from 1.0.0 to 1.1.0. >>>> Test : Verified the License property generated in ?content.xml? and >>>> also observed the License dialog prompted while installing the updates. >>>> >>>> Thanks, >>>> Guru >>> >>> >> > From klara.ward at oracle.com Tue Jun 12 15:34:10 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 17:34:10 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> Message-ID: <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> *Seems this fix is not done yet *(if I did not make a mistake when importing the fix and testing it) * * I imported the patch from webrev.02, but it looks like more changes as needed, since I still got the "Enable Commercial Features" dialog when trying to start a flight recorder for JDK 11, build 17.** * * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) // Klara On 2018-06-06 17:17, Sharath Ballal wrote: > PING.. any more comments. > > Thanks, > Sharath > > > -----Original Message----- > From: Sharath Ballal > Sent: Monday, June 04, 2018 12:06 PM > To: Erik Gahlin > Cc: jmc-dev at openjdk.java.net > Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 > > Hi Erik, > > The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). > > IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); > if (flrService == null) { > throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); > } else if (flrService.isEnabled() > || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { > MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); > RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); > recorder.resetWarning(); > return new StartRecordingWizard(model, recorder); > } else { > return null; > } > > Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). > > Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. > > http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ > > Thanks, > Sharath > > > -----Original Message----- > From: Erik Gahlin > Sent: Monday, May 28, 2018 4:42 PM > To: Sharath Ballal > Cc: jmc-dev at openjdk.java.net > Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 > > Sharath, > > Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... > > It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. > > I haven't looked at the GUI code, but I expect it looks something like this. > > ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); > if (cf != null) { > // Oracle JDK, > if (!cf.isCommercialFeaturesEnabled()) { > Ask user if CF should be unlocked. > if (user answers yes) { > cf.enableCommercialFeatures(); > } else { > return; > } > } > } > FlightRecorderService fr = connection.getService(FlightRecorderService.class); > if (fr == null) { > Inform user the Flight Recorder capabilities are not available > return; > } > ... > > If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. > > Thanks > Erik > >> Erik, >> >> Modified webrev is at >> http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ >> >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Sharath Ballal >> Sent: Saturday, May 26, 2018 11:30 PM >> To: Erik Gahlin >> Cc: jmc-dev at openjdk.java.net >> Subject: RE: Review Request: JMC-5893: Commercial features check >> removed in JDK 11 >> >> Thanks Erik, I will make the changes and send new webrev. >> >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Erik Gahlin >> Sent: Saturday, May 26, 2018 11:26 PM >> To: Sharath Ballal >> Cc: jmc-dev at openjdk.java.net >> Subject: Re: Review Request: JMC-5893: Commercial features check >> removed in JDK 11 >> >> Hi Sharath, >> >>> On 26 May 2018, at 14:33, Sharath Ballal wrote: >>> >>> Hi Erik, >>> >>> Thanks for the review. >>> >>> I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". >>> For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? >> Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. >> >> >>> (Actually if I check only for jdk.management.jfr:type=FlightRecorder >>> it is enough since we only want this check to work in 11) >> It should be sufficient. >> >> From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. >> >> I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. >> >> Thanks >> Erik >> >> >>> javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder >>> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) >>> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) >>> ... >>> ... >>> >>> Thanks, >>> Sharath >>> >>> >>> -----Original Message----- >>> From: Erik Gahlin >>> Sent: Friday, May 25, 2018 3:16 PM >>> To: jmc-dev at openjdk.java.net >>> Subject: Re: Review Request: JMC-5893: Commercial features check >>> removed in JDK 11 >>> >>> Hi Sharath, >>> >>> As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". >>> >>> If this is incorrect, we have a terrible bug that has gone unnoticed. >>> >>> Erik >>> >>>> Please review the fix for: >>>> >>>> >>>> >>>> JBS: https://bugs.openjdk.java.net/browse/JMC-5893 >>>> >>>> >>>> >>>> Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ >>>> >>>> >>>> >>>> Following is the description of the testing done and result: >>>> >>>> >>>> >>>> Ran mvn verify successfully. >>>> >>>> OpenJDK 11 - Does not show "Commercial feature" dialog box. >>>> Recording can be done, but cannot be loaded due to JMC-5895 >>>> >>>> OracleJDK 11 - Shows "Commercial feature" dialog box as >>>> "UnlockCommercialFeatures" flag is still present. Recording can be >>>> done, but cannot be loaded due to JMC-5895 >>>> >>>> OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" >>>> >>>> OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>> >>>> OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>>> >>>> OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>> >>>> OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>>> >>>> OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>> >>>> OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight >>>> Recorder is not supported below 7U4. (same message without fix from >>>> a standalone client) >>>> >>>> OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Sharath >>>> >>>> >>>> >>>> From klara.ward at oracle.com Tue Jun 12 15:56:22 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 17:56:22 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> Message-ID: Looks like the version 11-ea is not considered to be greater of equal than 11, which makes this fail right now. *Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. *This will make the code behave incorrectly for really early versions of JDK 11, but those are not very interesting anyway. (Changing the check in JavaVersion.isGreaterOrEqualThan to not includes earlyAccess seems like a more risky, and perhaps incorrect fix.) I only tested JDK 11 without any flags, any other configurations of JDK versions, and +/-UnlockCommercialFeatures and +/-FlightRecorder flags are untested by me. // Klara On 2018-06-12 17:34, Klara Ward wrote: > *Seems this fix is not done yet *(if I did not make a mistake when > importing the fix and testing it) > * > * I imported the patch from webrev.02, but it looks like more changes > as needed, since I still got the "Enable Commercial Features" dialog > when trying to start a flight recorder for JDK 11, build 17.** > * > * Spelling error in FlightRecorderServiceV2.java, should be "Flight > Recorder" instead of "Flighter Recorder" > > * (The class HotSpot23CommercialFeaturesService should probably be > called something else, but that could be seen as out of scope for this > fix.) > > // Klara > > > On 2018-06-06 17:17, Sharath Ballal wrote: >> PING.. any more comments. >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Sharath Ballal >> Sent: Monday, June 04, 2018 12:06 PM >> To: Erik Gahlin >> Cc: jmc-dev at openjdk.java.net >> Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 >> >> Hi Erik, >> >> The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). >> >> IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); >> if (flrService == null) { >> throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); >> } else if (flrService.isEnabled() >> || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { >> MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); >> RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); >> recorder.resetWarning(); >> return new StartRecordingWizard(model, recorder); >> } else { >> return null; >> } >> >> Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). >> >> Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. >> >> http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ >> >> Thanks, >> Sharath >> >> >> -----Original Message----- >> From: Erik Gahlin >> Sent: Monday, May 28, 2018 4:42 PM >> To: Sharath Ballal >> Cc: jmc-dev at openjdk.java.net >> Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 >> >> Sharath, >> >> Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... >> >> It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. >> >> I haven't looked at the GUI code, but I expect it looks something like this. >> >> ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); >> if (cf != null) { >> // Oracle JDK, >> if (!cf.isCommercialFeaturesEnabled()) { >> Ask user if CF should be unlocked. >> if (user answers yes) { >> cf.enableCommercialFeatures(); >> } else { >> return; >> } >> } >> } >> FlightRecorderService fr = connection.getService(FlightRecorderService.class); >> if (fr == null) { >> Inform user the Flight Recorder capabilities are not available >> return; >> } >> ... >> >> If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. >> >> Thanks >> Erik >> >>> Erik, >>> >>> Modified webrev is at >>> http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ >>> >>> >>> Thanks, >>> Sharath >>> >>> >>> -----Original Message----- >>> From: Sharath Ballal >>> Sent: Saturday, May 26, 2018 11:30 PM >>> To: Erik Gahlin >>> Cc: jmc-dev at openjdk.java.net >>> Subject: RE: Review Request: JMC-5893: Commercial features check >>> removed in JDK 11 >>> >>> Thanks Erik, I will make the changes and send new webrev. >>> >>> >>> Thanks, >>> Sharath >>> >>> >>> -----Original Message----- >>> From: Erik Gahlin >>> Sent: Saturday, May 26, 2018 11:26 PM >>> To: Sharath Ballal >>> Cc: jmc-dev at openjdk.java.net >>> Subject: Re: Review Request: JMC-5893: Commercial features check >>> removed in JDK 11 >>> >>> Hi Sharath, >>> >>>> On 26 May 2018, at 14:33, Sharath Ballal wrote: >>>> >>>> Hi Erik, >>>> >>>> Thanks for the review. >>>> >>>> I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". >>>> For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? >>> Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. >>> >>> >>>> (Actually if I check only for jdk.management.jfr:type=FlightRecorder >>>> it is enough since we only want this check to work in 11) >>> It should be sufficient. >>> >>> From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. >>> >>> I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. >>> >>> Thanks >>> Erik >>> >>> >>>> javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder >>>> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) >>>> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) >>>> ... >>>> ... >>>> >>>> Thanks, >>>> Sharath >>>> >>>> >>>> -----Original Message----- >>>> From: Erik Gahlin >>>> Sent: Friday, May 25, 2018 3:16 PM >>>> To: jmc-dev at openjdk.java.net >>>> Subject: Re: Review Request: JMC-5893: Commercial features check >>>> removed in JDK 11 >>>> >>>> Hi Sharath, >>>> >>>> As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". >>>> >>>> If this is incorrect, we have a terrible bug that has gone unnoticed. >>>> >>>> Erik >>>> >>>>> Please review the fix for: >>>>> >>>>> >>>>> >>>>> JBS: https://bugs.openjdk.java.net/browse/JMC-5893 >>>>> >>>>> >>>>> >>>>> Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ >>>>> >>>>> >>>>> >>>>> Following is the description of the testing done and result: >>>>> >>>>> >>>>> >>>>> Ran mvn verify successfully. >>>>> >>>>> OpenJDK 11 - Does not show "Commercial feature" dialog box. >>>>> Recording can be done, but cannot be loaded due to JMC-5895 >>>>> >>>>> OracleJDK 11 - Shows "Commercial feature" dialog box as >>>>> "UnlockCommercialFeatures" flag is still present. Recording can be >>>>> done, but cannot be loaded due to JMC-5895 >>>>> >>>>> OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" >>>>> >>>>> OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>>> >>>>> OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>>>> >>>>> OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>>> >>>>> OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" >>>>> >>>>> OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. >>>>> >>>>> OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight >>>>> Recorder is not supported below 7U4. (same message without fix from >>>>> a standalone client) >>>>> >>>>> OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Sharath >>>>> >>>>> >>>>> >>>>> > From klara.ward at oracle.com Tue Jun 12 15:57:07 2018 From: klara.ward at oracle.com (Klara Ward) Date: Tue, 12 Jun 2018 17:57:07 +0200 Subject: Patch for JMC-6046: Fix accessrules for javafx in javafx.osgi and joverflow.ui plugins Message-ID: <67d14d2b-56de-b9f9-fa22-caa77bfcf50a@oracle.com> Please review fix for added accessrules to avoid Access Restriction errors in my workspace. Not entirely sure why I get these problems, but other people do not, but the fix does not hurt anyone. Attached patch. Regards, Klara -------------- next part -------------- # HG changeset patch # User klward # Date 1528817051 -7200 # Tue Jun 12 17:24:11 2018 +0200 # Node ID 369c1a24afea18e069f8fb0b4d4fae5e3afe9c5c # Parent 614c1d0b9520a0cb0ffb8ace894e53e2d07f8af7 JMC-6046: Fix accessrules for javafx in javafx.osgi and joverflow.ui plugins diff -r 614c1d0b9520 -r 369c1a24afea application/org.openjdk.jmc.javafx.osgi/.classpath --- a/application/org.openjdk.jmc.javafx.osgi/.classpath Fri Jun 08 06:26:51 2018 -0700 +++ b/application/org.openjdk.jmc.javafx.osgi/.classpath Tue Jun 12 17:24:11 2018 +0200 @@ -2,7 +2,11 @@ - + + + + + diff -r 614c1d0b9520 -r 369c1a24afea application/org.openjdk.jmc.joverflow.ui/.classpath --- a/application/org.openjdk.jmc.joverflow.ui/.classpath Fri Jun 08 06:26:51 2018 -0700 +++ b/application/org.openjdk.jmc.joverflow.ui/.classpath Tue Jun 12 17:24:11 2018 +0200 @@ -2,7 +2,11 @@ - + + + + + From marcus.hirt at oracle.com Tue Jun 12 16:54:07 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Tue, 12 Jun 2018 09:54:07 -0700 Subject: Patch for JMC-6046: Fix accessrules for javafx in javafx.osgi and joverflow.ui plugins In-Reply-To: <67d14d2b-56de-b9f9-fa22-caa77bfcf50a@oracle.com> References: <67d14d2b-56de-b9f9-fa22-caa77bfcf50a@oracle.com> Message-ID: Looks fine! Kind regards, Marcus ?On 2018-06-12, 08:57, "jmc-dev on behalf of Klara Ward" wrote: Please review fix for added accessrules to avoid Access Restriction errors in my workspace. Not entirely sure why I get these problems, but other people do not, but the fix does not hurt anyone. Attached patch. Regards, Klara From marcus.hirt at oracle.com Tue Jun 12 16:59:18 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Tue, 12 Jun 2018 09:59:18 -0700 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> Message-ID: <73B0DC1A-7C73-4CE6-BCEF-8B082FD15415@oracle.com> No, this fix is not done yet. I will work with Sharath to make sure JMC-5893 and JMC-5895 gets ready. /M From: Klara Ward Date: Tuesday, 12 June 2018 at 08:34 To: Sharath Ballal Cc: , Erik Gahlin , Marcus Hirt Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Seems this fix is not done yet (if I did not make a mistake when importing the fix and testing it) * I imported the patch from webrev.02, but it looks like more changes as needed, since I still got the "Enable Commercial Features" dialog when trying to start a flight recorder for JDK 11, build 17. * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) // Klara On 2018-06-06 17:17, Sharath Ballal wrote: PING.. any more comments. Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Monday, June 04, 2018 12:06 PM To: Erik Gahlin Cc: jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Erik, The UI code is almost similar.? The recent code is as below.? Now the CF is an object stored in FRservice object (and there are two versions of FRservice). ???????????????? IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); ???????????????? if (flrService == null) { ???????????????????????? throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); ???????????????? } else if (flrService.isEnabled() ??????????????????????????????? || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { ???????????????????????? MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); ???????????????????????? RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); ???????????????????????? recorder.resetWarning(); ???????????????????????? return new StartRecordingWizard(model, recorder); ???????????????? } else { ???????????????????????? return null; ???????????????? } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds.? Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF.? Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option.? I have used the java version number to differentiate, but if you feel there is something better, let me know.? http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { ??? // Oracle JDK, ??? if (!cf.isCommercialFeaturesEnabled()) { ?????? Ask user if CF should be unlocked. ?????? if (user answers yes) { ???????? cf.enableCommercialFeatures(); ?????? } else { ???????? return; ?????? } ??? } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { ??? Inform user the Flight Recorder capabilities are not available ??? return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik Erik, Modified webrev is at http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Saturday, May 26, 2018 11:30 PM To: Erik Gahlin Cc: jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Thanks Erik, I will make the changes and send new webrev. Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Saturday, May 26, 2018 11:26 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, On 26 May 2018, at 14:33, Sharath Ballal wrote: Hi Erik, Thanks for the review. I had checked this, but not sure how I missed it.? Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". For 8 & 7 I verified from code that the name is? "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException.? Am I missing anything? Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. (Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11) It should be sufficient. From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. Thanks Erik ? javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder ???? at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ???? at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) ???? ... ???? ... Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Friday, May 25, 2018 3:16 PM To: jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". If this is incorrect, we have a terrible bug that has gone unnoticed. Erik Please review the fix for: JBS: https://bugs.openjdk.java.net/browse/JMC-5893 Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ Following is the description of the testing done and result: Ran mvn verify successfully. OpenJDK 11 - Does not show "Commercial feature" dialog box. Recording can be done, but cannot be loaded due to JMC-5895 OracleJDK 11 - Shows "Commercial feature" dialog box as "UnlockCommercialFeatures" flag is still present.? Recording can be done, but cannot be loaded due to JMC-5895 OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight Recorder is not supported below 7U4. (same message without fix from a standalone client) OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). Thanks, Sharath From klara at kth.se Tue Jun 12 15:28:36 2018 From: klara at kth.se (Klara Ward) Date: Tue, 12 Jun 2018 17:28:36 +0200 Subject: Patch for JMC-6046: Fix accessrules for javafx in javafx.osgi and joverflow.ui plugins Message-ID: <5f9192e9-efc1-4f51-9536-1468da1215e0@kth.se> Please review fix for added accessrules to avoid Access Restriction errors in my workspace. Not entirely sure why I get these problems, but other people do not, but the fix does not hurt anyone. Attached patch. Regards, Klara -------------- next part -------------- # HG changeset patch # User klward # Date 1528817051 -7200 # Tue Jun 12 17:24:11 2018 +0200 # Node ID 369c1a24afea18e069f8fb0b4d4fae5e3afe9c5c # Parent 614c1d0b9520a0cb0ffb8ace894e53e2d07f8af7 JMC-6046: Fix accessrules for javafx in javafx.osgi and joverflow.ui plugins diff -r 614c1d0b9520 -r 369c1a24afea application/org.openjdk.jmc.javafx.osgi/.classpath --- a/application/org.openjdk.jmc.javafx.osgi/.classpath Fri Jun 08 06:26:51 2018 -0700 +++ b/application/org.openjdk.jmc.javafx.osgi/.classpath Tue Jun 12 17:24:11 2018 +0200 @@ -2,7 +2,11 @@ - + + + + + diff -r 614c1d0b9520 -r 369c1a24afea application/org.openjdk.jmc.joverflow.ui/.classpath --- a/application/org.openjdk.jmc.joverflow.ui/.classpath Fri Jun 08 06:26:51 2018 -0700 +++ b/application/org.openjdk.jmc.joverflow.ui/.classpath Tue Jun 12 17:24:11 2018 +0200 @@ -2,7 +2,11 @@ - + + + + + From klara.ward at oracle.com Wed Jun 13 06:30:38 2018 From: klara.ward at oracle.com (Klara Ward) Date: Wed, 13 Jun 2018 08:30:38 +0200 Subject: Review Request: JMC-5996: License text not displayed when installing JMC plugins In-Reply-To: References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> <632374B6-385C-4CAE-AA7A-48A5BDA5FCE2@oracle.com> <121d8b37-6d52-0fc6-8a15-98c1877fad55@oracle.com> <2C6DBB49-A53B-4867-A427-AEB2BEE38E24@oracle.com> Message-ID: Ola might not read this, I think JMC-5859 has his findings. I don?t remember him figuring out why Tycho had made this change, or what they recommend doing instead. One workaround would be to not build on Windows, but that feels very limiting. Another would be to somehow patch the manifest after the Tycho build.... // Klara > 12 juni 2018 kl. 16:04 skrev Guru : > > Yes, I tried with 1.2.0 as well and getting the same compilation failure. > > @Ola, Do suggest if you have pointer for this failure (Compiling JMC with Tyco 1.1.0 or with 1.2.0. > > Thanks, > Guru >> On 12-Jun-2018, at 3:30 PM, Klara Ward wrote: >> >> I believe Ola tried to find a solution for this, but never had the time to solve it. >> >> Did you try Tycho 1.2.0 which seems to be released in May. >> >> // Klara >> >>> On 2018-06-12 11:42, Guru wrote: >>> Yes, I observed the compilation failure on Windows (though Mac it works i.e compilation and works as expected). >>> >>> "[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar -> [Help 1]?. >>> >>> Same for Tyco 1.1.0 as well.. >>> >>> Thanks, >>> Guru >>> >>>> On 12-Jun-2018, at 2:59 PM, Klara Ward wrote: >>>> >>>> Hi Guru, >>>> >>>> Did you see the javafx classpath issue caused by upgrading to Tycho >>>> 1.1.0 in https://bugs.openjdk.java.net/browse/JMC-5859 >>>> Is that resolved now? >>>> >>>> // Klara >>>> >>>> >>>>> On 2018-06-05 19:25, Guru wrote: >>>>> Hi Klara, >>>>> >>>>> Thanks for your suggestion and Please review the fix for >>>>> JBS : https://bugs.openjdk.java.net/browse/JMC-5996 >>>>> Webrev : http://cr.openjdk.java.net/~ghb/JMC-5996/webrev.0 >>>>> >>>>> >>>>> Solution : Updated the Tyco version from 1.0.0 to 1.1.0. >>>>> Test : Verified the License property generated in ?content.xml? and >>>>> also observed the License dialog prompted while installing the updates. >>>>> >>>>> Thanks, >>>>> Guru >>>> >>>> >>> >> > From klara.ward at oracle.com Wed Jun 13 06:40:58 2018 From: klara.ward at oracle.com (klara.ward at oracle.com) Date: Wed, 13 Jun 2018 06:40:58 +0000 Subject: hg: jmc/jmc: JMC-6046: Fix access rules for javafx in javafx.osgi and joverflow.ui plugins Message-ID: <201806130640.w5D6ewcQ019208@aojmv0008.oracle.com> Changeset: f0d01d20dcd1 Author: klward Date: 2018-06-12 17:24 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/f0d01d20dcd1 JMC-6046: Fix access rules for javafx in javafx.osgi and joverflow.ui plugins Reviewed-by: hirt ! application/org.openjdk.jmc.javafx.osgi/.classpath ! application/org.openjdk.jmc.joverflow.ui/.classpath From guru.hb at oracle.com Wed Jun 13 09:17:54 2018 From: guru.hb at oracle.com (Guru) Date: Wed, 13 Jun 2018 14:47:54 +0530 Subject: Review request for JMC-6045 : JMC 7.0.0 update ide and rcp landing page with correct url's In-Reply-To: References: <33C86C7E-5B24-4AB4-9F3F-57AAB1684011@oracle.com> Message-ID: <269B0C71-A897-46DB-84E7-41722C5A2A21@oracle.com> Thanks Klara, Please find updated webrev http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.2/ Ide ref : http://cr.openjdk.java.net/~ghb/JMC-6045/new_ide.2/ Rcp ref : http://cr.openjdk.java.net/~ghb/JMC-6045/new_rcp.2/ Updated screenshots, corrected Url?s and missing JDK prefix. Thanks, Guru > On 12-Jun-2018, at 3:12 PM, Klara Ward wrote: > > A few comments: > > * IDE page has one "Mission Control" without the "JDK" prefix, maybe > that is intentional? > * I assume the offline url needs to be updated again to remove the '-ea' > suffix for the zip file name? > > * Is there also a bug to update the screenshots? They say "Oracle Java > Mission Control" in the window title.. > > * In > application/org.openjdk.jmc.updatesite.ide/src/main/resources/update-site-instructions/index.html, > the updatesite url should be > '...missioncontrol/updatesites/openjdk/7.0.0/eclipse/' instead of > '...missioncontrol/updatesites/oracle/7.0.0/eclipse/' > * Maybe these screenshots needs to be updated as well... > > // Klara > > On 2018-06-08 18:13, Guru wrote: >> Please review the fix for updating landing page (ide and rcp) with >> correct url's >> JBS : https://bugs.openjdk.java.net/browse/JMC-6045 >> Web rev : http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.0/ >> >> >> Thanks, >> Guru > > From sharath.ballal at oracle.com Wed Jun 13 14:59:47 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Wed, 13 Jun 2018 07:59:47 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> Message-ID: <28bb27e6-6849-4afa-83ca-8beffcc38821@default> Thanks for the comments Klara. Thanks, Sharath From: Klara Ward Sent: Tuesday, June 12, 2018 9:26 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net; Erik Gahlin; Marcus Hirt Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Looks like the version 11-ea is not considered to be greater of equal than 11, which makes this fail right now. Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. This will make the code behave incorrectly for really early versions of JDK 11, but those are not very interesting anyway. (Changing the check in JavaVersion.isGreaterOrEqualThan to not includes earlyAccess seems like a more risky, and perhaps incorrect fix.) I only tested JDK 11 without any flags, any other configurations of JDK versions, and +/-UnlockCommercialFeatures and +/-FlightRecorder flags are untested by me. // Klara On 2018-06-12 17:34, Klara Ward wrote: Seems this fix is not done yet (if I did not make a mistake when importing the fix and testing it) * I imported the patch from webrev.02, but it looks like more changes as needed, since I still got the "Enable Commercial Features" dialog when trying to start a flight recorder for JDK 11, build 17. * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) // Klara On 2018-06-06 17:17, Sharath Ballal wrote: PING.. any more comments. Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Monday, June 04, 2018 12:06 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Erik, The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); if (flrService == null) { throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); } else if (flrService.isEnabled() || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); recorder.resetWarning(); return new StartRecordingWizard(model, recorder); } else { return null; } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.02/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { // Oracle JDK, if (!cf.isCommercialFeaturesEnabled()) { Ask user if CF should be unlocked. if (user answers yes) { cf.enableCommercialFeatures(); } else { return; } } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { Inform user the Flight Recorder capabilities are not available return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik Erik, Modified webrev is at HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.01/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Saturday, May 26, 2018 11:30 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Thanks Erik, I will make the changes and send new webrev. Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Saturday, May 26, 2018 11:26 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, On 26 May 2018, at 14:33, Sharath Ballal HYPERLINK "mailto:sharath.ballal at oracle.com" wrote: Hi Erik, Thanks for the review. I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. (Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11) It should be sufficient. From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. Thanks Erik javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) ... ... Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Friday, May 25, 2018 3:16 PM To: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". If this is incorrect, we have a terrible bug that has gone unnoticed. Erik Please review the fix for: JBS: https://bugs.openjdk.java.net/browse/JMC-5893 Webrev: HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.00/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ Following is the description of the testing done and result: Ran mvn verify successfully. OpenJDK 11 - Does not show "Commercial feature" dialog box. Recording can be done, but cannot be loaded due to JMC-5895 OracleJDK 11 - Shows "Commercial feature" dialog box as "UnlockCommercialFeatures" flag is still present. Recording can be done, but cannot be loaded due to JMC-5895 OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight Recorder is not supported below 7U4. (same message without fix from a standalone client) OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). Thanks, Sharath From marcus.hirt at oracle.com Thu Jun 14 16:34:03 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 14 Jun 2018 09:34:03 -0700 Subject: Oracle Contributor Agreement Message-ID: <2F3F9273-C1C5-4E1A-9150-050971403C2D@oracle.com> Hi all, Don?t forget that a signed OCA is required to contribute to the JMC project! Here is some information (including an FAQ): http://openjdk.java.net/legal/ Kind regards, Marcus From klara at kth.se Fri Jun 15 13:54:45 2018 From: klara at kth.se (Klara Ward) Date: Fri, 15 Jun 2018 15:54:45 +0200 Subject: Review request for JMC-6045 : JMC 7.0.0 update ide and rcp landing page with correct url's In-Reply-To: <269B0C71-A897-46DB-84E7-41722C5A2A21@oracle.com> References: <33C86C7E-5B24-4AB4-9F3F-57AAB1684011@oracle.com> <269B0C71-A897-46DB-84E7-41722C5A2A21@oracle.com> Message-ID: <89b32018-6d94-367d-fca5-805908d320b2@kth.se> There is still one url i ide/update-site-instructions which includes "oracle" instead of "openjdk" On the updatesite.ide index.html page, the offline download url, which currently is "http://download.oracle.com/technology/products/missioncontrol/updatesites/openjdk/7.0.0/eclipse/jmc-updatesite-ide-7.0.0-ea.zip" could be changed to something like "http://download.oracle.com/technology/products/missioncontrol/updatesites/openjdk/7.0.0/jmc-updatesite-ide-7.0.0-ea.zip" to make building the zip for OTN deploy (see https://bugs.openjdk.java.net/browse/JMC-5841) a bit nicer. // Klara On 2018-06-13 11:17, Guru wrote: > Thanks Klara, > > Please find updated webrev > http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.2/ > Ide ref : http://cr.openjdk.java.net/~ghb/JMC-6045/new_ide.2/ > Rcp ref : http://cr.openjdk.java.net/~ghb/JMC-6045/new_rcp.2/ > > Updated screenshots, corrected Url?s and missing JDK prefix. > > Thanks, > Guru > >> On 12-Jun-2018, at 3:12 PM, Klara Ward wrote: >> >> A few comments: >> >> * IDE page has one "Mission Control" without the "JDK" prefix, maybe >> that is intentional? >> * I assume the offline url needs to be updated again to remove the '-ea' >> suffix for the zip file name? >> >> * Is there also a bug to update the screenshots? They say "Oracle Java >> Mission Control" in the window title.. >> >> * In >> application/org.openjdk.jmc.updatesite.ide/src/main/resources/update-site-instructions/index.html, >> the updatesite url should be >> '...missioncontrol/updatesites/openjdk/7.0.0/eclipse/' instead of >> '...missioncontrol/updatesites/oracle/7.0.0/eclipse/' >> * Maybe these screenshots needs to be updated as well... >> >> // Klara >> >> On 2018-06-08 18:13, Guru wrote: >>> Please review the fix for updating landing page (ide and rcp) with >>> correct url's >>> JBS : https://bugs.openjdk.java.net/browse/JMC-6045 >>> Web rev : http://cr.openjdk.java.net/~ghb/JMC-6045/webrev.0/ >>> >>> >>> Thanks, >>> Guru >> From sharath.ballal at oracle.com Wed Jun 20 07:06:49 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Wed, 20 Jun 2018 00:06:49 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> Message-ID: <0f2113cf-dbc2-4289-b61a-62d58ad76df7@default> Hi Klara, O * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" Corrected it. O * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) I can open a bug for it. But why should the name be changed ? What is the significance of 23 in the filename ? O Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. I have changed JDK_11 to JDK_11_EA and JFR_NOT_COMMERCIAL to JDK_11_EA and passed earlyAccess flag as true. With this the fix works for 11 developer build and EA build. I again tested 11 and 10 builds with +/-UnlockCommercialFeatures and +/-FlightRecorder flags both open and Oracle jdks. I also ran the 'verify' tests and they are passing. Updated Webrev : http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.03/ Thanks, Sharath From: Klara Ward Sent: Tuesday, June 12, 2018 9:26 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net; Erik Gahlin; Marcus Hirt Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Looks like the version 11-ea is not considered to be greater of equal than 11, which makes this fail right now. Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. This will make the code behave incorrectly for really early versions of JDK 11, but those are not very interesting anyway. (Changing the check in JavaVersion.isGreaterOrEqualThan to not includes earlyAccess seems like a more risky, and perhaps incorrect fix.) I only tested JDK 11 without any flags, any other configurations of JDK versions, and +/-UnlockCommercialFeatures and +/-FlightRecorder flags are untested by me. // Klara On 2018-06-12 17:34, Klara Ward wrote: Seems this fix is not done yet (if I did not make a mistake when importing the fix and testing it) * I imported the patch from webrev.02, but it looks like more changes as needed, since I still got the "Enable Commercial Features" dialog when trying to start a flight recorder for JDK 11, build 17. * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) // Klara On 2018-06-06 17:17, Sharath Ballal wrote: PING.. any more comments. Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Monday, June 04, 2018 12:06 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Erik, The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); if (flrService == null) { throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); } else if (flrService.isEnabled() || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); recorder.resetWarning(); return new StartRecordingWizard(model, recorder); } else { return null; } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.02/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { // Oracle JDK, if (!cf.isCommercialFeaturesEnabled()) { Ask user if CF should be unlocked. if (user answers yes) { cf.enableCommercialFeatures(); } else { return; } } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { Inform user the Flight Recorder capabilities are not available return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik Erik, Modified webrev is at HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.01/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Saturday, May 26, 2018 11:30 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Thanks Erik, I will make the changes and send new webrev. Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Saturday, May 26, 2018 11:26 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, On 26 May 2018, at 14:33, Sharath Ballal HYPERLINK "mailto:sharath.ballal at oracle.com" wrote: Hi Erik, Thanks for the review. I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. (Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11) It should be sufficient. From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. Thanks Erik javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) ... ... Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Friday, May 25, 2018 3:16 PM To: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". If this is incorrect, we have a terrible bug that has gone unnoticed. Erik Please review the fix for: JBS: https://bugs.openjdk.java.net/browse/JMC-5893 Webrev: HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.00/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ Following is the description of the testing done and result: Ran mvn verify successfully. OpenJDK 11 - Does not show "Commercial feature" dialog box. Recording can be done, but cannot be loaded due to JMC-5895 OracleJDK 11 - Shows "Commercial feature" dialog box as "UnlockCommercialFeatures" flag is still present. Recording can be done, but cannot be loaded due to JMC-5895 OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight Recorder is not supported below 7U4. (same message without fix from a standalone client) OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). Thanks, Sharath From klara.ward at oracle.com Wed Jun 20 12:19:00 2018 From: klara.ward at oracle.com (Klara Ward) Date: Wed, 20 Jun 2018 14:19:00 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <0f2113cf-dbc2-4289-b61a-62d58ad76df7@default> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> <0f2113cf-dbc2-4289-b61a-62d58ad76df7@default> Message-ID: New webrev looks like it will work. Ship it. The name for the class HotSpot23CommercialFeaturesService comes from HotSpot version 23, which is what is included in JDK 7u4 where Flight Recorder was first released. The code could probably benefit from being rewritten to be easier to understand, but IMHO that could be done in a new bug. Regards, Klara On 2018-06-20 09:06, Sharath Ballal wrote: > > Hi Klara, > > > > ? * Spelling error in FlightRecorderServiceV2.java, should be "Flight > Recorder" instead of "Flighter Recorder" > Corrected it. > > ? * (The class HotSpot23CommercialFeaturesService should probably be > called something else, but that could be seen as out of scope for this > fix.) > I can open a bug for it. But why should the name be changed ? What > is the significance of 23 in the filename ? > > ? *Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to > a new "JDK_11_EA" instead.* > > I have changed JDK_11 to JDK_11_EA and JFR_NOT_COMMERCIAL to JDK_11_EA > and passed earlyAccess flag as true. With this the fix works for 11 > developer build and EA build. > > > > I again tested 11 and 10 builds with +/-UnlockCommercialFeatures and > +/-FlightRecorder flags both open and Oracle jdks. I also ran the > ?verify? tests and they are passing. > > > > Updated Webrev : > http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.03/ > > > > > Thanks, > > Sharath > > > > > > *From:*Klara Ward > *Sent:* Tuesday, June 12, 2018 9:26 PM > *To:* Sharath Ballal > *Cc:* jmc-dev at openjdk.java.net; Erik Gahlin; Marcus Hirt > *Subject:* Re: Review Request: JMC-5893: Commercial features check > removed in JDK 11 > > > > Looks like the version 11-ea is not considered to be greater of equal > than 11, which makes this fail right now. > *Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a > new "JDK_11_EA" instead. *This will make the code behave incorrectly > for really early versions of JDK 11, but those are not very > interesting anyway. > > (Changing the check in JavaVersion.isGreaterOrEqualThan to not > includes earlyAccess seems like a more risky, and perhaps incorrect fix.) > > > I only tested JDK 11 without any flags, > any other configurations of JDK versions, and > +/-UnlockCommercialFeatures and +/-FlightRecorder flags are untested > by me. > > // Klara > From sharath.ballal at oracle.com Wed Jun 20 16:53:15 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Wed, 20 Jun 2018 09:53:15 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <826489e7-ccbe-61a4-a48f-785a246fa3d4@oracle.com> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> <5B0BE3FD.1090104@oracle.com> <222485d7-af79-46f9-a6fb-a786dda3269a@default> <28559abe-31a3-07a6-8f6f-6042e255523e@oracle.com> <0f2113cf-dbc2-4289-b61a-62d58ad76df7@default> <826489e7-ccbe-61a4-a48f-785a246fa3d4@oracle.com> Message-ID: <04f93b40-0f10-4073-b01f-b2df8fbee22b@default> Thanks a lot Klara for the review. Thanks, Sharath From: Klara Ward Sent: Wednesday, June 20, 2018 5:46 PM To: Sharath Ballal Cc: jmc-dev at openjdk.java.net; Erik Gahlin; Marcus Hirt Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 New webrev looks like it will work. Ship it. The name for the class HotSpot23CommercialFeaturesService comes from HotSpot version 23, which is what is included in JDK 7u4 where Flight Recorder was first released. The code could probably benefit from being rewritten to be easier to understand, but IMHO that could be done in a new bug. Regards, Klara On 2018-06-20 09:06, Sharath Ballal wrote: Hi Klara, O * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" Corrected it. O * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) I can open a bug for it. But why should the name be changed ? What is the significance of 23 in the filename ? O Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. I have changed JDK_11 to JDK_11_EA and JFR_NOT_COMMERCIAL to JDK_11_EA and passed earlyAccess flag as true. With this the fix works for 11 developer build and EA build. I again tested 11 and 10 builds with +/-UnlockCommercialFeatures and +/-FlightRecorder flags both open and Oracle jdks. I also ran the 'verify' tests and they are passing. Updated Webrev : HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.03/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.03/ Thanks, Sharath From: Klara Ward Sent: Tuesday, June 12, 2018 9:26 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net; Erik Gahlin; Marcus Hirt Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Looks like the version 11-ea is not considered to be greater of equal than 11, which makes this fail right now. Maybe JavaVersionSupport.JFR_NOT_COMMERCIAL field should point to a new "JDK_11_EA" instead. This will make the code behave incorrectly for really early versions of JDK 11, but those are not very interesting anyway. (Changing the check in JavaVersion.isGreaterOrEqualThan to not includes earlyAccess seems like a more risky, and perhaps incorrect fix.) I only tested JDK 11 without any flags, any other configurations of JDK versions, and +/-UnlockCommercialFeatures and +/-FlightRecorder flags are untested by me. // Klara On 2018-06-12 17:34, Klara Ward wrote: Seems this fix is not done yet (if I did not make a mistake when importing the fix and testing it) * I imported the patch from webrev.02, but it looks like more changes as needed, since I still got the "Enable Commercial Features" dialog when trying to start a flight recorder for JDK 11, build 17. * Spelling error in FlightRecorderServiceV2.java, should be "Flight Recorder" instead of "Flighter Recorder" * (The class HotSpot23CommercialFeaturesService should probably be called something else, but that could be seen as out of scope for this fix.) // Klara On 2018-06-06 17:17, Sharath Ballal wrote: PING.. any more comments. Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Monday, June 04, 2018 12:06 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Erik, The UI code is almost similar. The recent code is as below. Now the CF is an object stored in FRservice object (and there are two versions of FRservice). IFlightRecorderService flrService = handle.getServiceOrNull(IFlightRecorderService.class); if (flrService == null) { throw new FlightRecorderException(JVMSupportToolkit.getNoFlightRecorderErrorMessage(handle, false)); } else if (flrService.isEnabled() || ControlPanel.askUserForEnable(flrService, Messages.COMMERCIAL_FEATURES_QUESTION)) { MCFile recFile = ControlPanel.getDefaultRecordingFile(recorder.getServerHandle()); RecordingWizardModel model = new RecordingWizardModel(flrService, recFile); recorder.resetWarning(); return new StartRecordingWizard(model, recorder); } else { return null; } Our earlier understanding was that the CF flag will be removed from JDK 11 Oracle builds. Hence I thought that since most of the changes seemed to be in the commercial features, better to contain the changes there and behave as if the commercial flag is enabled for JDK 11 and above (to avoid changes in other places). Thanks for pointing that CF may be present in JDK 11 Oracle builds though JFR is not a CF. Now we need a way to differentiate between Oracle JDK 11 with CF option and Oracle JDK 7-10 with CF option. I have used the java version number to differentiate, but if you feel there is something better, let me know. HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.02/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.02/ Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Monday, May 28, 2018 4:42 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Sharath, Could you name the constant JDK_MANAGEMENT_JFR_MBEAN_NAME instead of JFR2... It seems incorrect to return true for the method isCommercialFeaturesEnabled(), since commercial features is not enabled just because the JFR MBean is present. I haven't looked at the GUI code, but I expect it looks something like this. ICommercialFeaturesService cf = connection.getService(ICommercialFeaturesService.class); if (cf != null) { // Oracle JDK, if (!cf.isCommercialFeaturesEnabled()) { Ask user if CF should be unlocked. if (user answers yes) { cf.enableCommercialFeatures(); } else { return; } } } FlightRecorderService fr = connection.getService(FlightRecorderService.class); if (fr == null) { Inform user the Flight Recorder capabilities are not available return; } ... If isCommercialFeaturesEnabled() returns true, it will fall through and not ask the user. This is why the code works. Problem here seems to be that the CF flag may be present in Oracle JDK 11, even though Flight Recorder is not a CF. Not sure if it is worth creating a cleaner abstraction, rename methods etc, but I will let people who has worked on JMC more recently decide on this. Thanks Erik Erik, Modified webrev is at HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.01/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.01/ Thanks, Sharath -----Original Message----- From: Sharath Ballal Sent: Saturday, May 26, 2018 11:30 PM To: Erik Gahlin Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: RE: Review Request: JMC-5893: Commercial features check removed in JDK 11 Thanks Erik, I will make the changes and send new webrev. Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Saturday, May 26, 2018 11:26 PM To: Sharath Ballal Cc: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, On 26 May 2018, at 14:33, Sharath Ballal HYPERLINK "mailto:sharath.ballal at oracle.com" wrote: Hi Erik, Thanks for the review. I had checked this, but not sure how I missed it. Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder". For 8 & 7 I verified from code that the name is "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException. Am I missing anything? Yes, the MBean needs to be registered in the platform MBeanServer, which can be done using the MissionControlMXBean, which existed in Oracle JDK, but was removed with JDK 9 when the MBean was rewritten into a supported API. (Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11) It should be sufficient. From JDK 9, a user can create their own modular runtime image using the jlink tool, so jdk.management.jfr may not be present even in a JDK 11 image. I think it would be best not to mention the JDK version in the source code, and just focus on if the capability is present or not. Thanks Erik javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375) ... ... Thanks, Sharath -----Original Message----- From: Erik Gahlin Sent: Friday, May 25, 2018 3:16 PM To: HYPERLINK "mailto:jmc-dev at openjdk.java.net"jmc-dev at openjdk.java.net Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11 Hi Sharath, As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder". If this is incorrect, we have a terrible bug that has gone unnoticed. Erik Please review the fix for: JBS: https://bugs.openjdk.java.net/browse/JMC-5893 Webrev: HYPERLINK "http://cr.openjdk.java.net/%7Esballal/JMC-5893/webrev.00/"http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/ Following is the description of the testing done and result: Ran mvn verify successfully. OpenJDK 11 - Does not show "Commercial feature" dialog box. Recording can be done, but cannot be loaded due to JMC-5895 OracleJDK 11 - Shows "Commercial feature" dialog box as "UnlockCommercialFeatures" flag is still present. Recording can be done, but cannot be loaded due to JMC-5895 OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled" OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled" OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded. OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight Recorder is not supported below 7U4. (same message without fix from a standalone client) OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options). Thanks, Sharath From sharath.ballal at oracle.com Thu Jun 21 04:20:55 2018 From: sharath.ballal at oracle.com (sharath.ballal at oracle.com) Date: Thu, 21 Jun 2018 04:20:55 +0000 Subject: hg: jmc/jmc: JMC-5893: Commercial features check removed in JDK 11 Message-ID: <201806210420.w5L4KuWn008218@aojmv0008.oracle.com> Changeset: 1f3b4692160c Author: sballal Date: 2018-06-21 09:50 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/1f3b4692160c JMC-5893: Commercial features check removed in JDK 11 Reviewed-by: klward, egahlin ! application/org.openjdk.jmc.rjmx.services.jfr/src/main/java/org/openjdk/jmc/rjmx/services/jfr/internal/FlightRecorderServiceV2.java ! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/services/internal/HotSpot23CommercialFeaturesService.java ! core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/version/JavaVersionSupport.java From marcus.hirt at oracle.com Fri Jun 22 23:39:23 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Sat, 23 Jun 2018 01:39:23 +0200 Subject: Review request for JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules Message-ID: <0A6B8BAA-D7D8-40C2-9D92-B25B8801B3A4@oracle.com> Please review the fix for two rules throwing exceptions: JBS:?https://bugs.openjdk.java.net/browse/JMC-6050 Web rev:?http://cr.openjdk.java.net/~hirt/JMC-6050/webrev/ /M From klara at kth.se Sat Jun 23 21:01:18 2018 From: klara at kth.se (Klara Ward) Date: Sat, 23 Jun 2018 23:01:18 +0200 Subject: Review request for JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules In-Reply-To: <0A6B8BAA-D7D8-40C2-9D92-B25B8801B3A4@oracle.com> References: <0A6B8BAA-D7D8-40C2-9D92-B25B8801B3A4@oracle.com> Message-ID: <16AA40AD-048F-41C2-876C-15E60226CBBD@kth.se> Could the event availability check be changed to: ?at least one of the two allocation event types should be available, and the other should be enabled?? I did the change to cause this bug in the first place, in an attempt to handle recordings that only had New TLAB events (more common in JDK9+) // Klara > 23 juni 2018 kl. 01:39 skrev Marcus Hirt : > > Please review the fix for two rules throwing exceptions: > JBS: https://bugs.openjdk.java.net/browse/JMC-6050 > Web rev: http://cr.openjdk.java.net/~hirt/JMC-6050/webrev/ > > /M > > From miro.wengner at gmail.com Sun Jun 24 21:42:09 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Sun, 24 Jun 2018 23:42:09 +0200 Subject: Reproducer for the bug JMC-5767 Message-ID: <63B5C9B4-E6D5-4628-93B8-44D7C5766A5D@gmail.com> Hi All, I?ve reproduced the bug JMC-5767 against the current jmc branch. steps I?ve done: 1. created the ExceptionThrowing Rule and I?ve printed out the report by using ?JfrRulesReport" for both XML and JSON 2. run JMC with the ExceptionThrowing rule improvement proposal: XML report generates also ruleID but JSON form doesn?t contain such information . It would be helpful to add it also into the JSON report to have a complete report. Reproducer for the bug JMC-5767 can be found on my github account: https://github.com/mirage22/jmc-rules I think that the ticket can be closed. Kind Regards, Miro brief report results: XML: jmc5767.ExceptionThrowingRule ExceptionThrowingRule java.util.concurrent.ExecutionException: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.addReport(JfrRulesReport.java:274) at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.printReport(JfrRulesReport.java:225) at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.main(JfrRulesReport.java:172) Caused by: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule at org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:59) at org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit$RuleEvaluator.run(RulesToolkit.java:1187) at java.lang.Thread.run(Thread.java:748) JSON: { "name": "ExceptionThrowingRule", "error": "java.util.concurrent.ExecutionException: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule\n\tat java.util.concurrent.FutureTask.report(FutureTask.java:122)\n\tat java.util.concurrent.FutureTask.get(FutureTask.java:192)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.addReport(JfrRulesReport.java:274)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.printReport(JfrRulesReport.java:225)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.main(JfrRulesReport.java:172)\nCaused by: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule\n\tat org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:59)\n\tat org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:1)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit$RuleEvaluator.run(RulesToolkit.java:1187)\n\tat java.lang.Thread.run(Thread.java:748)\n" } From marcus.hirt at oracle.com Sun Jun 24 21:54:57 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Sun, 24 Jun 2018 23:54:57 +0200 Subject: Reproducer for the bug JMC-5767 In-Reply-To: <63B5C9B4-E6D5-4628-93B8-44D7C5766A5D@gmail.com> References: <63B5C9B4-E6D5-4628-93B8-44D7C5766A5D@gmail.com> Message-ID: Thank you Miro! I?ve closed JMC-5767 and opened https://bugs.openjdk.java.net/browse/JMC-6052. /M > On 24 Jun 2018, at 23:42, Miro Wengner wrote: > > Hi All, > > I?ve reproduced the bug JMC-5767 against the current jmc branch. > steps I?ve done: > 1. created the ExceptionThrowing Rule and I?ve printed out the report by using ?JfrRulesReport" for both XML and JSON > 2. run JMC with the ExceptionThrowing rule > > improvement proposal: XML report generates also ruleID but JSON form doesn?t contain such information . It would be helpful to add it also into the JSON report to have a complete report. > > Reproducer for the bug JMC-5767 can be found on my github account: https://github.com/mirage22/jmc-rules > > I think that the ticket can be closed. > > Kind Regards, > Miro > > brief report results: > > XML: > jmc5767.ExceptionThrowingRule > ExceptionThrowingRule > java.util.concurrent.ExecutionException: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule > at java.util.concurrent.FutureTask.report(FutureTask.java:122) > at java.util.concurrent.FutureTask.get(FutureTask.java:192) > at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.addReport(JfrRulesReport.java:274) > at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.printReport(JfrRulesReport.java:225) > at org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.main(JfrRulesReport.java:172) > Caused by: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule > at org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:59) > at org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:1) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit$RuleEvaluator.run(RulesToolkit.java:1187) > at java.lang.Thread.run(Thread.java:748) > > > > JSON: > { > "name": "ExceptionThrowingRule", > "error": "java.util.concurrent.ExecutionException: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule\n\tat java.util.concurrent.FutureTask.report(FutureTask.java:122)\n\tat java.util.concurrent.FutureTask.get(FutureTask.java:192)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.addReport(JfrRulesReport.java:274)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.printReport(JfrRulesReport.java:225)\n\tat org.openjdk.jmc.flightrecorder.rules.report.JfrRulesReport.main(JfrRulesReport.java:172)\nCaused by: java.lang.RuntimeException: Throwing Exception from the ExceptionThrowingRule\n\tat org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:59)\n\tat org.openjdk.jmc.flightrecorder.rules.jmc5767.ExceptionThrowingRule$1.call(ExceptionThrowingRule.java:1)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit$RuleEvaluator.run(RulesToolkit.java:1187)\n\tat java.lang.Thread.run(Thread.java:748)\n" > } From marcus.hirt at oracle.com Mon Jun 25 12:04:23 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Mon, 25 Jun 2018 14:04:23 +0200 Subject: Review request for JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules In-Reply-To: <16AA40AD-048F-41C2-876C-15E60226CBBD@kth.se> References: <0A6B8BAA-D7D8-40C2-9D92-B25B8801B3A4@oracle.com> <16AA40AD-048F-41C2-876C-15E60226CBBD@kth.se> Message-ID: Thanks Klara! Found an additional problem when there are no stack traces available. Here is an updated webrev: http://cr.openjdk.java.net/~hirt/JMC-6050/webrev.1/ /M ?On 2018-06-23, 23:01, "Klara Ward" wrote: Could the event availability check be changed to: ?at least one of the two allocation event types should be available, and the other should be enabled?? I did the change to cause this bug in the first place, in an attempt to handle recordings that only had New TLAB events (more common in JDK9+) // Klara > 23 juni 2018 kl. 01:39 skrev Marcus Hirt : > > Please review the fix for two rules throwing exceptions: > JBS: https://bugs.openjdk.java.net/browse/JMC-6050 > Web rev: http://cr.openjdk.java.net/~hirt/JMC-6050/webrev/ > > /M > > From miro.wengner at gmail.com Tue Jun 26 20:09:37 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Tue, 26 Jun 2018 22:09:37 +0200 Subject: [PATCH] JMC-6052 : JSon rule result does not contain Rule ID Message-ID: <0F9620C1-0386-4BBD-91F1-95A94C04E230@gmail.com> Hi All, I?ve fixed the bug JMC-6052. and here is the diff. Kind Regards, Miro PATCH: diff --git a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt @@ -132,6 +132,7 @@ { + "id": "", "name": "", "error": "" "severity": "", "score": , From klara at kth.se Wed Jun 27 07:25:45 2018 From: klara at kth.se (Klara Ward) Date: Wed, 27 Jun 2018 09:25:45 +0200 Subject: Review request for JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules In-Reply-To: References: <0A6B8BAA-D7D8-40C2-9D92-B25B8801B3A4@oracle.com> <16AA40AD-048F-41C2-876C-15E60226CBBD@kth.se> Message-ID: <35de9311-c172-8a12-8ecc-047d13f1755c@kth.se> Shipit! On 2018-06-25 14:04, Marcus Hirt wrote: > Thanks Klara! Found an additional problem when there are no stack traces available. Here is an updated webrev: > http://cr.openjdk.java.net/~hirt/JMC-6050/webrev.1/ > > /M > > ?On 2018-06-23, 23:01, "Klara Ward" wrote: > > Could the event availability check be changed to: > ?at least one of the two allocation event types should be available, and the other should be enabled?? > > I did the change to cause this bug in the first place, in an attempt to handle recordings that only had New TLAB events (more common in JDK9+) > > // Klara > > > 23 juni 2018 kl. 01:39 skrev Marcus Hirt : > > > > Please review the fix for two rules throwing exceptions: > > JBS: https://bugs.openjdk.java.net/browse/JMC-6050 > > Web rev: http://cr.openjdk.java.net/~hirt/JMC-6050/webrev/ > > > > /M > > > > > > > > From marcus.hirt at oracle.com Wed Jun 27 07:45:09 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Wed, 27 Jun 2018 07:45:09 +0000 Subject: hg: jmc/jmc: JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules Message-ID: <201806270745.w5R7j9H9002914@aojmv0008.oracle.com> Changeset: ee529752f619 Author: hirt Date: 2018-06-27 09:44 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/ee529752f619 JMC-6050: Exception evaluating AllocationByClassRule and AllocationByThreadRule rules Reviewed-by: klward Contributed-by: hirt ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/AllocationByClassRule.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/AllocationByThreadRule.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/messages/internal/Messages.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/resources/org/openjdk/jmc/flightrecorder/rules/jdk/messages/internal/messages.properties ! core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java From marcus.hirt at oracle.com Wed Jun 27 07:55:08 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 27 Jun 2018 09:55:08 +0200 Subject: [PATCH] JMC-6052 : JSon rule result does not contain Rule ID In-Reply-To: <0D1FC52B-F5DF-4C6C-B444-DCD78FAD49AF@gmail.com> References: <0D1FC52B-F5DF-4C6C-B444-DCD78FAD49AF@gmail.com> Message-ID: <9FB28BA7-6218-4A0C-990C-233DBE961F26@oracle.com> Hi Miro, Looks fine. I can sponsor this one. Let's wait for your updated OCA (since you changed last name) to come through before bringing it in. /M ?On 2018-06-26, 22:09, "jmc-dev on behalf of Miro Wengner" wrote: Hi All, I?ve fixed the bug JMC-6052. and here is the diff. Kind Regards, Miro PATCH: diff --git a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt @@ -132,6 +132,7 @@ { + "id": "", "name": "", "error": "" "severity": "", "score": , From miro.wengner at gmail.com Wed Jun 27 08:33:39 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Wed, 27 Jun 2018 10:33:39 +0200 Subject: [PATCH] JMC-6052 : JSon rule result does not contain Rule ID In-Reply-To: <9FB28BA7-6218-4A0C-990C-233DBE961F26@oracle.com> References: <0D1FC52B-F5DF-4C6C-B444-DCD78FAD49AF@gmail.com> <9FB28BA7-6218-4A0C-990C-233DBE961F26@oracle.com> Message-ID: ok, dalibor wrote me that it?s in the queue. I?ll inform you /Miro > On Jun 27, 2018, at 9:55 AM, Marcus Hirt wrote: > > Hi Miro, > > Looks fine. I can sponsor this one. Let's wait for your updated OCA (since you changed last name) to come through before bringing it in. > > /M > > ?On 2018-06-26, 22:09, "jmc-dev on behalf of Miro Wengner" wrote: > > Hi All, > I?ve fixed the bug JMC-6052. > and here is the diff. > > Kind Regards, > Miro > > PATCH: > diff --git a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt > --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt > +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt > @@ -132,6 +132,7 @@ > > > { > + "id": "", > "name": "", "error": "" > "severity": "", > "score": , > > > > From guru.hb at oracle.com Thu Jun 28 07:02:28 2018 From: guru.hb at oracle.com (Guru) Date: Thu, 28 Jun 2018 12:32:28 +0530 Subject: Review request: JMC-6057: Update Platform definition to photon Message-ID: Hi Marcus, Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6057 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6057/webrev.0 Thanks, Guru From marcus.hirt at oracle.com Thu Jun 28 12:13:13 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 28 Jun 2018 12:13:13 +0000 Subject: hg: jmc/jmc: JMC-6052: JSon rule result does not contain Rule ID Message-ID: <201806281213.w5SCDE6D019121@aojmv0008.oracle.com> Changeset: 86fedd1e48eb Author: hirt Date: 2018-06-28 14:12 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/86fedd1e48eb JMC-6052: JSon rule result does not contain Rule ID Reviewed-by: hirt Contributed-by: mirage22 ! core/org.openjdk.jmc.flightrecorder.rules/src/main/resources/org/openjdk/jmc/flightrecorder/rules/report/json.xslt