From marcus.hirt at datadoghq.com Mon Nov 8 14:29:51 2021 From: marcus.hirt at datadoghq.com (Marcus Hirt) Date: Mon, 8 Nov 2021 15:29:51 +0100 Subject: New jmc Committer: Patrick Reinhart Message-ID: Voting for Patrick Reinhart [1] is now closed. Yes: 5 Veto: 0 Abstain: 0 According to the Bylaws definition of Lazy Consensus, this is sufficient to approve the nomination. Kind regards, Marcus [1] https://mail.openjdk.java.net/pipermail/jmc-dev/2021-October/004101.html From duke at openjdk.java.net Mon Nov 8 19:22:46 2021 From: duke at openjdk.java.net (Michael =?UTF-8?B?U8O8ZGthbXA=?=) Date: Mon, 8 Nov 2021 19:22:46 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v3] In-Reply-To: References: Message-ID: On Fri, 29 Oct 2021 20:50:44 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved >> and constant pools fully resolved to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > add default for existing IParserExtension methods I haven't CPed anything. Look at my commit history - it contains the changes from jpbempel - even if I did it differently than you propsed. But OK, I just spent a another 2hrs to set up a another Eclipse project with jpbempels fork. The usual problems with the setup - I'll had to repeat project importing and platform reloading a lot of times until all dependencies where available. And Maven internal error from Eclipse all the time. It's a pain. I'll continue tests within the next days. ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From jpbempel at openjdk.java.net Tue Nov 9 08:23:38 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Tue, 9 Nov 2021 08:23:38 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v3] In-Reply-To: References: Message-ID: On Fri, 29 Oct 2021 20:50:44 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved >> and constant pools fully resolved to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > add default for existing IParserExtension methods FYI, I am reworking the PR to match better with my needs and the dependencies ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From schaturvedi at openjdk.java.net Tue Nov 9 21:15:05 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Tue, 9 Nov 2021 21:15:05 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v3] In-Reply-To: References: Message-ID: > This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. > > JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). > > 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. > 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. > 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. > > I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. > > There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. > > Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: Enhanced error handling ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/323/files - new: https://git.openjdk.java.net/jmc/pull/323/files/da3b53c5..92c3e071 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=01-02 Stats: 11 lines in 1 file changed: 9 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/323.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/323/head:pull/323 PR: https://git.openjdk.java.net/jmc/pull/323 From schaturvedi at openjdk.java.net Tue Nov 9 21:20:40 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Tue, 9 Nov 2021 21:20:40 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v3] In-Reply-To: References: Message-ID: On Tue, 9 Nov 2021 21:15:05 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Enhanced error handling I have enhanced the error handling for both the flows. I have tested it by creating a new twitter app which is having only read-only access and in preference added that app for my twitter username. When I tried triggering update status and send direct message I am getting below error messages. SendDirectMessageError UpdateStatusError ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From jpbempel at openjdk.java.net Wed Nov 10 07:53:16 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Wed, 10 Nov 2021 07:53:16 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v4] In-Reply-To: References: Message-ID: > Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: > > * track constant pool usage inside events > * replace or translate symbols, method names, etc... like > de-obfuscations of stack traces Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: added new extension methods - getId - eventsLoaded - getItemCollection to expose data gathered and exposed in IParserStats all ConstantPool extensions ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/333/files - new: https://git.openjdk.java.net/jmc/pull/333/files/ff798074..33732c9a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=333&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=333&range=02-03 Stats: 92 lines in 8 files changed: 70 ins; 15 del; 7 mod Patch: https://git.openjdk.java.net/jmc/pull/333.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/333/head:pull/333 PR: https://git.openjdk.java.net/jmc/pull/333 From aptmac at openjdk.java.net Wed Nov 10 16:31:47 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Wed, 10 Nov 2021 16:31:47 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v3] In-Reply-To: References: Message-ID: <0Yc1CMq5aR7bpn5Py1C8JKbyhyI-qiZ6PLoBTjtQwxs=.88fba139-2abd-4f3d-98c7-9f586912a997@github.com> On Tue, 9 Nov 2021 21:15:05 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Enhanced error handling It looks good! I added a couple comments mentioning that it'd be nice to include the error code along with the dialog. Also, there are quite a few strings that could be externalized, it would be nice to pull them into a Messages class application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java line 247: > 245: if (response.statusCode() != 200) { > 246: JOptionPane.showMessageDialog(null, > 247: " Some error occured while updating Twitter status. Please verify your twitter app settings. "); Similar to the string usage below, it'd be nice to include the error code along with this message. application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java line 396: > 394: if (response.statusCode() != 200) { > 395: JOptionPane.showMessageDialog(null, > 396: " Some error occured while sending direct message. Please verify your twitter app settings. "); There are trailing spaces at the beginning and end of this string. It would also be nice to have the error status included with this string, so the user has a better idea of where an issue might have happened if it occurs. The string in the dialog might be something like: "An error occured while __________. Please verify your Twitter app settings. (Error code: XXX)" ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From jpbempel at openjdk.java.net Wed Nov 10 17:19:04 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Wed, 10 Nov 2021 17:19:04 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: > Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: > > * track constant pool usage inside events > * replace or translate symbols, method names, etc... like > de-obfuscations of stack traces Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: formatting ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/333/files - new: https://git.openjdk.java.net/jmc/pull/333/files/33732c9a..47c9b726 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=333&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=333&range=03-04 Stats: 5 lines in 2 files changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jmc/pull/333.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/333/head:pull/333 PR: https://git.openjdk.java.net/jmc/pull/333 From schaturvedi at openjdk.java.net Wed Nov 10 21:35:08 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 10 Nov 2021 21:35:08 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v4] In-Reply-To: References: Message-ID: > This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. > > JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). > > 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. > 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. > 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. > > I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. > > There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. > > Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: Moved all error messages to properties file and added error code ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/323/files - new: https://git.openjdk.java.net/jmc/pull/323/files/92c3e071..c769e32b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=02-03 Stats: 21 lines in 3 files changed: 12 ins; 2 del; 7 mod Patch: https://git.openjdk.java.net/jmc/pull/323.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/323/head:pull/323 PR: https://git.openjdk.java.net/jmc/pull/323 From schaturvedi at openjdk.java.net Wed Nov 10 21:37:43 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 10 Nov 2021 21:37:43 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v3] In-Reply-To: References: Message-ID: <7G393aQUARq9WZdc0YtxjT55Lu6dnkZXXf0YBPsY7jQ=.37586fa6-960c-414b-a0f7-521e6da3b568@github.com> On Tue, 9 Nov 2021 21:15:05 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Enhanced error handling The new error message screen looks like this: NewErrorMessage ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From duke at openjdk.java.net Sat Nov 13 11:10:34 2021 From: duke at openjdk.java.net (Michael =?UTF-8?B?U8O8ZGthbXA=?=) Date: Sat, 13 Nov 2021 11:10:34 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Wed, 10 Nov 2021 17:19:04 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > formatting Back to the tests - this time with the JPs clone and branch "pool-extension". I realized that in my Eclipse setup the ConstantPoolExtensionTest class doesn't get compiled unless I do a - cd core - mvn package on console. That's why I obiously got the ClassNotFoundException previously. I realized that when I finally found the "Show command line" option with the class path. Now I can run the test but have to do "mvn package" always if I want to make changes, which is obviously very clumsy. Sorry that I report more about my Eclipse setup problems here than regarding the PR... Regarding the PR, I have the same test result as last time. I just can't seenany of my own classes in the Parsewr Extension callbacks when I replaced the test JFR file with my own. As I said, I probably didn't got the idea. I would suggest that you provide a test JFR file with a custom class like fr.jpbempel.HelloWorld and demonstrate in the test how to get it. ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From jpbempel at openjdk.java.net Sat Nov 13 21:01:39 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Sat, 13 Nov 2021 21:01:39 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Sat, 13 Nov 2021 11:07:26 GMT, Michael S?dkamp wrote: >> Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: >> >> formatting > > Back to the tests - this time with the JPs clone and branch "pool-extension". I realized that in my Eclipse setup the ConstantPoolExtensionTest class doesn't get compiled unless I do a > - cd core > - mvn package > on console. That's why I obiously got the ClassNotFoundException previously. I realized that when I finally found the "Show command line" option with the class path. > Now I can run the test but have to do "mvn package" always if I want to make changes, which is obviously very clumsy. > Sorry that I report more about my Eclipse setup problems here than regarding the PR... > > Regarding the PR, I have the same test result as last time. I just can't seenany of my own classes in the Parsewr Extension callbacks when I replaced the test JFR file with my own. As I said, I probably didn't got the idea. > > I would suggest that you provide a test JFR file with a custom class like fr.jpbempel.HelloWorld and demonstrate in the test how to get it. hello @docwarems My test is focusing on event Types that referencing constants. when using the callback: Object constantRead(long constantIndex, Object constant, String eventTypeId) { return constant; } you should look at constant argument that should be what you would like to de-obfuscate and return a translated value instead of the original one: Object constantRead(long constantIndex, Object constant, String eventTypeId) { return deobfuscate(constant); } ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From aptmac at openjdk.java.net Mon Nov 15 19:47:43 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 15 Nov 2021 19:47:43 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v4] In-Reply-To: References: Message-ID: On Wed, 10 Nov 2021 21:35:08 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Moved all error messages to properties file and added error code The updated error message looks great, thanks. I've commented on a handful of lines that could also be externalized. application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 122: > 120: return oauth_token; > 121: } catch (Exception e) { > 122: LOGGER.log(Level.SEVERE, "Unable to get request token", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 178: > 176: return accessToken; > 177: } catch (Exception e) { > 178: LOGGER.log(Level.SEVERE, "Unable to authenticate.", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 203: > 201: } catch (URISyntaxException e) { > 202: // Should never happen... > 203: LOGGER.log(Level.SEVERE, "Failed to parse URI", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 226: > 224: > 225: byte[] keyBytes = keyString.getBytes(); > 226: secretKey = new SecretKeySpec(keyBytes, "HmacSHA1"); Perhaps the "HmacSHA1" could be a global variable instead of a quoted string here (as it's used again below)? application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthHeaderGenerator.java line 150: > 148: mac.init(key); > 149: } catch (NoSuchAlgorithmException | InvalidKeyException e) { > 150: LOGGER.log(Level.SEVERE, "Failed to encrypt.", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthHeaderGenerator.java line 168: > 166: encoded = Encode.forUriComponent(value); > 167: } catch (Exception e) { > 168: LOGGER.log(Level.SEVERE, "Failed to encode the URL.", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java line 178: > 176: } catch (URISyntaxException e) { > 177: // Should never happen... > 178: LOGGER.log(Level.SEVERE, "Failed to parse URI", e); This string could be placed in `Messages.java` application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterPlugin.java line 305: > 303: storeAndSavePrefs(); > 304: } else { > 305: DialogToolkit.showError(null, "Invalid User", "The authorized user is invalid."); This string could be placed in `Messages.java` ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From duke at openjdk.java.net Tue Nov 16 09:08:58 2021 From: duke at openjdk.java.net (duke) Date: Tue, 16 Nov 2021 09:08:58 GMT Subject: git: openjdk/jmc: Added tag 8.1.1-ga for changeset 14d2f6ca Message-ID: Tagged by: Marcus Hirt Date: 2021-11-16 10:08:14 +0000 GA source release for JMC 8.1.1 Changeset: 14d2f6ca Author: Marcus Hirt Date: 2021-10-26 08:25:16 +0000 URL: https://git.openjdk.java.net/jmc/commit/14d2f6ca7a404a71c8aa8676cfd301dcab647093 From aptmac at openjdk.java.net Tue Nov 16 19:20:53 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Tue, 16 Nov 2021 19:20:53 GMT Subject: RFR: 7198: add websocket server that pushes data on selection updates [v8] In-Reply-To: References: Message-ID: On Wed, 27 Oct 2021 16:52:31 GMT, Alex Ciminian wrote: > I've updated the Eclipse launchers to include the additional `asm` plugins and now I'm no longer seeing startup errors, everything seems to work fine. I've added a commit with these changes. I think these look good, after fighting with my Eclipse for a bit I was able to verify that the additional plugins here get it working. Having said that, I wonder if the `JMC-Eclipse-JDK-8.launch` should be removed.. the jetty dependencies are having a fit because they require jdk 11, and using certain target platforms it's not even possible to launch JMC with jdk 8 anyways. ------------- PR: https://git.openjdk.java.net/jmc/pull/306 From schaturvedi at openjdk.java.net Wed Nov 17 20:28:25 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 17 Nov 2021 20:28:25 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v5] In-Reply-To: References: Message-ID: > This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. > > JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). > > 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. > 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. > 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. > > I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. > > There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. > > Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: Moved all the hard coded strings to generic Messages ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/323/files - new: https://git.openjdk.java.net/jmc/pull/323/files/c769e32b..a89db1cb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=03-04 Stats: 37 lines in 5 files changed: 22 ins; 0 del; 15 mod Patch: https://git.openjdk.java.net/jmc/pull/323.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/323/head:pull/323 PR: https://git.openjdk.java.net/jmc/pull/323 From aptmac at openjdk.java.net Wed Nov 17 20:47:48 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Wed, 17 Nov 2021 20:47:48 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v5] In-Reply-To: References: Message-ID: On Wed, 17 Nov 2021 20:28:25 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Moved all the hard coded strings to generic Messages Marked as reviewed by aptmac (Committer). ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From hirt at openjdk.java.net Fri Nov 19 18:25:07 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 19 Nov 2021 18:25:07 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Wed, 10 Nov 2021 17:19:04 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > formatting core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/LoaderContext.java line 48: > 46: import org.openjdk.jmc.common.item.IAttribute; > 47: import org.openjdk.jmc.common.item.IItem; > 48: import org.openjdk.jmc.common.unit.ContentType; Not needed, right? ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From hirt at openjdk.java.net Fri Nov 19 18:28:14 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 19 Nov 2021 18:28:14 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Wed, 10 Nov 2021 17:19:04 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > formatting core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/ParserStats.java line 42: > 40: import java.util.List; > 41: import java.util.Map; > 42: import java.util.Set; Using Maps, not Sets - not needed. ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From omikhaltcova at openjdk.java.net Sat Nov 20 01:18:19 2021 From: omikhaltcova at openjdk.java.net (Olga Mikhaltsova) Date: Sat, 20 Nov 2021 01:18:19 GMT Subject: RFR: 7440: JMC fails on Apple M1 Message-ID: I would like to add support for the macOS AArch64 platform to JMC. Please review this change! Our build for macOS AArch64 can be downloaded from here: https://www.azul.com/products/components/zulu-mission-control/#block-download ------------- Commit messages: - 7440: JMC fails on Apple M1 Changes: https://git.openjdk.java.net/jmc/pull/334/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=334&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7440 Stats: 27 lines in 1 file changed: 26 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/334.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/334/head:pull/334 PR: https://git.openjdk.java.net/jmc/pull/334 From hirt at openjdk.java.net Sat Nov 20 13:05:10 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Sat, 20 Nov 2021 13:05:10 GMT Subject: RFR: 7440: JMC fails on Apple M1 In-Reply-To: References: Message-ID: On Sat, 20 Nov 2021 01:14:08 GMT, Olga Mikhaltsova wrote: > I would like to add support for the macOS AArch64 platform to JMC. > Please review this change! > > Our build for macOS AArch64 can be downloaded from here: > https://www.azul.com/products/components/zulu-mission-control/#block-download Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/334 From duke at openjdk.java.net Sat Nov 20 13:11:09 2021 From: duke at openjdk.java.net (Michael =?UTF-8?B?U8O8ZGthbXA=?=) Date: Sat, 20 Nov 2021 13:11:09 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Sat, 13 Nov 2021 20:58:38 GMT, Jean-Philippe Bempel wrote: > My test is focusing on event Types that referencing constants. Yeah, that's more or less what I expected. Maybe I'm unable to find my constant of interest in the mass of other classes. Could you provide a breakpoint condition for the breakpoint condition shown below which would stop at a class "fr.jpbempel.HelloWorld"? ![grafik](https://user-images.githubusercontent.com/29914148/142727338-e7d0e27d-1c21-409e-a543-a4826b45bfbf.png) ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From jpbempel at openjdk.java.net Sun Nov 21 21:45:10 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Sun, 21 Nov 2021 21:45:10 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Sat, 20 Nov 2021 13:08:28 GMT, Michael S?dkamp wrote: >> hello @docwarems >> My test is focusing on event Types that referencing constants. >> >> when using the callback: >> >> Object constantRead(long constantIndex, Object constant, String eventTypeId) { >> return constant; >> } >> >> you should look at constant argument that should be what you would like to de-obfuscate and return a translated value instead of the original one: >> >> >> Object constantRead(long constantIndex, Object constant, String eventTypeId) { >> return deobfuscate(constant); >> } > >> My test is focusing on event Types that referencing constants. > > Yeah, that's more or less what I expected. Maybe I'm unable to find my constant of interest in the mass of other classes. Could you provide a breakpoint condition for the breakpoint condition shown below which would stop at a class "fr.jpbempel.HelloWorld"? > > ![grafik](https://user-images.githubusercontent.com/29914148/142727338-e7d0e27d-1c21-409e-a543-a4826b45bfbf.png) Hey, @docwarems I have created a custom event: package com.bempel.events; import jdk.jfr.Event; import jdk.jfr.Label; import jdk.jfr.Name; @Name("com.bempel.events.MyEvent") @Label("MyEvent") public class MyEvent extends Event { @Label("message") public String message; } I have used like this: MyEvent myEvent = new MyEvent(); myEvent.message = "showVetList " + uuid; myEvent.commit(); I have recording with this event in it: Screenshot 2021-11-21 at 22 31 13 You can look at constant pools : in `java.lang.Class` Screenshot 2021-11-21 at 22 32 25 but also in `jdk.Types.Symbol`: Screenshot 2021-11-21 at 22 32 58 in debugging ConstantPoolExtensionTest: Screenshot 2021-11-21 at 22 34 38 But it's a little bit complex because: a class constant is not having directly the name of the class but reference another symbol constant for that see: https://github.com/openjdk/jmc/blob/master/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/v1/StructTypes.java#L277-L287 That's why it may have more sense to look for the symbol constant instead of directly the class constant. ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From duke at openjdk.java.net Mon Nov 22 20:18:11 2021 From: duke at openjdk.java.net (Michael =?UTF-8?B?U8O8ZGthbXA=?=) Date: Mon, 22 Nov 2021 20:18:11 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Sun, 21 Nov 2021 21:41:34 GMT, Jean-Philippe Bempel wrote: >>> My test is focusing on event Types that referencing constants. >> >> Yeah, that's more or less what I expected. Maybe I'm unable to find my constant of interest in the mass of other classes. Could you provide a breakpoint condition for the breakpoint condition shown below which would stop at a class "fr.jpbempel.HelloWorld"? >> >> ![grafik](https://user-images.githubusercontent.com/29914148/142727338-e7d0e27d-1c21-409e-a543-a4826b45bfbf.png) > > Hey, @docwarems > > I have created a custom event: > > > package com.bempel.events; > > import jdk.jfr.Event; > import jdk.jfr.Label; > import jdk.jfr.Name; > > @Name("com.bempel.events.MyEvent") > @Label("MyEvent") > public class MyEvent extends Event { > @Label("message") > public String message; > } > > > I have used like this: > > MyEvent myEvent = new MyEvent(); > myEvent.message = "showVetList " + uuid; > myEvent.commit(); > > > I have recording with this event in it: > > Screenshot 2021-11-21 at 22 31 13 > > You can look at constant pools : > > in `java.lang.Class` > Screenshot 2021-11-21 at 22 32 25 > > but also in `jdk.Types.Symbol`: > Screenshot 2021-11-21 at 22 32 58 > > > in debugging ConstantPoolExtensionTest: > Screenshot 2021-11-21 at 22 34 38 > > But it's a little bit complex because: > a class constant is not having directly the name of the class but reference another symbol constant for that > see: > https://github.com/openjdk/jmc/blob/master/core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/v1/StructTypes.java#L277-L287 > > That's why it may have more sense to look for the symbol constant instead of directly the class constant. Hello @jpbempel, the breakpoint condition was the breakthrough - I just wasn't able to catch the desired constant before. Even with the simplest HelloWork console program I ended up with a JFR file where I wasn't able to step through all constants in a reasonable time and find my desired constant. Next I should be able to take my deobfuscator remapping code and build a true extension. I'll come back then. Regarding the PR review, I wonder if you want to wait for my further work, or if you prefer to merge. ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From aptmac at openjdk.java.net Mon Nov 22 21:05:26 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 22 Nov 2021 21:05:26 GMT Subject: RFR: 7447: add serializers and writer modules to core test coverage Message-ID: <0ODPS5mpWlEPu3ZbUUElANDl3yuxvcjCfRSu95OvEVc=.fd1bfc83-5b2a-44f4-b5f7-8ebdaebd507c@github.com> This PR addresses JMC-7447 [[0]](https://bugs.openjdk.java.net/browse/JMC-7447), in which the core coverage reports are missing the serializers and writer modules. The changes here simply add the missing modules to the coverage dependency list. Additionally, the jdp.test module is missing the `test` attribute, so I've added it in here. [0] https://bugs.openjdk.java.net/browse/JMC-7447 ------------- Commit messages: - 7447: add serializers and writer modules to core test coverage Changes: https://git.openjdk.java.net/jmc/pull/335/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=335&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7447 Stats: 25 lines in 1 file changed: 23 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/335.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/335/head:pull/335 PR: https://git.openjdk.java.net/jmc/pull/335 From aptmac at openjdk.java.net Mon Nov 22 21:06:57 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 22 Nov 2021 21:06:57 GMT Subject: RFR: 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors [v6] In-Reply-To: References: Message-ID: <60k9D7ZmeN8xynOPgDhnlxocUYtQ9iWzDtEOg_4r3gM=.dd1f0223-e266-42dd-8c44-0ad68f75f876@github.com> > This PR addresses JMC-5904 [[0]](https://bugs.openjdk.java.net/browse/JMC-5904), in which it is noted that org.openjdk.jmc.ui.celleditors could be merged with org.openjdk.jmc.rjmx.ui.celleditors instead of separating the code. > > This is achieved by combining the celleditors code into a new package; org.openjdk.jmc.ui.celleditors. Originally the intent was to throw the jmc.ui.celleditors code into rjmx.ui.celleditors. however this gets complicated because jmc.ui.misc.FilterEditor (which requires CommonCellEditors) gets used in flightrecorder.ui. As a result, moving the celleditors code into rjmx.ui.celleditors would add a dependency on rjmx.ui from flightrecorder.ui, which is not ideal. > > To alleviate this, FilterEditor has been moved to flightrecorder.ui (which is the only place it's used currently anyways), and celleditors have been moved to it's own package so it can be imported by rjmx.ui and jmc.ui (and subsequently flightrecorder.ui) as required. This removes the dependency from rjmx.ui to flightrecorder.ui. > > EDIT (November 19th): below is the original concept for this PR; to merge jmc.ui.celleditors into rjmx.ui.celleditors. However, this creates a situation where rjmx.ui becomes a dependency of flightrecorder.ui, which is not ideal. For reference, I'll leave the original PR body below. > > For the most part this is a fairly straightforward migration of code. There are three classes in jmc.ui.celleditors that needed to be moved into rjmx.ui.celleditors: > 1. ClearableTextCellEditor > 2. CommonCellEditors > 3. NullableTextCellEditor > > Once these files are moved there is a slight problem: org.openjdk.jmc.ui.misc.FilterEditor uses CommonCellEditors, and org.openjdk.jmc.rjmx.ui requires org.openjdk.jmc.ui. In this case, adding a dependency from org.openjdk.jmc.rjmx.ui.celleditors.CommonCellEditors to org.openjdk.jmc.ui.misc.FilterEditors would introduce a circular dependency. > > The solution I've gone with here is to move FilterEditor to org.openjdk.jmc.flightrecorder.ui, which IMO makes sense anyways because it's closer to the code it gets consumed by. FilterEditor is used in: > - _org.openjdk.jmc.flightrecorder.ui_.common.DataPageToolkit > - _org.openjdk.jmc.flightrecorder.ui_.common.FilterComponent > - _org.openjdk.jmc.flightrecorder.ui_.common.LaneEditor > - _org.openjdk.jmc.flightrecorder.ui_.pages.ItemHandlerPage > > **Note:** this issue was originally targeted for 8.1.0, but isn't really critical (it's a P4 task), so if desired we can hold off on integrating it now and keep this around for integration into 8.2.0 as discussed in the jmc bi-weekly calls > > [0] https://bugs.openjdk.java.net/browse/JMC-5904 Alex Macdonald has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - move celleditors to org.openjdk.jmc.ui.celleditors This commit moves the celleditors code into it's own package: org.openjdk.jmc.ui.celleditors. This removes the dependency on rjmx.ui for flightrecorder.ui. Now, both rjmx.ui and flightrecorder.ui import org.openjdk.jmc.ui.celleditors. The l10n packages have also been updated with their respective strings. - update license headers - 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/271/files - new: https://git.openjdk.java.net/jmc/pull/271/files/347873cb..a510e72d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=271&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=271&range=04-05 Stats: 556 lines in 80 files changed: 376 ins; 43 del; 137 mod Patch: https://git.openjdk.java.net/jmc/pull/271.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/271/head:pull/271 PR: https://git.openjdk.java.net/jmc/pull/271 From aptmac at openjdk.java.net Mon Nov 22 21:09:30 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 22 Nov 2021 21:09:30 GMT Subject: RFR: 7446: add Maven profile for enabling test coverage Message-ID: <9gf7itOF5K_DD5Vp3CaF8olU1Y-jgNp15_EvRIk7tgc=.a33725cd-a9fa-4e03-91f3-5f1cc9c96db8@github.com> This PR addresses JMC-7446 [[0]](https://bugs.openjdk.java.net/browse/JMC-7446), in which it would be nice to have a Maven profile for enabling test coverage. At the moment, test coverage is enabled by default with no way of disabling it. This PR adds a Maven profile (in a similar vein to how uitests are run) that allows coverage reports to be enabled or disabled as desired. This profile is included in both the core and application poms. Usage: `mvn clean install -P coverage`, or `mvn clean verify -P coverage -P uitests`, etc. [0] https://bugs.openjdk.java.net/browse/JMC-7446 ------------- Commit messages: - 7446: add Maven profile for enabling test coverage Changes: https://git.openjdk.java.net/jmc/pull/336/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=336&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7446 Stats: 218 lines in 7 files changed: 129 ins; 78 del; 11 mod Patch: https://git.openjdk.java.net/jmc/pull/336.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/336/head:pull/336 PR: https://git.openjdk.java.net/jmc/pull/336 From aptmac at openjdk.java.net Mon Nov 22 21:09:42 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 22 Nov 2021 21:09:42 GMT Subject: RFR: 7307: Move org.openjdk.jmc.flightrecorder.configuration bundle from application to core [v3] In-Reply-To: References: Message-ID: > This PR addresses JMC-7307 [[0]](https://bugs.openjdk.java.net/browse/JMC-7307), in which it would be helpful to have `flightrecorder.configuration` distributed in jmc core. > > `flightrecorder.configuration` itself is a pretty straightforward movement of code, as it doesn't have any dependencies. Having said that, there are some flightrecorder-configuration-related classes in `controlpanel.ui` which would be nice to have in core as well, and would probably do well in `flightrecorder.configuration`. This includes VolatileStorageDelegate, and the 12 classes in `configuration.model.xml`. The `controlpanel.ui.configuration` unit tests can also come over to core, because they only tested the model xml code anyways. > > So in total, we're looking at `flightrecorder.configuration` and the former `controlpanel.ui.configuration` test coming over to core, and the following classes: > - org.openjdk.jmc.flightrecorder.configuration.model.VolatileStorageDelegate > - org.openjdk.jmc.flightrecorder.configuration.model.xml.IXMLValidator > - org.openjdk.jmc.flightrecorder.configuration.model.xml.JFCGrammar > - org.openjdk.jmc.flightrecorder.configuration.model.xml.JFCXMLValidator > - org.openjdk.jmc.flightrecorder.configuration.model.xml.PrettyPrinter > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLAttribute > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLAttributeInstance > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLModel > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLNode > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLNodeType > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLTag > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLTagInstance > - org.openjdk.jmc.flightrecorder.configuration.model.xml.XMLValidationResult > > [0] https://bugs.openjdk.java.net/browse/JMC-7307 Alex Macdonald has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - fix package name in JFCXMLValidator logger - re-order flightrecorder.configuration.test in test pom - update license headers - migrate VolatileStorageDelegate to flightrecorder.configuration.model - revert .classpath files to their original from application - minor cleanup - move configuration.model.xml test from application to core; remove controlpanel.ui.configuration.test The controlpanel.ui.configuration only had the XML test, which is now located in flightrecorder.configuration.test in core. Currently all tests in both core and application will pass. - move flightrecorder.configuration coverage from application to core - temporarily silence test modules that are moved, will cleanup after - migrate controlpanel.ui.configuration.model.xml to core - ... and 1 more: https://git.openjdk.java.net/jmc/compare/77580fe1...6dd54405 ------------- Changes: https://git.openjdk.java.net/jmc/pull/299/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=299&range=02 Stats: 1003 lines in 99 files changed: 373 ins; 475 del; 155 mod Patch: https://git.openjdk.java.net/jmc/pull/299.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/299/head:pull/299 PR: https://git.openjdk.java.net/jmc/pull/299 From jpbempel at openjdk.java.net Mon Nov 22 21:23:10 2021 From: jpbempel at openjdk.java.net (Jean-Philippe Bempel) Date: Mon, 22 Nov 2021 21:23:10 GMT Subject: RFR: 7439: Introduced IConstantPoolExtension for Constant Pools [v5] In-Reply-To: References: Message-ID: On Wed, 10 Nov 2021 17:19:04 GMT, Jean-Philippe Bempel wrote: >> Add extension methods when constants are read, referenced, resolved, constant pools fully resolved and parsing finished to be able for example: >> >> * track constant pool usage inside events >> * replace or translate symbols, method names, etc... like >> de-obfuscations of stack traces > > Jean-Philippe Bempel has updated the pull request incrementally with one additional commit since the last revision: > > formatting It would be nice to have your feedback on this, because I came back a lot on the design to implement my needs. So depending on yours, we may revisit some parts... ------------- PR: https://git.openjdk.java.net/jmc/pull/333 From hirt at openjdk.java.net Wed Nov 24 15:41:11 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 24 Nov 2021 15:41:11 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v5] In-Reply-To: References: Message-ID: On Wed, 17 Nov 2021 20:28:25 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Moved all the hard coded strings to generic Messages Since we are removing the dependency on Twitter4J, we should also remove it from https://github.com/openjdk/jmc/blob/master/license/THIRDPARTYREADME.txt#L265. ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From schaturvedi at openjdk.java.net Wed Nov 24 17:48:37 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 24 Nov 2021 17:48:37 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v6] In-Reply-To: References: Message-ID: <-1KfczXQpwy2ehm97NMqiZBGbxYPRnWGN6KRzsyuZyo=.f269baed-36ce-46b2-be2f-bc2e42f47188@github.com> > This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. > > JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). > > 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. > 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. > 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. > > I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. > > There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. > > Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: Removed third party dependency of Twitter4J from license file ------------- Changes: - all: https://git.openjdk.java.net/jmc/pull/323/files - new: https://git.openjdk.java.net/jmc/pull/323/files/a89db1cb..33fb63dd Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=323&range=04-05 Stats: 181 lines in 1 file changed: 0 ins; 181 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/323.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/323/head:pull/323 PR: https://git.openjdk.java.net/jmc/pull/323 From hirt at openjdk.java.net Wed Nov 24 18:08:12 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 24 Nov 2021 18:08:12 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v5] In-Reply-To: References: Message-ID: <13zsRU-VTcgjb-ryeMVtoKBzN1Nx0MvJzw7Nz273ycQ=.3eecdf60-878a-42bd-ae8e-472259ab4a99@github.com> On Wed, 17 Nov 2021 20:28:25 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Moved all the hard coded strings to generic Messages Changes requested by hirt (Lead). application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 60: > 58: import org.openjdk.jmc.rjmx.triggers.actions.internal.Messages; > 59: > 60: class TwitterOAuthAunthenticator { Should be TwitterOAuthAuthenticator. application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 72: > 70: final static Logger LOGGER = Logger.getLogger("TwitterOAuthAunthenticator"); > 71: > 72: TwitterOAuthAunthenticator() { Unless you explicitly want this to be package private, I'd just remove and fall back to the default constructor. application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 217: > 215: addr = null; > 216: } > 217: HttpClient httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2) I'd inline the httpClient - don't declare the variable. ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From omikhaltcova at openjdk.java.net Wed Nov 24 18:38:07 2021 From: omikhaltcova at openjdk.java.net (Olga Mikhaltsova) Date: Wed, 24 Nov 2021 18:38:07 GMT Subject: Integrated: 7440: JMC fails on Apple M1 In-Reply-To: References: Message-ID: On Sat, 20 Nov 2021 01:14:08 GMT, Olga Mikhaltsova wrote: > I would like to add support for the macOS AArch64 platform to JMC. > Please review this change! > > Our build for macOS AArch64 can be downloaded from here: > https://www.azul.com/products/components/zulu-mission-control/#block-download This pull request has now been integrated. Changeset: d218205f Author: Olga Mikhaltsova Committer: Marcus Hirt URL: https://git.openjdk.java.net/jmc/commit/d218205fd4113daea82de1b813d5ef1ed740983d Stats: 27 lines in 1 file changed: 26 ins; 0 del; 1 mod 7440: JMC fails on Apple M1 Reviewed-by: hirt ------------- PR: https://git.openjdk.java.net/jmc/pull/334 From hirt at openjdk.java.net Wed Nov 24 18:49:06 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 24 Nov 2021 18:49:06 GMT Subject: RFR: 7432: Update the spotbugs maven plugin [v3] In-Reply-To: <5WhBBvRJ2eoylwz-MY2tjFK_G3bTlC-J9fRq3QSrFJ0=.b4874f12-5043-414c-8e52-8b4c28c6917e@github.com> References: <5WhBBvRJ2eoylwz-MY2tjFK_G3bTlC-J9fRq3QSrFJ0=.b4874f12-5043-414c-8e52-8b4c28c6917e@github.com> Message-ID: On Wed, 27 Oct 2021 19:23:35 GMT, Patrick Reinhart wrote: >> Signed-off-by: Patrick Reinhart > > Patrick Reinhart has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Temporary disable certain tests > - 7432: Update the spotbugs maven plugin > > Signed-off-by: Patrick Reinhart Have you hade time to take a look at the failing tests yet? ------------- PR: https://git.openjdk.java.net/jmc/pull/324 From schaturvedi at openjdk.java.net Wed Nov 24 19:00:10 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 24 Nov 2021 19:00:10 GMT Subject: RFR: 7231: JMC createReport for JMC8 Automated Analysis fails to evaluate several rules In-Reply-To: <7A74lcRU7j2A9qas1BwWturLRNFuLIcUs5fAhv5IoTY=.8e9f35d2-07ec-4347-b5ee-c2c9a2926cce@github.com> References: <7A74lcRU7j2A9qas1BwWturLRNFuLIcUs5fAhv5IoTY=.8e9f35d2-07ec-4347-b5ee-c2c9a2926cce@github.com> Message-ID: On Mon, 9 Aug 2021 23:15:26 GMT, Suchita Chaturvedi wrote: > This PR addresses the NullPointerException issue in core module for the following rules: > > 1. GCs Caused by System.gc() > 2. GCs Caused by Heap Inspection > 3. GC Stall > 4. String Deduplication > 5. GCs Caused by GC Locker Already fixed as part of another PR. ------------- PR: https://git.openjdk.java.net/jmc/pull/302 From schaturvedi at openjdk.java.net Wed Nov 24 19:00:10 2021 From: schaturvedi at openjdk.java.net (Suchita Chaturvedi) Date: Wed, 24 Nov 2021 19:00:10 GMT Subject: Withdrawn: 7231: JMC createReport for JMC8 Automated Analysis fails to evaluate several rules In-Reply-To: <7A74lcRU7j2A9qas1BwWturLRNFuLIcUs5fAhv5IoTY=.8e9f35d2-07ec-4347-b5ee-c2c9a2926cce@github.com> References: <7A74lcRU7j2A9qas1BwWturLRNFuLIcUs5fAhv5IoTY=.8e9f35d2-07ec-4347-b5ee-c2c9a2926cce@github.com> Message-ID: On Mon, 9 Aug 2021 23:15:26 GMT, Suchita Chaturvedi wrote: > This PR addresses the NullPointerException issue in core module for the following rules: > > 1. GCs Caused by System.gc() > 2. GCs Caused by Heap Inspection > 3. GC Stall > 4. String Deduplication > 5. GCs Caused by GC Locker This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jmc/pull/302 From hirt at openjdk.java.net Wed Nov 24 19:01:12 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 24 Nov 2021 19:01:12 GMT Subject: RFR: 7247: Alternate for Twitter4J to support twitter plug-in [v6] In-Reply-To: <-1KfczXQpwy2ehm97NMqiZBGbxYPRnWGN6KRzsyuZyo=.f269baed-36ce-46b2-be2f-bc2e42f47188@github.com> References: <-1KfczXQpwy2ehm97NMqiZBGbxYPRnWGN6KRzsyuZyo=.f269baed-36ce-46b2-be2f-bc2e42f47188@github.com> Message-ID: On Wed, 24 Nov 2021 17:48:37 GMT, Suchita Chaturvedi wrote: >> This PR addresses the issue of using Twitter4J as third party library for JMC, which is not actively maintained by the owner of Twitter4J. The last release was 3 years back. We have tried contacting the owner for the next release dates but couldn't get a proper response. Hence, we would need to remove the dependency from JMC because we should not use any dependency which is not well maintained. >> >> JMC Console gives the functionality of setting up triggers for particular conditions which can be set in configuration. Twitter is used as one of the trigger methods to notify users (or tweeters in case of Twitter). I have removed the Twitter4J dependency completely and using all the twitter related APIs directly. There are mainly three parts of this PR (functionality for which Twitter4J was used). >> >> 1. Authentication : The authentication of twitter users i.e. tweeters are done as part of preference settings. Twitter follows 3-legged OAuth authentication process for authenticating any user. So there are 3 steps which I have implemented in order to authenticate any user and save his details in preferences. Once the tweeter is verified the JMC application will use his details for verification before any action is triggered for that user. In order to use any user name we need to authorize his/her credentials in JMC preference. >> 2. Send Direct Message : A verified user (tweeter) can send a direct message to another user (tweeter). The first user should be verified user i.e. it should be one of the users listed in preference. The second user need not be a part of authorized users list but before sending any message we are checking whether the user exists or not. >> 3. Update Status : A JMC user can update the status of any verified user (tweeter) on Twitter which can be seen on twitter wall of that user. >> >> I have used http classes of JDK 11 for making REST API calls, so this plugin will be dependent on JDK 11. >> >> There is a scope of using a JSON library to make the code better but as of now I haven't used any third party library for this implementation may be we can modify the code in future if we have some JSON library dependency in future. >> >> Please review the same and let me know your valuable comments (if any). Also, feel free to ping me if you want to test it and stuck somewhere. I can help with the steps to test it. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Removed third party dependency of Twitter4J from license file Changes requested by hirt (Lead). application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthAunthenticator.java line 234: > 232: mac.init(secretKey); > 233: > 234: byte[] text = baseString.getBytes(); I'd probably inline the text local variable, since it's only used once. application/org.openjdk.jmc.console.twitter/src/main/java/org/openjdk/jmc/console/twitter/TwitterOAuthHeaderGenerator.java line 188: > 186: Random random = new Random(); > 187: > 188: String generatedString = random.ints(leftLimit, rightLimit + 1) I'd inline generatedString. ------------- PR: https://git.openjdk.java.net/jmc/pull/323 From hdafgard at openjdk.java.net Wed Nov 24 19:06:10 2021 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 24 Nov 2021 19:06:10 GMT Subject: RFR: 7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule. [v2] In-Reply-To: <8MN9KvyumUkhdcxel1wQHcDioJF3WNyuPqWHxjLgkeA=.f38fc47e-2e64-45cd-adfd-22bcadef6b71@github.com> References: <8MN9KvyumUkhdcxel1wQHcDioJF3WNyuPqWHxjLgkeA=.f38fc47e-2e64-45cd-adfd-22bcadef6b71@github.com> Message-ID: On Tue, 27 Jul 2021 14:37:52 GMT, Suchita Chaturvedi wrote: >> This PR addresses the optimization of Class Leak Rule. >> >> Please refer the JBS for the sample JFR which was taking ~90 minutes to generate results for Class Leak Rule. After the optimization time is reduced to ~10-15 minutes. >> >> Please review the change and let me the know if there are any comments / suggestions. > > Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: > > Calculation maximum timeout is set via preference and hardcoding removed. I also agree with Brice's suggestions for changes. core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/general/ClassLeakingRule.java line 159: > 157: IItemCollection items, IPreferenceValueProvider valueProvider, IResultValueProvider dependencyResults) { > 158: int warningLimit = (int) valueProvider.getPreferenceValue(WARNING_LIMIT).longValue(); > 159: CONFIGURED_TIMEOUT = (int) valueProvider.getPreferenceValue(MAX_TIMEOUT).longValue(); This adds state to a rule and is going to cause issues if you're evaluating rules in parallel with different timeout configurations. Any such field must be final instead. core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/util/DefaultIItemResultSet.java line 83: > 81: private void calculateData(IItemCollection input) throws InterruptedException { > 82: input = input.apply(query.getFilter()); > 83: final IItemCollection newInput = input; Can't this be done in the calling function instead of here? This should also be where the timeout is passed into this method instead of as a public static variable. core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/util/DefaultIItemResultSet.java line 135: > 133: } > 134: // Timeout can be configured in prefrences (default value is set to 5 minutes) > 135: exec.awaitTermination(ClassLeakingRule.CONFIGURED_TIMEOUT, TimeUnit.MINUTES); This means that the generic DefaultIItemResultSet class has an explicit dependency on the configuration of one rule, much better to add a timeout parameter at the creation of the instance. ------------- Changes requested by hdafgard (Reviewer). PR: https://git.openjdk.java.net/jmc/pull/248 From hdafgard at openjdk.java.net Wed Nov 24 19:06:11 2021 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 24 Nov 2021 19:06:11 GMT Subject: RFR: 7248: JMC7/8 Automated Analysis taking very long time to produce results for Class Leak Rule. [v2] In-Reply-To: References: Message-ID: On Mon, 17 May 2021 15:44:26 GMT, Brice Dutheil wrote: >> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision: >> >> Calculation maximum timeout is set via preference and hardcoding removed. > > core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/util/DefaultIItemResultSet.java line 76: > >> 74: } catch (Exception e) { >> 75: e.printStackTrace(); >> 76: } > > Don't swallow the interrupted exception, if this happens, this mean the code calling awaitTermination has been interrupted, the code should make sure the current thread is interrupted. This should really be logged properly rather than just printing the exception, and it definitely shouldn't catch all exceptions. ------------- PR: https://git.openjdk.java.net/jmc/pull/248 From hirt at openjdk.java.net Thu Nov 25 09:57:07 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 09:57:07 GMT Subject: RFR: 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors [v6] In-Reply-To: <60k9D7ZmeN8xynOPgDhnlxocUYtQ9iWzDtEOg_4r3gM=.dd1f0223-e266-42dd-8c44-0ad68f75f876@github.com> References: <60k9D7ZmeN8xynOPgDhnlxocUYtQ9iWzDtEOg_4r3gM=.dd1f0223-e266-42dd-8c44-0ad68f75f876@github.com> Message-ID: On Mon, 22 Nov 2021 21:06:57 GMT, Alex Macdonald wrote: >> This PR addresses JMC-5904 [[0]](https://bugs.openjdk.java.net/browse/JMC-5904), in which it is noted that org.openjdk.jmc.ui.celleditors could be merged with org.openjdk.jmc.rjmx.ui.celleditors instead of separating the code. >> >> This is achieved by combining the celleditors code into a new package; org.openjdk.jmc.ui.celleditors. Originally the intent was to throw the jmc.ui.celleditors code into rjmx.ui.celleditors. however this gets complicated because jmc.ui.misc.FilterEditor (which requires CommonCellEditors) gets used in flightrecorder.ui. As a result, moving the celleditors code into rjmx.ui.celleditors would add a dependency on rjmx.ui from flightrecorder.ui, which is not ideal. >> >> To alleviate this, FilterEditor has been moved to flightrecorder.ui (which is the only place it's used currently anyways), and celleditors have been moved to it's own package so it can be imported by rjmx.ui and jmc.ui (and subsequently flightrecorder.ui) as required. This removes the dependency from rjmx.ui to flightrecorder.ui. >> >> EDIT (November 19th): below is the original concept for this PR; to merge jmc.ui.celleditors into rjmx.ui.celleditors. However, this creates a situation where rjmx.ui becomes a dependency of flightrecorder.ui, which is not ideal. For reference, I'll leave the original PR body below. >> >> For the most part this is a fairly straightforward migration of code. There are three classes in jmc.ui.celleditors that needed to be moved into rjmx.ui.celleditors: >> 1. ClearableTextCellEditor >> 2. CommonCellEditors >> 3. NullableTextCellEditor >> >> Once these files are moved there is a slight problem: org.openjdk.jmc.ui.misc.FilterEditor uses CommonCellEditors, and org.openjdk.jmc.rjmx.ui requires org.openjdk.jmc.ui. In this case, adding a dependency from org.openjdk.jmc.rjmx.ui.celleditors.CommonCellEditors to org.openjdk.jmc.ui.misc.FilterEditors would introduce a circular dependency. >> >> The solution I've gone with here is to move FilterEditor to org.openjdk.jmc.flightrecorder.ui, which IMO makes sense anyways because it's closer to the code it gets consumed by. FilterEditor is used in: >> - _org.openjdk.jmc.flightrecorder.ui_.common.DataPageToolkit >> - _org.openjdk.jmc.flightrecorder.ui_.common.FilterComponent >> - _org.openjdk.jmc.flightrecorder.ui_.common.LaneEditor >> - _org.openjdk.jmc.flightrecorder.ui_.pages.ItemHandlerPage >> >> **Note:** this issue was originally targeted for 8.1.0, but isn't really critical (it's a P4 task), so if desired we can hold off on integrating it now and keep this around for integration into 8.2.0 as discussed in the jmc bi-weekly calls >> >> [0] https://bugs.openjdk.java.net/browse/JMC-5904 > > Alex Macdonald has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - move celleditors to org.openjdk.jmc.ui.celleditors > > This commit moves the celleditors code into it's own package: org.openjdk.jmc.ui.celleditors. This removes the dependency on rjmx.ui for flightrecorder.ui. Now, both rjmx.ui and flightrecorder.ui import org.openjdk.jmc.ui.celleditors. The l10n packages have also been updated with their respective strings. > - update license headers > - 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/271 From hirt at openjdk.java.net Thu Nov 25 14:27:22 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 14:27:22 GMT Subject: [jmc-graphics] RFR: 7453: Add heat map icon Message-ID: For cimi's heat map view. ------------- Commit messages: - 7453: Add heat map icon Changes: https://git.openjdk.java.net/jmc-graphics/pull/7/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc-graphics&pr=7&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7453 Stats: 0 lines in 3 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc-graphics/pull/7.diff Fetch: git fetch https://git.openjdk.java.net/jmc-graphics pull/7/head:pull/7 PR: https://git.openjdk.java.net/jmc-graphics/pull/7 From aptmac at openjdk.java.net Thu Nov 25 19:03:07 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 25 Nov 2021 19:03:07 GMT Subject: Integrated: 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors In-Reply-To: References: Message-ID: On Tue, 29 Jun 2021 16:52:20 GMT, Alex Macdonald wrote: > This PR addresses JMC-5904 [[0]](https://bugs.openjdk.java.net/browse/JMC-5904), in which it is noted that org.openjdk.jmc.ui.celleditors could be merged with org.openjdk.jmc.rjmx.ui.celleditors instead of separating the code. > > This is achieved by combining the celleditors code into a new package; org.openjdk.jmc.ui.celleditors. Originally the intent was to throw the jmc.ui.celleditors code into rjmx.ui.celleditors. however this gets complicated because jmc.ui.misc.FilterEditor (which requires CommonCellEditors) gets used in flightrecorder.ui. As a result, moving the celleditors code into rjmx.ui.celleditors would add a dependency on rjmx.ui from flightrecorder.ui, which is not ideal. > > To alleviate this, FilterEditor has been moved to flightrecorder.ui (which is the only place it's used currently anyways), and celleditors have been moved to it's own package so it can be imported by rjmx.ui and jmc.ui (and subsequently flightrecorder.ui) as required. This removes the dependency from rjmx.ui to flightrecorder.ui. > > EDIT (November 19th): below is the original concept for this PR; to merge jmc.ui.celleditors into rjmx.ui.celleditors. However, this creates a situation where rjmx.ui becomes a dependency of flightrecorder.ui, which is not ideal. For reference, I'll leave the original PR body below. > > For the most part this is a fairly straightforward migration of code. There are three classes in jmc.ui.celleditors that needed to be moved into rjmx.ui.celleditors: > 1. ClearableTextCellEditor > 2. CommonCellEditors > 3. NullableTextCellEditor > > Once these files are moved there is a slight problem: org.openjdk.jmc.ui.misc.FilterEditor uses CommonCellEditors, and org.openjdk.jmc.rjmx.ui requires org.openjdk.jmc.ui. In this case, adding a dependency from org.openjdk.jmc.rjmx.ui.celleditors.CommonCellEditors to org.openjdk.jmc.ui.misc.FilterEditors would introduce a circular dependency. > > The solution I've gone with here is to move FilterEditor to org.openjdk.jmc.flightrecorder.ui, which IMO makes sense anyways because it's closer to the code it gets consumed by. FilterEditor is used in: > - _org.openjdk.jmc.flightrecorder.ui_.common.DataPageToolkit > - _org.openjdk.jmc.flightrecorder.ui_.common.FilterComponent > - _org.openjdk.jmc.flightrecorder.ui_.common.LaneEditor > - _org.openjdk.jmc.flightrecorder.ui_.pages.ItemHandlerPage > > **Note:** this issue was originally targeted for 8.1.0, but isn't really critical (it's a P4 task), so if desired we can hold off on integrating it now and keep this around for integration into 8.2.0 as discussed in the jmc bi-weekly calls > > [0] https://bugs.openjdk.java.net/browse/JMC-5904 This pull request has now been integrated. Changeset: 24f4cb0e Author: Alex Macdonald URL: https://git.openjdk.java.net/jmc/commit/24f4cb0e5cbf862c51aa6eca40a24ae4312406a4 Stats: 776 lines in 67 files changed: 293 ins; 394 del; 89 mod 5904: Merge org.openjdk.jmc.ui.celleditors with org.openjdk.jmc.rjmx.ui.celleditors Reviewed-by: hirt ------------- PR: https://git.openjdk.java.net/jmc/pull/271 From aptmac at openjdk.java.net Thu Nov 25 19:04:03 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 25 Nov 2021 19:04:03 GMT Subject: [jmc-graphics] RFR: 7453: Add heat map icon In-Reply-To: References: Message-ID: <_SG_TyCJKRURuu68-z3Zrca3XlFdel9ysaKUlQSiA6Q=.b846dae1-9a7f-48c5-b6dc-5a77bef22886@github.com> On Thu, 25 Nov 2021 14:21:55 GMT, Marcus Hirt wrote: > For cimi's heat map view. Marked as reviewed by aptmac (Committer). ------------- PR: https://git.openjdk.java.net/jmc-graphics/pull/7 From hirt at openjdk.java.net Thu Nov 25 19:07:11 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 19:07:11 GMT Subject: [jmc-graphics] Integrated: 7453: Add heat map icon In-Reply-To: References: Message-ID: On Thu, 25 Nov 2021 14:21:55 GMT, Marcus Hirt wrote: > For cimi's heat map view. This pull request has now been integrated. Changeset: bd34acb1 Author: Marcus Hirt URL: https://git.openjdk.java.net/jmc-graphics/commit/bd34acb1eef1ec74409c02b3950dfe69aa79376f Stats: 0 lines in 3 files changed: 0 ins; 0 del; 0 mod 7453: Add heat map icon Reviewed-by: aptmac ------------- PR: https://git.openjdk.java.net/jmc-graphics/pull/7 From hirt at openjdk.java.net Thu Nov 25 19:30:06 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 19:30:06 GMT Subject: RFR: 7446: Add Maven profile for enabling test coverage In-Reply-To: <9gf7itOF5K_DD5Vp3CaF8olU1Y-jgNp15_EvRIk7tgc=.a33725cd-a9fa-4e03-91f3-5f1cc9c96db8@github.com> References: <9gf7itOF5K_DD5Vp3CaF8olU1Y-jgNp15_EvRIk7tgc=.a33725cd-a9fa-4e03-91f3-5f1cc9c96db8@github.com> Message-ID: On Mon, 22 Nov 2021 21:03:13 GMT, Alex Macdonald wrote: > This PR addresses JMC-7446 [[0]](https://bugs.openjdk.java.net/browse/JMC-7446), in which it would be nice to have a Maven profile for enabling test coverage. > > At the moment, test coverage is enabled by default with no way of disabling it. This PR adds a Maven profile (in a similar vein to how uitests are run) that allows coverage reports to be enabled or disabled as desired. This profile is included in both the core and application poms. > > Usage: `mvn clean install -P coverage`, or `mvn clean verify -P coverage -P uitests`, etc. > > [0] https://bugs.openjdk.java.net/browse/JMC-7446 Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/336 From hirt at openjdk.java.net Thu Nov 25 19:31:09 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 19:31:09 GMT Subject: RFR: 7447: Add serializers and writer modules to core test coverage In-Reply-To: <0ODPS5mpWlEPu3ZbUUElANDl3yuxvcjCfRSu95OvEVc=.fd1bfc83-5b2a-44f4-b5f7-8ebdaebd507c@github.com> References: <0ODPS5mpWlEPu3ZbUUElANDl3yuxvcjCfRSu95OvEVc=.fd1bfc83-5b2a-44f4-b5f7-8ebdaebd507c@github.com> Message-ID: On Mon, 22 Nov 2021 21:00:46 GMT, Alex Macdonald wrote: > This PR addresses JMC-7447 [[0]](https://bugs.openjdk.java.net/browse/JMC-7447), in which the core coverage reports are missing the serializers and writer modules. The changes here simply add the missing modules to the coverage dependency list. > > Additionally, the jdp.test module is missing the `test` attribute, so I've added it in here. > > [0] https://bugs.openjdk.java.net/browse/JMC-7447 Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/335 From aptmac at openjdk.java.net Thu Nov 25 19:34:05 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 25 Nov 2021 19:34:05 GMT Subject: Integrated: 7446: Add Maven profile for enabling test coverage In-Reply-To: <9gf7itOF5K_DD5Vp3CaF8olU1Y-jgNp15_EvRIk7tgc=.a33725cd-a9fa-4e03-91f3-5f1cc9c96db8@github.com> References: <9gf7itOF5K_DD5Vp3CaF8olU1Y-jgNp15_EvRIk7tgc=.a33725cd-a9fa-4e03-91f3-5f1cc9c96db8@github.com> Message-ID: On Mon, 22 Nov 2021 21:03:13 GMT, Alex Macdonald wrote: > This PR addresses JMC-7446 [[0]](https://bugs.openjdk.java.net/browse/JMC-7446), in which it would be nice to have a Maven profile for enabling test coverage. > > At the moment, test coverage is enabled by default with no way of disabling it. This PR adds a Maven profile (in a similar vein to how uitests are run) that allows coverage reports to be enabled or disabled as desired. This profile is included in both the core and application poms. > > Usage: `mvn clean install -P coverage`, or `mvn clean verify -P coverage -P uitests`, etc. > > [0] https://bugs.openjdk.java.net/browse/JMC-7446 This pull request has now been integrated. Changeset: 35c8e0e2 Author: Alex Macdonald URL: https://git.openjdk.java.net/jmc/commit/35c8e0e2e555caeea4fd3760f054c0dffdd137a6 Stats: 218 lines in 7 files changed: 129 ins; 78 del; 11 mod 7446: Add Maven profile for enabling test coverage Reviewed-by: hirt ------------- PR: https://git.openjdk.java.net/jmc/pull/336 From aptmac at openjdk.java.net Thu Nov 25 19:38:06 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 25 Nov 2021 19:38:06 GMT Subject: Integrated: 7447: Add serializers and writer modules to core test coverage In-Reply-To: <0ODPS5mpWlEPu3ZbUUElANDl3yuxvcjCfRSu95OvEVc=.fd1bfc83-5b2a-44f4-b5f7-8ebdaebd507c@github.com> References: <0ODPS5mpWlEPu3ZbUUElANDl3yuxvcjCfRSu95OvEVc=.fd1bfc83-5b2a-44f4-b5f7-8ebdaebd507c@github.com> Message-ID: On Mon, 22 Nov 2021 21:00:46 GMT, Alex Macdonald wrote: > This PR addresses JMC-7447 [[0]](https://bugs.openjdk.java.net/browse/JMC-7447), in which the core coverage reports are missing the serializers and writer modules. The changes here simply add the missing modules to the coverage dependency list. > > Additionally, the jdp.test module is missing the `test` attribute, so I've added it in here. > > [0] https://bugs.openjdk.java.net/browse/JMC-7447 This pull request has now been integrated. Changeset: 3ce64837 Author: Alex Macdonald URL: https://git.openjdk.java.net/jmc/commit/3ce6483718c7a1ae5d490ded7f34cefde63fc42e Stats: 23 lines in 1 file changed: 23 ins; 0 del; 0 mod 7447: Add serializers and writer modules to core test coverage Reviewed-by: hirt ------------- PR: https://git.openjdk.java.net/jmc/pull/335 From duke at openjdk.java.net Thu Nov 25 21:28:22 2021 From: duke at openjdk.java.net (Alex Ciminian) Date: Thu, 25 Nov 2021 21:28:22 GMT Subject: RFR: 7198: Add websocket server that pushes data on selection updates [v10] In-Reply-To: References: Message-ID: > This PR adds a websocket server that pushes event data as JSON to all connected clients whenever the user updates their current selection in JMC. The server is disabled by default and can be enabled and disabled from JMC preferences. This is a rework of the proof-of-concept code in https://github.com/openjdk/jmc/pull/225 and uses the JSON serialiser introduced in #279. > > ![Screenshot 2021-09-15 at 12 08 56](https://user-images.githubusercontent.com/348973/133478041-ee436fbd-de3a-471d-955d-d0fe4cc854bf.png) > > ### Dependency management > > > Brice pointed out that there are newer versions of the Jetty websocket server available under a different artefact name - I used the same version as required in the UI tests (`10.0.5`) and this made the build succeed in both eclipse and CLI. I've had to add SPI fly since it was required by jetty, but I don't really understand what it does. > > Initially I struggled to add the required dependencies to the project. Initially I was only testing in eclipse with the setup from #225 and it worked fine.`mvn package` also worked on the command line. However, the spotless task from our CI script failed with the following error: > > > org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] because it is exposed to package 'javax.servlet' from resources javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] and jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] via two dependency chains. > [ERROR] > [ERROR] Chain 1: > [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] > [ERROR] require: (osgi.wiring.bundle=javax.servlet) > [ERROR] | > [ERROR] provide: osgi.wiring.bundle: javax.servlet > [ERROR] javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] > [ERROR] > [ERROR] Chain 2: > [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] > [ERROR] require: (osgi.wiring.bundle=org.eclipse.jetty.server) > [ERROR] | > [ERROR] provide: osgi.wiring.bundle; bundle-version:Version="10.0.5"; osgi.wiring.bundle="org.eclipse.jetty.server" > [ERROR] org.eclipse.jetty.server [osgi.identity; osgi.identity="org.eclipse.jetty.server"; type="osgi.bundle"; version:Version="10.0.5"] > [ERROR] import: (&(osgi.wiring.package=javax.servlet)(&(version>=4.0.0)(!(version>=5.0.0)))) > [ERROR] | > [ERROR] export: osgi.wiring.package: javax.servlet > [ERROR] jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] > > > This is because the task is run with the `-P uitests` and something in the UI test configuration pulls in jetty.server 10.0.5. Since [the latest available version](https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-server) for the jetty websocket server is `9.4.43.v20210629` we can't use the newer `10.x` for the transitive dependencies. > > I was able to work around this problem by setting bundle-version constraints in the `flightrecorder.ui` manifest. This makes all CI checks pass, but unfortunately it also breaks the JFR editor view in eclipse ?? > > > org.osgi.framework.BundleException: Could not resolve module: org.openjdk.jmc.joverflow.ui [457] > Unresolved requirement: Import-Package: org.openjdk.jmc.flightrecorder.ui > -> Export-Package: org.openjdk.jmc.flightrecorder.ui; bundle-symbolic-name="org.openjdk.jmc.flightrecorder.ui"; bundle-version="8.2.0.qualifier"; version="0.0.0" > org.openjdk.jmc.flightrecorder.ui [445] > Unresolved requirement: Require-Bundle: org.eclipse.jetty.server; bundle-version="[9.4.43,10.0.0)" Alex Ciminian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: - Merge branch 'master' into cimi/websocket-server - Add additional asm and asm.tree plugins to eclipse launchers - Fix websocket UI messages and copyright notices - Use CopyOnWriteArrayList for websocket handlers; remove useless cast - Fix copyright statememnts: remove Datadog in existing files, use year ranges - Remove 2019-12 platform definition, leftover after rebase - Add tree and graph handlers to websocket server - Revert whitespace changes in core/features.xml - Make websocket server port configurable - Make port a constructor argument for WebsocketServer - ... and 9 more: https://git.openjdk.java.net/jmc/compare/3ce64837...3d0d3e5c ------------- Changes: https://git.openjdk.java.net/jmc/pull/306/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=306&range=09 Stats: 513 lines in 19 files changed: 460 ins; 0 del; 53 mod Patch: https://git.openjdk.java.net/jmc/pull/306.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/306/head:pull/306 PR: https://git.openjdk.java.net/jmc/pull/306 From hirt at openjdk.java.net Thu Nov 25 21:28:22 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 25 Nov 2021 21:28:22 GMT Subject: RFR: 7198: Add websocket server that pushes data on selection updates [v9] In-Reply-To: References: Message-ID: On Wed, 27 Oct 2021 16:55:41 GMT, Alex Ciminian wrote: >> This PR adds a websocket server that pushes event data as JSON to all connected clients whenever the user updates their current selection in JMC. The server is disabled by default and can be enabled and disabled from JMC preferences. This is a rework of the proof-of-concept code in https://github.com/openjdk/jmc/pull/225 and uses the JSON serialiser introduced in #279. >> >> ![Screenshot 2021-09-15 at 12 08 56](https://user-images.githubusercontent.com/348973/133478041-ee436fbd-de3a-471d-955d-d0fe4cc854bf.png) >> >> ### Dependency management >> >> >> Brice pointed out that there are newer versions of the Jetty websocket server available under a different artefact name - I used the same version as required in the UI tests (`10.0.5`) and this made the build succeed in both eclipse and CLI. I've had to add SPI fly since it was required by jetty, but I don't really understand what it does. >> >> Initially I struggled to add the required dependencies to the project. Initially I was only testing in eclipse with the setup from #225 and it worked fine.`mvn package` also worked on the command line. However, the spotless task from our CI script failed with the following error: >> >> >> org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] because it is exposed to package 'javax.servlet' from resources javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] and jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] via two dependency chains. >> [ERROR] >> [ERROR] Chain 1: >> [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] >> [ERROR] require: (osgi.wiring.bundle=javax.servlet) >> [ERROR] | >> [ERROR] provide: osgi.wiring.bundle: javax.servlet >> [ERROR] javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] >> [ERROR] >> [ERROR] Chain 2: >> [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] >> [ERROR] require: (osgi.wiring.bundle=org.eclipse.jetty.server) >> [ERROR] | >> [ERROR] provide: osgi.wiring.bundle; bundle-version:Version="10.0.5"; osgi.wiring.bundle="org.eclipse.jetty.server" >> [ERROR] org.eclipse.jetty.server [osgi.identity; osgi.identity="org.eclipse.jetty.server"; type="osgi.bundle"; version:Version="10.0.5"] >> [ERROR] import: (&(osgi.wiring.package=javax.servlet)(&(version>=4.0.0)(!(version>=5.0.0)))) >> [ERROR] | >> [ERROR] export: osgi.wiring.package: javax.servlet >> [ERROR] jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] >> >> >> This is because the task is run with the `-P uitests` and something in the UI test configuration pulls in jetty.server 10.0.5. Since [the latest available version](https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-server) for the jetty websocket server is `9.4.43.v20210629` we can't use the newer `10.x` for the transitive dependencies. >> >> I was able to work around this problem by setting bundle-version constraints in the `flightrecorder.ui` manifest. This makes all CI checks pass, but unfortunately it also breaks the JFR editor view in eclipse ?? >> >> >> org.osgi.framework.BundleException: Could not resolve module: org.openjdk.jmc.joverflow.ui [457] >> Unresolved requirement: Import-Package: org.openjdk.jmc.flightrecorder.ui >> -> Export-Package: org.openjdk.jmc.flightrecorder.ui; bundle-symbolic-name="org.openjdk.jmc.flightrecorder.ui"; bundle-version="8.2.0.qualifier"; version="0.0.0" >> org.openjdk.jmc.flightrecorder.ui [445] >> Unresolved requirement: Require-Bundle: org.eclipse.jetty.server; bundle-version="[9.4.43,10.0.0)" > > Alex Ciminian has updated the pull request incrementally with one additional commit since the last revision: > > Add additional asm and asm.tree plugins to eclipse launchers Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/306 From aptmac at openjdk.java.net Thu Nov 25 21:37:11 2021 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 25 Nov 2021 21:37:11 GMT Subject: RFR: 7198: Add websocket server that pushes data on selection updates [v10] In-Reply-To: References: Message-ID: On Thu, 25 Nov 2021 21:28:22 GMT, Alex Ciminian wrote: >> This PR adds a websocket server that pushes event data as JSON to all connected clients whenever the user updates their current selection in JMC. The server is disabled by default and can be enabled and disabled from JMC preferences. This is a rework of the proof-of-concept code in https://github.com/openjdk/jmc/pull/225 and uses the JSON serialiser introduced in #279. >> >> ![Screenshot 2021-09-15 at 12 08 56](https://user-images.githubusercontent.com/348973/133478041-ee436fbd-de3a-471d-955d-d0fe4cc854bf.png) >> >> ### Dependency management >> >> >> Brice pointed out that there are newer versions of the Jetty websocket server available under a different artefact name - I used the same version as required in the UI tests (`10.0.5`) and this made the build succeed in both eclipse and CLI. I've had to add SPI fly since it was required by jetty, but I don't really understand what it does. >> >> Initially I struggled to add the required dependencies to the project. Initially I was only testing in eclipse with the setup from #225 and it worked fine.`mvn package` also worked on the command line. However, the spotless task from our CI script failed with the following error: >> >> >> org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] because it is exposed to package 'javax.servlet' from resources javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] and jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] via two dependency chains. >> [ERROR] >> [ERROR] Chain 1: >> [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] >> [ERROR] require: (osgi.wiring.bundle=javax.servlet) >> [ERROR] | >> [ERROR] provide: osgi.wiring.bundle: javax.servlet >> [ERROR] javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.1.0.v201410161800"] >> [ERROR] >> [ERROR] Chain 2: >> [ERROR] org.openjdk.jmc.flightrecorder.ui [osgi.identity; osgi.identity="org.openjdk.jmc.flightrecorder.ui"; type="osgi.bundle"; version:Version="8.2.0.qualifier"; singleton:="true"] >> [ERROR] require: (osgi.wiring.bundle=org.eclipse.jetty.server) >> [ERROR] | >> [ERROR] provide: osgi.wiring.bundle; bundle-version:Version="10.0.5"; osgi.wiring.bundle="org.eclipse.jetty.server" >> [ERROR] org.eclipse.jetty.server [osgi.identity; osgi.identity="org.eclipse.jetty.server"; type="osgi.bundle"; version:Version="10.0.5"] >> [ERROR] import: (&(osgi.wiring.package=javax.servlet)(&(version>=4.0.0)(!(version>=5.0.0)))) >> [ERROR] | >> [ERROR] export: osgi.wiring.package: javax.servlet >> [ERROR] jakarta.servlet-api [osgi.identity; osgi.identity="jakarta.servlet-api"; type="osgi.bundle"; version:Version="4.0.0"] >> >> >> This is because the task is run with the `-P uitests` and something in the UI test configuration pulls in jetty.server 10.0.5. Since [the latest available version](https://mvnrepository.com/artifact/org.eclipse.jetty.websocket/websocket-server) for the jetty websocket server is `9.4.43.v20210629` we can't use the newer `10.x` for the transitive dependencies. >> >> I was able to work around this problem by setting bundle-version constraints in the `flightrecorder.ui` manifest. This makes all CI checks pass, but unfortunately it also breaks the JFR editor view in eclipse ?? >> >> >> org.osgi.framework.BundleException: Could not resolve module: org.openjdk.jmc.joverflow.ui [457] >> Unresolved requirement: Import-Package: org.openjdk.jmc.flightrecorder.ui >> -> Export-Package: org.openjdk.jmc.flightrecorder.ui; bundle-symbolic-name="org.openjdk.jmc.flightrecorder.ui"; bundle-version="8.2.0.qualifier"; version="0.0.0" >> org.openjdk.jmc.flightrecorder.ui [445] >> Unresolved requirement: Require-Bundle: org.eclipse.jetty.server; bundle-version="[9.4.43,10.0.0)" > > Alex Ciminian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: > > - Merge branch 'master' into cimi/websocket-server > - Add additional asm and asm.tree plugins to eclipse launchers > - Fix websocket UI messages and copyright notices > - Use CopyOnWriteArrayList for websocket handlers; remove useless cast > - Fix copyright statememnts: remove Datadog in existing files, use year ranges > - Remove 2019-12 platform definition, leftover after rebase > - Add tree and graph handlers to websocket server > - Revert whitespace changes in core/features.xml > - Make websocket server port configurable > - Make port a constructor argument for WebsocketServer > - ... and 9 more: https://git.openjdk.java.net/jmc/compare/3ce64837...3d0d3e5c Marked as reviewed by aptmac (Committer). ------------- PR: https://git.openjdk.java.net/jmc/pull/306 From reinhapa at openjdk.java.net Thu Nov 25 21:56:07 2021 From: reinhapa at openjdk.java.net (Patrick Reinhart) Date: Thu, 25 Nov 2021 21:56:07 GMT Subject: RFR: 7432: Update the spotbugs maven plugin [v2] In-Reply-To: References: <_b0KCu_bxmsBArxhi28X7TkgUrl-MDtOhdcTS6nOVYs=.80650324-da4d-464a-84c0-b4eb3e018780@github.com> Message-ID: On Thu, 21 Oct 2021 20:17:26 GMT, Patrick Reinhart wrote: >> Patrick Reinhart has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. > > I saw it, when running it locally. It also seems to have some issues with a lot of static methods returning static class variables, that in my opinion do not seem to be a problem as those `getInstance()` methods on a different plugin classes. > > There seem to be already an issue opened on the spotbugs project. I will still check the other issues and include potential class changes within this PR later next week. > Have you had time to take a look at the failing tests yet @reinhapa? @thegreystone unfortunately not, actually swamped in work ??, hope it get's better this week... ------------- PR: https://git.openjdk.java.net/jmc/pull/324 From duke at openjdk.java.net Fri Nov 26 06:08:33 2021 From: duke at openjdk.java.net (Martin Skarsaune) Date: Fri, 26 Nov 2021 06:08:33 GMT Subject: RFR: 7455: Add support for jolokia JMX service connection Message-ID: Make use of support for JMX service connection in jolokia 1.7.0 and later to connect to JVMs over this protocol. ------------- Commit messages: - Adding test plugin for Jolokia - Revert unwanted change unrelated to new plugins - Added copyright notices. Removed author tag and meaningless comments - No reason more than Java 8 should be required - Working on spotbugs errors and build problems - [WIP] Jolokia support Changes: https://git.openjdk.java.net/jmc/pull/332/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=332&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7455 Stats: 3142 lines in 47 files changed: 3142 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/332.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/332/head:pull/332 PR: https://git.openjdk.java.net/jmc/pull/332 From reinhapa at openjdk.java.net Fri Nov 26 06:08:34 2021 From: reinhapa at openjdk.java.net (Patrick Reinhart) Date: Fri, 26 Nov 2021 06:08:34 GMT Subject: RFR: 7455: Add support for jolokia JMX service connection In-Reply-To: References: Message-ID: <4pE_e3FIk0ZgheSUUGNOderWqYQk7tzO_MReA3AgAp8=.eae103dd-89d9-4f94-a515-d579f27498c3@github.com> On Tue, 26 Oct 2021 19:58:20 GMT, Martin Skarsaune wrote: > Make use of support for JMX service connection in jolokia 1.7.0 and later to connect to JVMs over this protocol. @skarsaune do you have an JMC issue already or do you need help creating one? ------------- PR: https://git.openjdk.java.net/jmc/pull/332 From duke at openjdk.java.net Fri Nov 26 06:08:38 2021 From: duke at openjdk.java.net (Martin Skarsaune) Date: Fri, 26 Nov 2021 06:08:38 GMT Subject: RFR: 7455: Add support for jolokia JMX service connection In-Reply-To: References: Message-ID: On Tue, 26 Oct 2021 19:58:20 GMT, Martin Skarsaune wrote: > Make use of support for JMX service connection in jolokia 1.7.0 and later to connect to JVMs over this protocol. > @reinhapa : Please help creating an issue. I do not have access. application/org.openjdk.jmc.jolokia/pom.xml line 64: > 62: > 63: > 64: org.apache.maven.plugins Sooo .... I am not sure about the preferred way to pull in external dependencies. I can add that both jolokia libraries come as shaded jars with some OSGi packaging, but I do not know enough about that to say whether that would be a workable or better solution. These are quite new components, so we can probably modify the OSGI packaging in Jolokia going forwards if needed. POM: https://github.com/rhuss/jolokia/blob/556b58e63a125fb79d516d7f7833e22270f591b0/client/jmx-adapter/pom.xml#L129 Artifact: https://repo1.maven.org/maven2/org/jolokia/jolokia-jmx-adapter/1.7.0/jolokia-jmx-adapter-1.7.0-standalone.jar application/org.openjdk.jmc.kubernetes/pom.xml line 65: > 63: > 64: org.apache.maven.plugins > 65: maven-dependency-plugin Same question as for jolokia pom.xml. Corresponding resources: https://github.com/rhuss/jolokia/blob/556b58e63a125fb79d516d7f7833e22270f591b0/client/kubernetes/pom.xml#L44 https://repo1.maven.org/maven2/org/jolokia/jolokia-kubernetes/1.7.0/jolokia-kubernetes-1.7.0-standalone.jar application/tests/org.openjdk.jmc.jolokia.test/src/test/java/org/openjdk/jmc/jolokia/JolokiaTest.java line 102: > 100: public void testReadAttributesOverJolokia() throws MalformedURLException, IOException, OperationsException, > 101: IntrospectionException, AttributeNotFoundException, ReflectionException, MBeanException { > 102: for (ObjectName objectName : jolokiaConnection.queryNames(null, null)) { Iterating over all attributes may require some maintenance. However it will also detect any problems with this connector for new JVM developments. I can consider just testing a few select attributes instead. application/tests/org.openjdk.jmc.jolokia.test/src/test/java/org/openjdk/jmc/jolokia/JolokiaTest.java line 127: > 125: } > 126: > 127: private static MBeanServerConnection getJolokiaMBeanConnector() throws IOException, MalformedURLException { Testing discovery may pose for CI environments (?). We can consider making it manual if networking is an issue ------------- PR: https://git.openjdk.java.net/jmc/pull/332 From reinhapa at openjdk.java.net Fri Nov 26 06:08:39 2021 From: reinhapa at openjdk.java.net (Patrick Reinhart) Date: Fri, 26 Nov 2021 06:08:39 GMT Subject: RFR: 7455: Add support for jolokia JMX service connection In-Reply-To: References: Message-ID: On Tue, 23 Nov 2021 08:15:22 GMT, Martin Skarsaune wrote: >> Make use of support for JMX service connection in jolokia 1.7.0 and later to connect to JVMs over this protocol. > >> > > @reinhapa : Please help creating an issue. I do not have access. @skarsaune created [JMC-7455](https://bugs.openjdk.java.net/browse/JMC-7455) change the title to: _7455: Add support for jolokia JMX service connection_ ------------- PR: https://git.openjdk.java.net/jmc/pull/332 From hirt at openjdk.java.net Fri Nov 26 06:08:44 2021 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 26 Nov 2021 06:08:44 GMT Subject: RFR: 7455: Add support for jolokia JMX service connection In-Reply-To: References: Message-ID: On Tue, 26 Oct 2021 19:58:20 GMT, Martin Skarsaune wrote: > Make use of support for JMX service connection in jolokia 1.7.0 and later to connect to JVMs over this protocol. application/org.openjdk.jmc.jolokia/build.properties line 2: > 1: # > 2: # Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. For new files, don't forget to add the right copyright year (2021), and a line for your current employer (if it makes sense). See Datadog copyrights. application/org.openjdk.jmc.jolokia/plugin.xml line 3: > 1: > 2: