From marcus.hirt at oracle.com Fri May 4 23:04:32 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Sat, 05 May 2018 01:04:32 +0200 Subject: Welcome to the JMC dev list! Message-ID: <91D5F07C-8107-4A8B-B5F3-1032056547D9@oracle.com> Hi all! JDK Mission Control has finally been open sourced! Big thanks to everyone who made this possible (with extra warm thanks going to the Stockholm JMC team and Dalibor Topic)! The repositories are available here: http://hg.openjdk.java.net/jmc * The jmc repo contains the source, which is buildable using Maven. Check the README.txt for details. * The jmc-graphics repo contains artwork and graphics files, like splash screens and icons. We also have a Slack at https://jdkmissioncontrol.slack.com/ for more informal discussions. If you have any questions, don't hesitate to ask! Kind regards, Marcus From klara.ward at oracle.com Mon May 7 09:57:09 2018 From: klara.ward at oracle.com (Klara Ward) Date: Mon, 7 May 2018 11:57:09 +0200 Subject: Review request JMC-6022 - Use hg changeset in version properties Message-ID: <48eec12b-c842-a907-1f57-918fc42a6591@oracle.com> Please review change for JMC-6022 - Use hg changeset in version properties Currently, the changeSet property is set to 0, if the mercurial profile is not activated. Change is to always call the hgchangeset goal, regardless of profile. If/when we create a github mirror, additional logic is required. Diff is attached. Regards, Klara -------------- next part -------------- diff -r 0a79b43a0ab2 pom.xml --- a/pom.xml Thu May 03 15:17:04 2018 +0200 +++ b/pom.xml Mon May 07 11:43:16 2018 +0200 @@ -46,7 +46,6 @@ UTF-8 UTF-8 1.0.0 - 0 ${user.name} @@ -95,31 +94,6 @@ - - mercurial - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.4 - false - - - build.changeid - initialize - - hgchangeset - - - ${rootDir} - - - - - - - @@ -230,6 +204,16 @@ 1.4 + build.changeid + initialize + + hgchangeset + + + ${rootDir} + + + build.date initialize From klara.ward at oracle.com Mon May 7 15:25:02 2018 From: klara.ward at oracle.com (Klara Ward) Date: Mon, 7 May 2018 17:25:02 +0200 Subject: Review request JMC-6022 - Use hg changeset in version properties In-Reply-To: <48eec12b-c842-a907-1f57-918fc42a6591@oracle.com> References: <48eec12b-c842-a907-1f57-918fc42a6591@oracle.com> Message-ID: <51ec5430-826a-d956-dd95-3927954c81fe@oracle.com> New review, more general solution more future proof for github and other SCMs. Stills needs another scm connection configured if not using Hg, for example "scm:git:git://localhost/dummy" Regards, Klara On 2018-05-07 11:57, Klara Ward wrote: > Please review change for JMC-6022 - > Use hg changeset in > version properties > > Currently, the changeSet property is set to 0, if the mercurial > profile is not activated. > Change is to always call the hgchangeset goal, regardless of profile. > If/when we create a github mirror, additional logic is required. > > Diff is attached. > > Regards, > Klara -------------- next part -------------- diff -r 0a79b43a0ab2 application/org.openjdk.jmc.rcp.application/src/main/resources/about.mappings --- a/application/org.openjdk.jmc.rcp.application/src/main/resources/about.mappings Thu May 03 15:17:04 2018 +0200 +++ b/application/org.openjdk.jmc.rcp.application/src/main/resources/about.mappings Mon May 07 17:16:03 2018 +0200 @@ -34,7 +34,7 @@ #version 0=${unqualifiedVersion} #changeid -1=${changeSet} +1=${buildNumber} #date 2=${build.date} #qualifier diff -r 0a79b43a0ab2 application/org.openjdk.jmc.ui.common/src/main/resources/version.properties --- a/application/org.openjdk.jmc.ui.common/src/main/resources/version.properties Thu May 03 15:17:04 2018 +0200 +++ b/application/org.openjdk.jmc.ui.common/src/main/resources/version.properties Mon May 07 17:16:03 2018 +0200 @@ -32,7 +32,7 @@ # jmc.fullversion=${unqualifiedVersion} -jmc.changeid=${changeSet} +jmc.changeid=${buildNumber} jmc.qualifier=${buildQualifier} jmc.date=${build.date} jmc.buildid=${buildId} diff -r 0a79b43a0ab2 pom.xml --- a/pom.xml Thu May 03 15:17:04 2018 +0200 +++ b/pom.xml Mon May 07 17:16:03 2018 +0200 @@ -46,9 +46,12 @@ UTF-8 UTF-8 1.0.0 - 0 ${user.name} + scm:hg:http://hg.openjdk.java.net/jmc/jmc + + ${scmConnection} + photon @@ -95,31 +98,6 @@ - - mercurial - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.4 - false - - - build.changeid - initialize - - hgchangeset - - - ${rootDir} - - - - - - - @@ -230,6 +208,18 @@ 1.4 + initialize + + create + + + false + false + true + no.scm.config.in.pom + + + build.date initialize From patrick at reini.net Tue May 8 21:47:46 2018 From: patrick at reini.net (Patrick Reinhart) Date: Tue, 8 May 2018 23:47:46 +0200 Subject: Slack for non oracle & redhat emails Message-ID: <9410C72E-E384-4D1D-859A-CE79A0468F95@reini.net> Hi there, How can I register for https://jdkmissioncontrol.slack.com/ with a non Oracle or Redhat email address? -Patrick From marcus.hirt at oracle.com Tue May 8 23:40:55 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 9 May 2018 01:40:55 +0200 Subject: Slack for non oracle & redhat emails In-Reply-To: <9410C72E-E384-4D1D-859A-CE79A0468F95@reini.net> References: <9410C72E-E384-4D1D-859A-CE79A0468F95@reini.net> Message-ID: <67117817-895F-49C3-8398-FBE60315E837@oracle.com> I will invite you! :) Kind regards, Marcus > On 8 May 2018, at 23:47, Patrick Reinhart wrote: > > Hi there, > > How can I register for https://jdkmissioncontrol.slack.com/ with a non Oracle or Redhat email address? > > -Patrick From guru.hb at oracle.com Mon May 21 14:57:24 2018 From: guru.hb at oracle.com (Guru) Date: Mon, 21 May 2018 20:27:24 +0530 Subject: Review Request: JMC-6027: JMC 7.0 update platform-definition-photon Message-ID: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6027 Web rev : http://cr.openjdk.java.net/~ghb/JMC-6027/webrev.0/ Solution : Updated the platform definition file for Photon. Thanks, Guru From klara.ward at oracle.com Mon May 21 16:00:15 2018 From: klara.ward at oracle.com (Klara Ward) Date: Mon, 21 May 2018 18:00:15 +0200 Subject: Review Request: JMC-6027: JMC 7.0 update platform-definition-photon In-Reply-To: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> References: <1DF1F739-3DE4-4AF7-A86E-310F46296E22@oracle.com> Message-ID: Works good for me. Ship it! // Klara On 2018-05-21 16:57, Guru wrote: > Please review the fix for > > JBS : https://bugs.openjdk.java.net/browse/JMC-6027 > Web rev : http://cr.openjdk.java.net/~ghb/JMC-6027/webrev.0/ > > > Solution : Updated the platform definition file for Photon. > > Thanks, > Guru From guru.hb at oracle.com Mon May 21 16:10:14 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Mon, 21 May 2018 16:10:14 +0000 Subject: hg: jmc/jmc: JMC-6027: JMC 7.0 update platform-definition-photon Message-ID: <201805211610.w4LGAEik008924@aojmv0008.oracle.com> Changeset: a48697bb329c Author: ghb Date: 2018-05-21 21:39 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/a48697bb329c JMC-6027: JMC 7.0 update platform-definition-photon Reviewed-by: klward ! releng/platform-definitions/platform-definition-photon/platform-definition-photon.target From marcus.hirt at oracle.com Mon May 21 18:57:30 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Mon, 21 May 2018 20:57:30 +0200 Subject: Review Request: JMC-5922: Adding support for JDK9 and later for the chunk splitter. Message-ID: <62372E56-23AA-4CAE-BD6C-D7551FC4E91B@oracle.com> Please review the fix for: JBS: https://bugs.openjdk.java.net/browse/JMC-5922 Web rev: http://cr.openjdk.java.net/~hirt/JMC-5922/webrev.1/ Kind regards, Marcus From erik.gahlin at oracle.com Mon May 21 19:38:06 2018 From: erik.gahlin at oracle.com (Erik Gahlin) Date: Mon, 21 May 2018 21:38:06 +0200 Subject: Review Request: JMC-5922: Adding support for JDK9 and later for the chunk splitter. In-Reply-To: <62372E56-23AA-4CAE-BD6C-D7551FC4E91B@oracle.com> References: <62372E56-23AA-4CAE-BD6C-D7551FC4E91B@oracle.com> Message-ID: <5B03201E.9010403@oracle.com> Looks good. Nits: 135: int index = lastChunkOffset + INTEGER_SIZE; Should not JFR_MAGIC_BYTES.length be used instead of INTEGER_SIZE. Also, there is Integer.BYTES and Short.Bytes that will give the number of bytes for the types. 263: long fullSize = DataInputToolkit.readLong(chunkHeader, HEADER_SIZE - LONG_SIZE); I would define the position of chunk size relative to the start and what comes after the magic. Also, JDK 8 and JDK 9 have different header sizes, so it's a bit unclear what is meant with HEADER_SIZE [1] int CHUNK_SIZE_POSITION = JFR_MAGIC_BYTES.length; DataInputToolkit.readLong(chunkHeader, CHUNK_SIZE_POSITION); CHUNK_SIZE_POSITION could be used instead of INTEGER_SIZE above as well. No need to create new webrev. Erik [1] http://hg.openjdk.java.net/jdk/jdk/file/tip/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ChunkHeader.java > Please review the fix for: > > JBS: https://bugs.openjdk.java.net/browse/JMC-5922 > > Web rev: http://cr.openjdk.java.net/~hirt/JMC-5922/webrev.1/ > > > > Kind regards, > > Marcus > From marcus.hirt at oracle.com Mon May 21 20:27:35 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Mon, 21 May 2018 22:27:35 +0200 Subject: Review Request: JMC-5922: Adding support for JDK9 and later for the chunk splitter. In-Reply-To: <5B03201E.9010403@oracle.com> References: <62372E56-23AA-4CAE-BD6C-D7551FC4E91B@oracle.com> <5B03201E.9010403@oracle.com> Message-ID: I just realized that the byte sizes are also defined in our DataInputToolkit, so will use those instead of redefining them. /M ?On 2018-05-21, 21:38, "jmc-dev on behalf of Erik Gahlin" wrote: Looks good. Nits: 135: int index = lastChunkOffset + INTEGER_SIZE; Should not JFR_MAGIC_BYTES.length be used instead of INTEGER_SIZE. Also, there is Integer.BYTES and Short.Bytes that will give the number of bytes for the types. 263: long fullSize = DataInputToolkit.readLong(chunkHeader, HEADER_SIZE - LONG_SIZE); I would define the position of chunk size relative to the start and what comes after the magic. Also, JDK 8 and JDK 9 have different header sizes, so it's a bit unclear what is meant with HEADER_SIZE [1] int CHUNK_SIZE_POSITION = JFR_MAGIC_BYTES.length; DataInputToolkit.readLong(chunkHeader, CHUNK_SIZE_POSITION); CHUNK_SIZE_POSITION could be used instead of INTEGER_SIZE above as well. No need to create new webrev. Erik [1] http://hg.openjdk.java.net/jdk/jdk/file/tip/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ChunkHeader.java > Please review the fix for: > > JBS: https://bugs.openjdk.java.net/browse/JMC-5922 > > Web rev: http://cr.openjdk.java.net/~hirt/JMC-5922/webrev.1/ > > > > Kind regards, > > Marcus > From marcus.hirt at oracle.com Mon May 21 20:35:40 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Mon, 21 May 2018 20:35:40 +0000 Subject: hg: jmc/jmc: 2 new changesets Message-ID: <201805212035.w4LKZfaq022037@aojmv0008.oracle.com> Changeset: f3c20519e581 Author: hirt Date: 2018-05-21 22:31 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/f3c20519e581 JMC-5922: Making the chunk splitter support JDK 9 and later. Reviewed-by: egahlin,klward Contributed-by: hirt ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/util/ChunkReader.java Changeset: 498909250ee1 Author: hirt Date: 2018-05-21 22:34 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/498909250ee1 JMC-6027: Merging Gurus changes. Contributed-by: ghb From marcus.hirt at oracle.com Tue May 22 13:53:27 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Tue, 22 May 2018 15:53:27 +0200 Subject: Review request JMC-6022 - Use hg changeset in version properties In-Reply-To: <51ec5430-826a-d956-dd95-3927954c81fe@oracle.com> References: <48eec12b-c842-a907-1f57-918fc42a6591@oracle.com> <51ec5430-826a-d956-dd95-3927954c81fe@oracle.com> Message-ID: <0A72CA7E-D434-4397-9262-288CBEBF0650@oracle.com> Looks good. Ship it! /M ?On 2018-05-07, 17:25, "jmc-dev on behalf of Klara Ward" wrote: New review, more general solution more future proof for github and other SCMs. Stills needs another scm connection configured if not using Hg, for example "scm:git:git://localhost/dummy" Regards, Klara On 2018-05-07 11:57, Klara Ward wrote: > Please review change for JMC-6022 - > Use hg changeset in > version properties > > Currently, the changeSet property is set to 0, if the mercurial > profile is not activated. > Change is to always call the hgchangeset goal, regardless of profile. > If/when we create a github mirror, additional logic is required. > > Diff is attached. > > Regards, > Klara From sharath.ballal at oracle.com Fri May 25 07:57:33 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Fri, 25 May 2018 00:57:33 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 Message-ID: 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 erik.gahlin at oracle.com Fri May 25 09:46:05 2018 From: erik.gahlin at oracle.com (Erik Gahlin) Date: Fri, 25 May 2018 11:46:05 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: References: Message-ID: <5B07DB5D.6010505@oracle.com> 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 Sat May 26 12:33:45 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Sat, 26 May 2018 05:33:45 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <5B07DB5D.6010505@oracle.com> References: <5B07DB5D.6010505@oracle.com> Message-ID: <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> 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? (Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11) 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 erik.gahlin at oracle.com Sat May 26 17:56:17 2018 From: erik.gahlin at oracle.com (Erik Gahlin) Date: Sat, 26 May 2018 19:56:17 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> Message-ID: <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> 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 Sat May 26 17:59:36 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Sat, 26 May 2018 10:59:36 -0700 (PDT) Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> References: <5B07DB5D.6010505@oracle.com> <433444d1-5b46-4eef-9edc-6ca51b9d91f3@default> <0D2B397E-E1BC-4A2E-BFB9-78F4095C86AC@oracle.com> Message-ID: 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 Mon May 28 10:03:08 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Mon, 28 May 2018 03:03:08 -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> Message-ID: <8ca47609-826f-46b8-98fa-fabfcaf9c04f@default> 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 erik.gahlin at oracle.com Mon May 28 11:11:57 2018 From: erik.gahlin at oracle.com (Erik Gahlin) Date: Mon, 28 May 2018 13:11:57 +0200 Subject: Review Request: JMC-5893: Commercial features check removed in JDK 11 In-Reply-To: <8ca47609-826f-46b8-98fa-fabfcaf9c04f@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> Message-ID: <5B0BE3FD.1090104@oracle.com> 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 Tue May 29 04:19:11 2018 From: guru.hb at oracle.com (Guru) Date: Tue, 29 May 2018 09:49:11 +0530 Subject: Review Request: JMC-6030: enable product archive and update osx jmc config Message-ID: <329F208F-3E10-498A-B2D1-A09949E0F135@oracle.com> Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6030 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6030/webrev.0/ Thanks, Guru From marcus.hirt at oracle.com Tue May 29 07:58:16 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Tue, 29 May 2018 09:58:16 +0200 Subject: Review Request: JMC-6030: enable product archive and update osx jmc config In-Reply-To: <329F208F-3E10-498A-B2D1-A09949E0F135@oracle.com> References: <329F208F-3E10-498A-B2D1-A09949E0F135@oracle.com> Message-ID: Looks fine! /M > On 29 May 2018, at 06:19, Guru wrote: > > Please review the fix for > > JBS : https://bugs.openjdk.java.net/browse/JMC-6030 > Webrev : http://cr.openjdk.java.net/~ghb/JMC-6030/webrev.0/ > > Thanks, > Guru From guru.hb at oracle.com Tue May 29 08:32:41 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Tue, 29 May 2018 08:32:41 +0000 Subject: hg: jmc/jmc: JMC-6030: enable product archive and update osx jmc config Message-ID: <201805290832.w4T8WgUC014319@aojmv0008.oracle.com> Changeset: b719f18c6232 Author: ghb Date: 2018-05-29 14:02 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/b719f18c6232 JMC-6030: enable product archive and update osx jmc config Reviewed-by: hirt ! application/org.openjdk.jmc.rcp.product/jmc.product ! application/org.openjdk.jmc.rcp.product/pom.xml