From marcus.hirt at oracle.com Mon Sep 3 22:47:15 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Mon, 03 Sep 2018 22:47:15 +0000 Subject: hg: jmc/jmc: JMC-6126: Updated Eclipse launchers to not require ee-modules removed in JDK 11 Message-ID: <201809032247.w83MlFU3015175@aojmv0008.oracle.com> Changeset: 6805467c0515 Author: hirt Date: 2018-09-04 00:46 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/6805467c0515 JMC-6126: Updated Eclipse launchers to not require ee-modules removed in JDK 11 Reviewed-by: ghb ! application/org.openjdk.jmc.updatesite.ide/src/main/resources/run-on-jdk-instructions/index.html ! configuration/ide/eclipse/launchers/JMC RCP plug-ins.launch ! configuration/ide/eclipse/launchers/JMC RCP.launch From marcus.hirt at oracle.com Mon Sep 3 23:37:23 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Tue, 04 Sep 2018 01:37:23 +0200 Subject: Subject: Review request for JMC-6130: Fixing warnings when launching JMC on JDK 11. Message-ID: <53D02F02-7DC5-4AF7-87EA-ABBAF51B7B4C@oracle.com> Hi all, Please review this fix to get rid of warnings when using the JMC RCP product launcher to launch JMC (on JDK 11). Jira: https://bugs.openjdk.java.net/browse/JMC-6130 Webrev: http://cr.openjdk.java.net/~hirt/JMC-6130/webrev.01/ Kind regards, Marcus From neugens at redhat.com Tue Sep 4 10:08:44 2018 From: neugens at redhat.com (Mario Torre) Date: Tue, 4 Sep 2018 12:08:44 +0200 Subject: Subject: Review request for JMC-6130: Fixing warnings when launching JMC on JDK 11. In-Reply-To: <53D02F02-7DC5-4AF7-87EA-ABBAF51B7B4C@oracle.com> References: <53D02F02-7DC5-4AF7-87EA-ABBAF51B7B4C@oracle.com> Message-ID: <59a5b3a2-0e7e-2056-3a90-75bf211228df@redhat.com> On 09/04/2018 01:37 AM, Marcus Hirt wrote: > Hi all, > > Please review this fix to get rid of warnings when using the JMC RCP product > launcher to launch JMC (on JDK 11). > > Jira: https://bugs.openjdk.java.net/browse/JMC-6130 > Webrev: http://cr.openjdk.java.net/~hirt/JMC-6130/webrev.01/ Hi Marcus, I don't have a Windows system to test it, but the patch does look good to go. Cheers, Mario -- Mario Torre Associate Manager, Software Engineering Red Hat GmbH 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From marcus.hirt at oracle.com Tue Sep 4 10:59:13 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Tue, 04 Sep 2018 10:59:13 +0000 Subject: hg: jmc/jmc: JMC-6130: Fixing one warning when launching JMC RCP on JDK 11 and one warning on Mac OS X Message-ID: <201809041059.w84AxDjs014816@aojmv0008.oracle.com> Changeset: c55d393368d8 Author: hirt Date: 2018-09-04 12:59 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/c55d393368d8 JMC-6130: Fixing one warning when launching JMC RCP on JDK 11 and one warning on Mac OS X Reviewed-by: ghb, neugens ! application/org.openjdk.jmc.rcp.product/jmc.product ! application/org.openjdk.jmc.updatesite.ide/src/main/resources/run-on-jdk-instructions/index.html From guru.hb at oracle.com Thu Sep 6 12:18:35 2018 From: guru.hb at oracle.com (Guru) Date: Thu, 6 Sep 2018 17:48:35 +0530 Subject: Review request for JMC-6108: Publish JMC core snapshots to Sonatype In-Reply-To: <94B0B2B9-B5FC-4E16-9329-85E03E0739DE@oracle.com> References: <94B0B2B9-B5FC-4E16-9329-85E03E0739DE@oracle.com> Message-ID: <5FEE3C64-BF6B-4951-A8ED-E6D73B5B8369@oracle.com> Updated webrev : http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.1 Fix : "Removed version details in MANIFEST.MF?. The Idea of the separation is to make Core modules Non Tyco build (Pure Maven considering pom first). With this solution, Core modules are built separately ?mvn install?. NOTE: MCTestCase.java is duplicated in application to resolve compilation failure, which will be fixed later. Thanks, Guru > On 28-Aug-2018, at 4:41 AM, Guru wrote: > > Hi All, > > Please review the fix for > JBS : https://bugs.openjdk.java.net/browse/JMC-6108 > Webrev : http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.0/ > > Solution and RC updated in JBS. > > Thanks, > Guru From marcus.hirt at oracle.com Thu Sep 6 13:11:18 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 06 Sep 2018 15:11:18 +0200 Subject: Review request for JMC-6108: Publish JMC core snapshots to Sonatype In-Reply-To: References: <94B0B2B9-B5FC-4E16-9329-85E03E0739DE@oracle.com> Message-ID: <6A686211-3D8D-4D0B-A491-B1626A1072C4@oracle.com> Looks fine! Go ahead! Kind regards, Marcus From: Guru Date: Thursday, 6 September 2018 at 14:18 To: , Marcus Hirt Cc: Sharath Ballal , Viplove Paliwal Subject: Re: Review request for JMC-6108: Publish JMC core snapshots to Sonatype Updated webrev : http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.1 Fix : "Removed version details in MANIFEST.MF?. The Idea of the separation is to make Core modules Non Tyco build (Pure Maven considering pom first). With this solution, Core modules are built separately ?mvn install?. NOTE: MCTestCase.java is duplicated in application to resolve compilation failure, which will be fixed later. Thanks, Guru On 28-Aug-2018, at 4:41 AM, Guru wrote: Hi All, Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6108 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.0/ Solution and RC updated in JBS. Thanks, Guru From guru.hb at oracle.com Thu Sep 6 13:34:46 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Thu, 06 Sep 2018 13:34:46 +0000 Subject: hg: jmc/jmc: JMC-6108: Publish JMC core snapshots to Sonatype Message-ID: <201809061334.w86DYkJb009369@aojmv0008.oracle.com> Changeset: 91a6716747a8 Author: ghb Date: 2018-09-06 19:04 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/91a6716747a8 JMC-6108: Publish JMC core snapshots to Sonatype Reviewed-by: mhirt,sballal ! README.md ! application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF ! application/pom.xml ! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.rjmx.test/META-INF/MANIFEST.MF + application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/common/test/MCTestCase.java ! application/tests/org.openjdk.jmc.ui.test/META-INF/MANIFEST.MF ! core/org.openjdk.jmc.common/pom.xml ! core/org.openjdk.jmc.flightrecorder.rules.jdk/pom.xml ! core/org.openjdk.jmc.flightrecorder.rules/pom.xml ! core/org.openjdk.jmc.flightrecorder/pom.xml ! core/pom.xml ! core/tests/org.openjdk.jmc.common.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.rules.jdk.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.rules.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.test/pom.xml ! core/tests/pom.xml ! pom.xml From marcus.hirt at oracle.com Thu Sep 6 18:03:09 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 06 Sep 2018 20:03:09 +0200 Subject: Subject: Review request for JMC-6135: Making the tests locale stable for post JDK8 releases. Message-ID: <1DB29C20-F83C-4640-82F0-CFAA4DCDBC83@oracle.com> Hi all, Please review this fix for JMC-6135: --- a/core/tests/pom.xml? ? ? ? Thu Sep 06 19:04:31 2018 +0530 +++ b/core/tests/pom.xml? ? ? ? Thu Sep 06 19:59:45 2018 +0200 @@ -117,7 +117,7 @@ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? maven-surefire-plugin ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2.22.0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -Duser.language=en -Duser.region=nl + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -Duser.language=en -Duser.region=nl -Djava.locale.providers=JRE,CLDR ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ${test.includes} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ${test.excludes} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ${fail.if.no.tests} JBS: https://bugs.openjdk.java.net/browse/JMC-6135 Kind regards, Marcus From guru.hb at oracle.com Thu Sep 6 18:15:37 2018 From: guru.hb at oracle.com (Guru) Date: Thu, 6 Sep 2018 23:45:37 +0530 Subject: Subject: Review request for JMC-6135: Making the tests locale stable for post JDK8 releases. In-Reply-To: <1DB29C20-F83C-4640-82F0-CFAA4DCDBC83@oracle.com> References: <1DB29C20-F83C-4640-82F0-CFAA4DCDBC83@oracle.com> Message-ID: <609F55A1-EE59-4879-92E5-8E6FA51D39C1@oracle.com> Tested with JDK 8 and JDK 11, ?mvn clean test? passed. Changes look good to me. Thanks, Guru > On 06-Sep-2018, at 11:33 PM, Marcus Hirt wrote: > > Hi all, > > Please review this fix for JMC-6135: > > --- a/core/tests/pom.xml Thu Sep 06 19:04:31 2018 +0530 > +++ b/core/tests/pom.xml Thu Sep 06 19:59:45 2018 +0200 > @@ -117,7 +117,7 @@ > maven-surefire-plugin > 2.22.0 > > - -Duser.language=en -Duser.region=nl > + -Duser.language=en -Duser.region=nl -Djava.locale.providers=JRE,CLDR > ${test.includes} > ${test.excludes} > ${fail.if.no.tests} > > JBS: https://bugs.openjdk.java.net/browse/JMC-6135 > > Kind regards, > Marcus > > > From marcus.hirt at oracle.com Thu Sep 6 18:40:05 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 06 Sep 2018 18:40:05 +0000 Subject: hg: jmc/jmc: JMC-6135: Making the core tests work on JDK 9 and later Message-ID: <201809061840.w86Ie5id011837@aojmv0008.oracle.com> Changeset: aac652534dc7 Author: hirt Date: 2018-09-06 20:39 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/aac652534dc7 JMC-6135: Making the core tests work on JDK 9 and later Reviewed-by: ghb ! core/tests/pom.xml From miro.wengner at gmail.com Thu Sep 6 21:12:57 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Thu, 6 Sep 2018 23:12:57 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work Message-ID: Hi Everyone, here is my patch to not working links inside the UI. I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. Looks all works properly. Kind Regards, Miro -------------- next part -------------- From miro.wengner at gmail.com Thu Sep 6 21:28:54 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Thu, 6 Sep 2018 23:28:54 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work In-Reply-To: <5DECA12C-5CB7-43AD-8627-50D8DE0F2A7F@oracle.com> References: <5DECA12C-5CB7-43AD-8627-50D8DE0F2A7F@oracle.com> Message-ID: <87DBDBA5-EE51-4DE1-8C0C-63DDDD0C471C@gmail.com> Hi Guru and Everyone, hmm last time it worked I didn?t realize it. here is my diff. Kind Regards, Miro diff -r 91a6716747a8 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Thu Sep 06 19:04:31 2018 +0530 +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Thu Sep 06 21:56:20 2018 +0200 @@ -39,8 +39,11 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -49,13 +52,18 @@ import org.eclipse.swt.SWTException; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.browser.BrowserFunction; +import org.eclipse.swt.browser.CloseWindowListener; +import org.eclipse.swt.browser.OpenWindowListener; import org.eclipse.swt.browser.ProgressAdapter; import org.eclipse.swt.browser.ProgressEvent; +import org.eclipse.swt.browser.WindowEvent; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.ImageLoader; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; - +import org.eclipse.swt.widgets.Shell; import org.openjdk.jmc.common.IState; import org.openjdk.jmc.common.IWritableState; import org.openjdk.jmc.flightrecorder.rules.IRule; @@ -79,6 +87,8 @@ private static final String OVERVIEW_MAKE_SCALABLE = "overview.makeScalable();"; //$NON-NLS-1$ private static final String OVERVIEW_UPDATE_PAGE_HEADERS_VISIBILITY = "overview.updatePageHeadersVisibility();"; //$NON-NLS-1$ + private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("(.*?)"); + private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl"; private static class Linker extends BrowserFunction { @@ -143,6 +153,19 @@ } + public class OpenWindowFunction extends BrowserFunction { + + public OpenWindowFunction (final Browser browser, final String name) { + super(browser, name); + } + public Object function (Object[] arguments) { + final String url = String.valueOf(arguments[0]); + final String title = String.valueOf(arguments[1]); + openBrowserByUrl(url, title); + return null; + } + } + private static class PageContainerResultProvider implements HtmlResultProvider { private IPageContainer editor; @@ -224,14 +247,60 @@ private Collection descriptors; private boolean isSinglePage = false; + private void openBrowserByUrl(final String url, final String title) { + final Display display = Display.getDefault(); + final Shell shell = new Shell(display); + shell.setText(title); + shell.setLayout(new FillLayout()); + final Browser browser = new Browser(shell, SWT.NONE); + initializeBrowser(display, browser, shell); + shell.open(); + browser.setUrl(url); + } + + private void initializeBrowser(final Display display, final Browser browser, final Shell shell) { + browser.addOpenWindowListener(new OpenWindowListener() { + public void open(WindowEvent event) { + initializeBrowser(display, browser, shell); + event.browser = browser; + } + }); + browser.addCloseWindowListener(new CloseWindowListener() { + public void close(WindowEvent event) { + Browser browser = (Browser)event.widget; + Shell shell = browser.getShell(); + shell.close(); + } + }); + } + + private static String correctAnchor(String html) { + Map map = new HashMap<>(); + Matcher m = HTML_ANCHOR_PATTERN.matcher(html); + while (m.find()) { + map.put(m.group(1), m.group(2)); + } + for(Map.Entry e: map.entrySet()){ + html = html.replace(e.getKey(), openWindowMethod(e.getKey(), e.getValue())); + } + return html; + } + + private static String openWindowMethod(String url, String name){ + return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") + .append(url).append("\u0027").append(',').append("\u0027") + .append(name).append("\u0027").append(")").toString(); + } + public ResultReportUi(boolean isSinglePage) { this.isSinglePage = isSinglePage; } public List getHtml(IPageContainer editor) { List overviewHtml = new ArrayList<>(1); - overviewHtml.add(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, + String correctedAnchor = correctAnchor(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, true)); + overviewHtml.add(correctedAnchor); return overviewHtml; } @@ -245,8 +314,10 @@ .allMatch(d -> d > RulesHtmlToolkit.IN_PROGRESS && d < Severity.INFO.getLimit()) && !showOk; browser.evaluate(String.format("overview.allOk(%b);", allOk)); //$NON-NLS-1$ } catch (SWTException swte) { - browser.setText(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + String html = RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), + descriptors, resultExpandedStates, false); + String correctedAnchor = correctAnchor(html); + browser.setText(correctedAnchor); } } } @@ -276,7 +347,8 @@ continue; } long score = Math.round(result.getScore()); - String quoteEscape = RulesHtmlToolkit.getDescription(result).replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ + String correctedAnchor = correctAnchor(RulesHtmlToolkit.getDescription(result));//$NON-NLS-1$ //$NON-NLS-2$ + String quoteEscape = correctedAnchor.replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ String description = quoteEscape.replaceAll("\n", "
"); //$NON-NLS-1$ //$NON-NLS-2$ script.append(String.format("overview.updateResult(\"%s\", %d, \"%s\");", //$NON-NLS-1$ result.getRule().getId(), score, description)); @@ -310,9 +382,11 @@ try { FlightRecorderUI.getDefault().getLogger().log(Level.INFO, "Could not update single result, redrawing html view. " + e.getMessage()); //$NON-NLS-1$ - browser.setText(isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) + String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + descriptors, resultExpandedStates, false); + String correctedAnchor = correctAnchor(html); + browser.setText(correctedAnchor); } catch (Exception e1) { FlightRecorderUI.getDefault().getLogger().log(Level.WARNING, "Could not update Result Overview", //$NON-NLS-1$ e1); @@ -346,11 +420,13 @@ String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, false); - browser.setText(html, true); + String correctedAnchor = correctAnchor(html); + browser.setText(correctedAnchor, true); browser.setJavascriptEnabled(true); browser.addProgressListener(new ProgressAdapter() { @Override public void completed(ProgressEvent event) { + new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW); //$NON-NLS-1$ new Linker(browser, "linker", descriptors, editor); //$NON-NLS-1$ new Expander(browser, "expander"); //$NON-NLS-1$ browser.execute(String.format("overview.showOk(%b);", showOk)); //$NON-NLS-1$ > On Sep 6, 2018, at 11:20 PM, Guru wrote: > > Hi Miro, > > Attachements are filtered in the mailing list. Please append the .diff to the email. Or do send me the .diff for which I can upload to cr.openjdk.java.net and share you the link.. > > Thanks, > Guru >> On 07-Sep-2018, at 2:42 AM, Miro Wengner wrote: >> >> Hi Everyone, >> here is my patch to not working links inside the UI. >> I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. >> Looks all works properly. >> >> >> Kind Regards, >> Miro >> > From marcus.hirt at oracle.com Thu Sep 6 21:51:58 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 06 Sep 2018 23:51:58 +0200 Subject: Subject: Review request for JMC-6137: making JMC compile in the Eclipse IDE again Message-ID: <89FFF8AB-3CFC-45C0-8814-09DB1499CA5E@oracle.com> Hi all, Please review this fix to make JMC compile in the Eclipse IDE again. Jira: https://bugs.openjdk.java.net/browse/JMC-6137 Webrev: http://cr.openjdk.java.net/~hirt/JMC-6137/webrev.01/ Kind regards, Marcus From marcus.hirt at oracle.com Thu Sep 6 22:08:38 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 07 Sep 2018 00:08:38 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work In-Reply-To: <18D953C2-18EE-4F48-86C8-8BFD0B257104@gmail.com> References: <18D953C2-18EE-4F48-86C8-8BFD0B257104@gmail.com> Message-ID: <8F35781B-EAB5-4957-8482-F6764A9D4A5C@oracle.com> Hi Miro, Some comments: 1. I think perhaps a better name can be found for correctAnchor method. The current name makes it feel like the anchor was incorrect to begin with - but we're adjusting the Anchor open actions to make them work better when running in the Eclipse RCP UI. Also, a comment with a reference to the bug would be nice to have there. 2. Likewise with the correctedAnchor variables. Especially in the getHtml() method - calling it correctedAnchor may be misleading, since it is the entire overview html, with adjusted anchors. Otherwise it looks fine to me. Kind regards, Marcus ?On 2018-09-06, 23:13, "jmc-dev on behalf of Miro Wengner" wrote: Hi Everyone, here is my patch to not working links inside the UI. I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. Looks all works properly. Kind Regards, Miro From miro.wengner at gmail.com Thu Sep 6 22:33:08 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Fri, 7 Sep 2018 00:33:08 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work In-Reply-To: <8F35781B-EAB5-4957-8482-F6764A9D4A5C@oracle.com> References: <18D953C2-18EE-4F48-86C8-8BFD0B257104@gmail.com> <8F35781B-EAB5-4957-8482-F6764A9D4A5C@oracle.com> Message-ID: <24FADD05-9C43-434F-84A1-836472089C52@gmail.com> Hi Marcus, thank you for review and suggestions and help! I?ve renamed the variable and method to the following: String adjustedHtml = adjustAnchorFollowAction(... and I?ve add the comments to the newly created method : adjustAnchorFollowAction I hope now is all correct. Kind Regards, Miro updated diff: diff -r aac652534dc7 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Thu Sep 06 20:39:49 2018 +0200 +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Fri Sep 07 00:24:09 2018 +0200 @@ -39,8 +39,11 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -49,13 +52,18 @@ import org.eclipse.swt.SWTException; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.browser.BrowserFunction; +import org.eclipse.swt.browser.CloseWindowListener; +import org.eclipse.swt.browser.OpenWindowListener; import org.eclipse.swt.browser.ProgressAdapter; import org.eclipse.swt.browser.ProgressEvent; +import org.eclipse.swt.browser.WindowEvent; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.ImageLoader; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; - +import org.eclipse.swt.widgets.Shell; import org.openjdk.jmc.common.IState; import org.openjdk.jmc.common.IWritableState; import org.openjdk.jmc.flightrecorder.rules.IRule; @@ -79,6 +87,8 @@ private static final String OVERVIEW_MAKE_SCALABLE = "overview.makeScalable();"; //$NON-NLS-1$ private static final String OVERVIEW_UPDATE_PAGE_HEADERS_VISIBILITY = "overview.updatePageHeadersVisibility();"; //$NON-NLS-1$ + private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("(.*?)"); + private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl"; private static class Linker extends BrowserFunction { @@ -143,6 +153,19 @@ } + public class OpenWindowFunction extends BrowserFunction { + + public OpenWindowFunction (final Browser browser, final String name) { + super(browser, name); + } + public Object function (Object[] arguments) { + final String url = String.valueOf(arguments[0]); + final String title = String.valueOf(arguments[1]); + openBrowserByUrl(url, title); + return null; + } + } + private static class PageContainerResultProvider implements HtmlResultProvider { private IPageContainer editor; @@ -224,14 +247,64 @@ private Collection descriptors; private boolean isSinglePage = false; + private void openBrowserByUrl(final String url, final String title) { + final Display display = Display.getDefault(); + final Shell shell = new Shell(display); + shell.setText(title); + shell.setLayout(new FillLayout()); + final Browser browser = new Browser(shell, SWT.NONE); + initializeBrowser(display, browser, shell); + shell.open(); + browser.setUrl(url); + } + + private void initializeBrowser(final Display display, final Browser browser, final Shell shell) { + browser.addOpenWindowListener(new OpenWindowListener() { + public void open(WindowEvent event) { + initializeBrowser(display, browser, shell); + event.browser = browser; + } + }); + browser.addCloseWindowListener(new CloseWindowListener() { + public void close(WindowEvent event) { + Browser browser = (Browser)event.widget; + Shell shell = browser.getShell(); + shell.close(); + } + }); + } + + /* + * We replace the anchors in the HTML when running in the JMC UI to make + * it possible to follow them. See JMC-5419 for more information. + */ + private static String adjustAnchorFollowAction(String html) { + Map map = new HashMap<>(); + Matcher m = HTML_ANCHOR_PATTERN.matcher(html); + while (m.find()) { + map.put(m.group(1), m.group(2)); + } + for(Map.Entry e: map.entrySet()){ + html = html.replace(e.getKey(), openWindowMethod(e.getKey(), e.getValue())); + } + return html; + } + + private static String openWindowMethod(String url, String name){ + return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") + .append(url).append("\u0027").append(',').append("\u0027") + .append(name).append("\u0027").append(")").toString(); + } + public ResultReportUi(boolean isSinglePage) { this.isSinglePage = isSinglePage; } public List getHtml(IPageContainer editor) { List overviewHtml = new ArrayList<>(1); - overviewHtml.add(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, true)); + overviewHtml.add(adjustedHtml); return overviewHtml; } @@ -245,8 +318,10 @@ .allMatch(d -> d > RulesHtmlToolkit.IN_PROGRESS && d < Severity.INFO.getLimit()) && !showOk; browser.evaluate(String.format("overview.allOk(%b);", allOk)); //$NON-NLS-1$ } catch (SWTException swte) { - browser.setText(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + String html = RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), + descriptors, resultExpandedStates, false); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml); } } } @@ -276,7 +351,8 @@ continue; } long score = Math.round(result.getScore()); - String quoteEscape = RulesHtmlToolkit.getDescription(result).replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.getDescription(result));//$NON-NLS-1$ //$NON-NLS-2$ + String quoteEscape = adjustedHtml.replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ String description = quoteEscape.replaceAll("\n", "
"); //$NON-NLS-1$ //$NON-NLS-2$ script.append(String.format("overview.updateResult(\"%s\", %d, \"%s\");", //$NON-NLS-1$ result.getRule().getId(), score, description)); @@ -310,9 +386,11 @@ try { FlightRecorderUI.getDefault().getLogger().log(Level.INFO, "Could not update single result, redrawing html view. " + e.getMessage()); //$NON-NLS-1$ - browser.setText(isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) + String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + descriptors, resultExpandedStates, false); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml); } catch (Exception e1) { FlightRecorderUI.getDefault().getLogger().log(Level.WARNING, "Could not update Result Overview", //$NON-NLS-1$ e1); @@ -346,11 +424,13 @@ String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, false); - browser.setText(html, true); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml, true); browser.setJavascriptEnabled(true); browser.addProgressListener(new ProgressAdapter() { @Override public void completed(ProgressEvent event) { + new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW); //$NON-NLS-1$ new Linker(browser, "linker", descriptors, editor); //$NON-NLS-1$ new Expander(browser, "expander"); //$NON-NLS-1$ browser.execute(String.format("overview.showOk(%b);", showOk)); //$NON-NLS-1$ > On Sep 7, 2018, at 12:08 AM, Marcus Hirt wrote: > > Hi Miro, > > Some comments: > > 1. I think perhaps a better name can be found for correctAnchor method. > The current name makes it feel like the anchor was incorrect to begin with - > but we're adjusting the Anchor open actions to make them work better when > running in the Eclipse RCP UI. Also, a comment with a reference to the > bug would be nice to have there. > > 2. Likewise with the correctedAnchor variables. Especially in the getHtml() > method - calling it correctedAnchor may be misleading, since it is the > entire overview html, with adjusted anchors. > > Otherwise it looks fine to me. > > Kind regards, > Marcus > > ?On 2018-09-06, 23:13, "jmc-dev on behalf of Miro Wengner" wrote: > > Hi Everyone, > here is my patch to not working links inside the UI. > I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. > Looks all works properly. > > > Kind Regards, > Miro > > > > > From marcus.hirt at oracle.com Thu Sep 6 22:42:47 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 06 Sep 2018 22:42:47 +0000 Subject: hg: jmc/jmc: JMC-6137: Fixing compilation problems in the Eclipse IDE Message-ID: <201809062242.w86MgmZb014954@aojmv0008.oracle.com> Changeset: 8e24bb432339 Author: hirt Date: 2018-09-07 00:42 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/8e24bb432339 JMC-6137: Fixing compilation problems in the Eclipse IDE Reviewed-by: ghb ! application/org.openjdk.jmc.rjmx/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.rjmx.test/META-INF/MANIFEST.MF - application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/common/test/MCTestCase.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/AllRJMXTests.java + application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/MCTestCase.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/RjmxTestCase.java ! application/tests/org.openjdk.jmc.ui.test/src/test/java/org/openjdk/jmc/ui/test/unit/QuantityProposalTest.java From marcus.hirt at oracle.com Thu Sep 6 22:45:39 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 07 Sep 2018 00:45:39 +0200 Subject: Thoughts on code reviews. Message-ID: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> Hi all, The JMC project does not formally require code reviews, in the OpenJDK bylaws sense of the term. That said, we still have the notion of reviewers, and each check-in must have been reviewed by someone else. We only have one active reviewer on the project today (me), and this has proven quite limiting. I am suggesting that we do three things: 1. We appoint Guru reviewer. Especially for all things infrastructure and release engineering, a review by Guru is enough to push. 2. We appoint Miro author (has two sponsored commits). 3. Two authors together (with experience in the area of the code) can together perform a review. At least for the foreseeable future. (Continuing the summer's temporary policy.) What do you think? Kind regards, Marcus From guru.hb at oracle.com Thu Sep 6 23:43:19 2018 From: guru.hb at oracle.com (Guru) Date: Fri, 7 Sep 2018 05:13:19 +0530 Subject: Review request : JMC-6136 : Test compilation fails Message-ID: <3AEB1C5B-E28E-42DB-BAA7-F43C9A912272@oracle.com> Hi, JBS : https://bugs.openjdk.java.net/browse/JMC-6136 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6136/webrev.2/ Root cause : Fix for JMC-6108 caused org.openjdk.jmc.common.test (+ other 3 test modules) not accesible by application's test module. Background : Core test module uses 'maven-surfire-plugin' (Pure Maven) and tycho (Rest of the core modules) uses 'tycho-surfire-plugin'. maven-surfire-plugin follows maven standard conventions and all the test class will be bundled to -tests.jar. where as 'tycho-surfire-plugin' is little alien to consume the maven-surfire-plugin generated test modules even though we specify 'test' in the POM file. On the other hand 'tycho-surfire-plugin' won't differentiate between test and Non-test bundle. Solution : While building core-test modules append compiled test class to 'target/classes' (default will be "target/test-classes"). This will fix JMC-6132 as well. INFO : https://bugs.eclipse.org/bugs/show_bug.cgi?id=526404 (tycho-surefire-plugin and maven-surefire-plugin do not co-exist) Tested on Windows, Linux and Mac OSX. Thanks, Guru From marcus.hirt at oracle.com Thu Sep 6 23:45:17 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 07 Sep 2018 01:45:17 +0200 Subject: Review request : JMC-6136 : Test compilation fails In-Reply-To: <071EAEE6-B564-42E5-9991-8A70E279CD01@oracle.com> References: <071EAEE6-B564-42E5-9991-8A70E279CD01@oracle.com> Message-ID: <179DFB46-9FE3-44D1-9840-1F2CF45E722B@oracle.com> Looks good Guru! Go ahead! Kind regards, Marcus From: Guru Date: Friday, 7 September 2018 at 01:43 To: , Marcus Hirt Subject: Review request : JMC-6136 : Test compilation fails Hi, JBS : https://bugs.openjdk.java.net/browse/JMC-6136 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6136/webrev.2/ Root cause : Fix for JMC-6108 caused org.openjdk.jmc.common.test (+ other 3 test modules) not accesible by application's test module. Background : Core test module uses 'maven-surfire-plugin' (Pure Maven) and tycho (Rest of the core modules) uses 'tycho-surfire-plugin'. maven-surfire-plugin follows maven standard conventions and all the test class will be bundled to -tests.jar. where as 'tycho-surfire-plugin' is little alien to consume the maven-surfire-plugin generated test modules even though we specify 'test' in the POM file. On the other hand 'tycho-surfire-plugin' won't differentiate between test and Non-test bundle. Solution : While building core-test modules append compiled test class to 'target/classes' (default will be "target/test-classes"). This will fix JMC-6132 as well. INFO : https://bugs.eclipse.org/bugs/show_bug.cgi?id=526404 (tycho-surefire-plugin and maven-surefire-plugin do not co-exist) Tested on Windows, Linux and Mac OSX. Thanks, Guru From guru.hb at oracle.com Thu Sep 6 23:47:14 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Thu, 06 Sep 2018 23:47:14 +0000 Subject: hg: jmc/jmc: JMC-6136: Test compilation fails Message-ID: <201809062347.w86NlEZq000598@aojmv0008.oracle.com> Changeset: 726d0b963dbb Author: ghb Date: 2018-09-07 05:16 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/726d0b963dbb JMC-6136: Test compilation fails Reviewed-by: mhirt ! application/pom.xml ! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.rjmx.services.jfr.test/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.rjmx.test/META-INF/MANIFEST.MF - application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/MCTestCase.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/RjmxTestCase.java ! application/tests/org.openjdk.jmc.ui.test/META-INF/MANIFEST.MF ! application/tests/org.openjdk.jmc.ui.test/src/test/java/org/openjdk/jmc/ui/test/unit/QuantityProposalTest.java ! application/uitests/org.openjdk.jmc.browser.uitest/pom.xml ! application/uitests/org.openjdk.jmc.test.jemmy/pom.xml ! application/uitests/pom.xml ! core/tests/org.openjdk.jmc.common.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.rules.jdk.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.rules.test/pom.xml ! core/tests/org.openjdk.jmc.flightrecorder.test/pom.xml From sharath.ballal at oracle.com Fri Sep 7 03:52:05 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Thu, 6 Sep 2018 20:52:05 -0700 (PDT) Subject: Thoughts on code reviews. In-Reply-To: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> References: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> Message-ID: <6a8b398a-3626-4b12-8fa8-00c90ea24993@default> +1 Marcus. Thanks, Sharath -----Original Message----- From: Marcus Hirt Sent: Friday, September 07, 2018 4:16 AM To: jmc-dev at openjdk.java.net Subject: Thoughts on code reviews. Importance: High Hi all, The JMC project does not formally require code reviews, in the OpenJDK bylaws sense of the term. That said, we still have the notion of reviewers, and each check-in must have been reviewed by someone else. We only have one active reviewer on the project today (me), and this has proven quite limiting. I am suggesting that we do three things: 1. We appoint Guru reviewer. Especially for all things infrastructure and release engineering, a review by Guru is enough to push. 2. We appoint Miro author (has two sponsored commits). 3. Two authors together (with experience in the area of the code) can together perform a review. At least for the foreseeable future. (Continuing the summer's temporary policy.) What do you think? Kind regards, Marcus From sharath.ballal at oracle.com Fri Sep 7 03:53:12 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Thu, 6 Sep 2018 20:53:12 -0700 (PDT) Subject: Review request for JMC-6108: Publish JMC core snapshots to Sonatype In-Reply-To: <5FEE3C64-BF6B-4951-A8ED-E6D73B5B8369@oracle.com> References: <94B0B2B9-B5FC-4E16-9329-85E03E0739DE@oracle.com> <5FEE3C64-BF6B-4951-A8ED-E6D73B5B8369@oracle.com> Message-ID: <6dbc0f0a-a198-4e9d-93de-c6aab5de034a@default> Looks good guru. ? ? ? Thanks, Sharath ? ? From: Guru Sent: Thursday, September 06, 2018 5:49 PM To: jmc-dev at openjdk.java.net; Marcus Hirt Cc: Sharath Ballal; Viplove Paliwal Subject: Re: Review request for JMC-6108: Publish JMC core snapshots to Sonatype ? Updated webrev :?http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.1 ? Fix : "Removed version details in MANIFEST.MF?. The Idea of the separation is to make Core modules Non Tyco build (Pure Maven considering pom first). With this solution, Core modules are built separately ?mvn install?.? ? NOTE: MCTestCase.java is duplicated in application to resolve compilation failure, which will be fixed later. ? Thanks, Guru ? On 28-Aug-2018, at 4:41 AM, Guru wrote: ? Hi All, ? Please review the fix for? JBS :?https://bugs.openjdk.java.net/browse/JMC-6108 Webrev :?http://cr.openjdk.java.net/~ghb/JMC-6108/webrev.0/? ? Solution and RC updated in JBS. ? Thanks, Guru ? From neugens at redhat.com Fri Sep 7 07:53:50 2018 From: neugens at redhat.com (Mario Torre) Date: Fri, 7 Sep 2018 09:53:50 +0200 Subject: Thoughts on code reviews. In-Reply-To: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> References: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> Message-ID: On 09/07/2018 12:45 AM, Marcus Hirt wrote: > Hi all, > > The JMC project does not formally require code reviews, in the OpenJDK bylaws > sense of the term. That said, we still have the notion of reviewers, and each > check-in must have been reviewed by someone else. We only have one active > reviewer on the project today (me), and this has proven quite limiting. > > I am suggesting that we do three things: > > 1. We appoint Guru reviewer. Especially for all things infrastructure and > release engineering, a review by Guru is enough to push. > > 2. We appoint Miro author (has two sponsored commits). > > 3. Two authors together (with experience in the area of the code) can together > perform a review. At least for the foreseeable future. (Continuing the > summer's temporary policy.) > > What do you think? Makes sense for me as well. Cheers, Mario -- Mario Torre Associate Manager, Software Engineering Red Hat GmbH 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From marcus.hirt at oracle.com Fri Sep 7 14:51:54 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 07 Sep 2018 16:51:54 +0200 Subject: Thoughts on code reviews. In-Reply-To: <0A178858-ADA3-4001-9134-F1B0745ECF85@redhat.com> References: <84D7BD84-506B-4C03-A100-574FB70C972E@oracle.com> <0A178858-ADA3-4001-9134-F1B0745ECF85@redhat.com> Message-ID: <24D34E3E-5E2B-451B-B0A6-D48B1732869B@oracle.com> Goodie! I have e-mailed the OpenJDK registrar regarding Miro. For anything infrastructure/release engineering related, Guru can be considered a reviewer, effective immediately. Kind regards, Marcus ?On 2018-09-07, 09:54, "jmc-dev on behalf of Mario Torre" wrote: On 09/07/2018 12:45 AM, Marcus Hirt wrote: > Hi all, > > The JMC project does not formally require code reviews, in the OpenJDK bylaws > sense of the term. That said, we still have the notion of reviewers, and each > check-in must have been reviewed by someone else. We only have one active > reviewer on the project today (me), and this has proven quite limiting. > > I am suggesting that we do three things: > > 1. We appoint Guru reviewer. Especially for all things infrastructure and > release engineering, a review by Guru is enough to push. > > 2. We appoint Miro author (has two sponsored commits). > > 3. Two authors together (with experience in the area of the code) can together > perform a review. At least for the foreseeable future. (Continuing the > summer's temporary policy.) > > What do you think? Makes sense for me as well. Cheers, Mario -- Mario Torre Associate Manager, Software Engineering Red Hat GmbH 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From marcus.hirt at oracle.com Fri Sep 7 15:15:20 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 07 Sep 2018 17:15:20 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work In-Reply-To: <67D0E497-C8B7-41CA-A6D5-785B191038EC@gmail.com> References: <18D953C2-18EE-4F48-86C8-8BFD0B257104@gmail.com> <8F35781B-EAB5-4957-8482-F6764A9D4A5C@oracle.com> <67D0E497-C8B7-41CA-A6D5-785B191038EC@gmail.com> Message-ID: Hi Miro, The only nit is that href (as the matching is written) must be the first parameter. You could put another capture group between the a and href. That said, since it normally is, and we want people to only use a strict html subset in rule results anyways, I think it is fine. Unless someone objects, I'll go ahead and push later tonight. Thanks for the contribution! Kind regards, Marcus ?On 2018-09-07, 00:33, "application/pgp-signature Miro Wengner protocol=; micalg=pgp-sha256" wrote: Hi Marcus, thank you for review and suggestions and help! I?ve renamed the variable and method to the following: String adjustedHtml = adjustAnchorFollowAction(... and I?ve add the comments to the newly created method : adjustAnchorFollowAction I hope now is all correct. Kind Regards, Miro updated diff: diff -r aac652534dc7 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Thu Sep 06 20:39:49 2018 +0200 +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Fri Sep 07 00:24:09 2018 +0200 @@ -39,8 +39,11 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.logging.Level; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -49,13 +52,18 @@ import org.eclipse.swt.SWTException; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.browser.BrowserFunction; +import org.eclipse.swt.browser.CloseWindowListener; +import org.eclipse.swt.browser.OpenWindowListener; import org.eclipse.swt.browser.ProgressAdapter; import org.eclipse.swt.browser.ProgressEvent; +import org.eclipse.swt.browser.WindowEvent; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.ImageLoader; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; - +import org.eclipse.swt.widgets.Shell; import org.openjdk.jmc.common.IState; import org.openjdk.jmc.common.IWritableState; import org.openjdk.jmc.flightrecorder.rules.IRule; @@ -79,6 +87,8 @@ private static final String OVERVIEW_MAKE_SCALABLE = "overview.makeScalable();"; //$NON-NLS-1$ private static final String OVERVIEW_UPDATE_PAGE_HEADERS_VISIBILITY = "overview.updatePageHeadersVisibility();"; //$NON-NLS-1$ + private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("(.*?)"); + private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl"; private static class Linker extends BrowserFunction { @@ -143,6 +153,19 @@ } + public class OpenWindowFunction extends BrowserFunction { + + public OpenWindowFunction (final Browser browser, final String name) { + super(browser, name); + } + public Object function (Object[] arguments) { + final String url = String.valueOf(arguments[0]); + final String title = String.valueOf(arguments[1]); + openBrowserByUrl(url, title); + return null; + } + } + private static class PageContainerResultProvider implements HtmlResultProvider { private IPageContainer editor; @@ -224,14 +247,64 @@ private Collection descriptors; private boolean isSinglePage = false; + private void openBrowserByUrl(final String url, final String title) { + final Display display = Display.getDefault(); + final Shell shell = new Shell(display); + shell.setText(title); + shell.setLayout(new FillLayout()); + final Browser browser = new Browser(shell, SWT.NONE); + initializeBrowser(display, browser, shell); + shell.open(); + browser.setUrl(url); + } + + private void initializeBrowser(final Display display, final Browser browser, final Shell shell) { + browser.addOpenWindowListener(new OpenWindowListener() { + public void open(WindowEvent event) { + initializeBrowser(display, browser, shell); + event.browser = browser; + } + }); + browser.addCloseWindowListener(new CloseWindowListener() { + public void close(WindowEvent event) { + Browser browser = (Browser)event.widget; + Shell shell = browser.getShell(); + shell.close(); + } + }); + } + + /* + * We replace the anchors in the HTML when running in the JMC UI to make + * it possible to follow them. See JMC-5419 for more information. + */ + private static String adjustAnchorFollowAction(String html) { + Map map = new HashMap<>(); + Matcher m = HTML_ANCHOR_PATTERN.matcher(html); + while (m.find()) { + map.put(m.group(1), m.group(2)); + } + for(Map.Entry e: map.entrySet()){ + html = html.replace(e.getKey(), openWindowMethod(e.getKey(), e.getValue())); + } + return html; + } + + private static String openWindowMethod(String url, String name){ + return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") + .append(url).append("\u0027").append(',').append("\u0027") + .append(name).append("\u0027").append(")").toString(); + } + public ResultReportUi(boolean isSinglePage) { this.isSinglePage = isSinglePage; } public List getHtml(IPageContainer editor) { List overviewHtml = new ArrayList<>(1); - overviewHtml.add(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, true)); + overviewHtml.add(adjustedHtml); return overviewHtml; } @@ -245,8 +318,10 @@ .allMatch(d -> d > RulesHtmlToolkit.IN_PROGRESS && d < Severity.INFO.getLimit()) && !showOk; browser.evaluate(String.format("overview.allOk(%b);", allOk)); //$NON-NLS-1$ } catch (SWTException swte) { - browser.setText(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + String html = RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), + descriptors, resultExpandedStates, false); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml); } } } @@ -276,7 +351,8 @@ continue; } long score = Math.round(result.getScore()); - String quoteEscape = RulesHtmlToolkit.getDescription(result).replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.getDescription(result));//$NON-NLS-1$ //$NON-NLS-2$ + String quoteEscape = adjustedHtml.replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ String description = quoteEscape.replaceAll("\n", "
"); //$NON-NLS-1$ //$NON-NLS-2$ script.append(String.format("overview.updateResult(\"%s\", %d, \"%s\");", //$NON-NLS-1$ result.getRule().getId(), score, description)); @@ -310,9 +386,11 @@ try { FlightRecorderUI.getDefault().getLogger().log(Level.INFO, "Could not update single result, redrawing html view. " + e.getMessage()); //$NON-NLS-1$ - browser.setText(isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) + String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), - descriptors, resultExpandedStates, false)); + descriptors, resultExpandedStates, false); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml); } catch (Exception e1) { FlightRecorderUI.getDefault().getLogger().log(Level.WARNING, "Could not update Result Overview", //$NON-NLS-1$ e1); @@ -346,11 +424,13 @@ String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, resultExpandedStates, false); - browser.setText(html, true); + String adjustedHtml = adjustAnchorFollowAction(html); + browser.setText(adjustedHtml, true); browser.setJavascriptEnabled(true); browser.addProgressListener(new ProgressAdapter() { @Override public void completed(ProgressEvent event) { + new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW); //$NON-NLS-1$ new Linker(browser, "linker", descriptors, editor); //$NON-NLS-1$ new Expander(browser, "expander"); //$NON-NLS-1$ browser.execute(String.format("overview.showOk(%b);", showOk)); //$NON-NLS-1$ > On Sep 7, 2018, at 12:08 AM, Marcus Hirt wrote: > > Hi Miro, > > Some comments: > > 1. I think perhaps a better name can be found for correctAnchor method. > The current name makes it feel like the anchor was incorrect to begin with - > but we're adjusting the Anchor open actions to make them work better when > running in the Eclipse RCP UI. Also, a comment with a reference to the > bug would be nice to have there. > > 2. Likewise with the correctedAnchor variables. Especially in the getHtml() > method - calling it correctedAnchor may be misleading, since it is the > entire overview html, with adjusted anchors. > > Otherwise it looks fine to me. > > Kind regards, > Marcus > > ?On 2018-09-06, 23:13, "jmc-dev on behalf of Miro Wengner" wrote: > > Hi Everyone, > here is my patch to not working links inside the UI. > I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. > Looks all works properly. > > > Kind Regards, > Miro > > > > > From marcus.hirt at oracle.com Fri Sep 7 16:43:23 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Fri, 07 Sep 2018 16:43:23 +0000 Subject: hg: jmc/jmc: JMC-5419: Making it possible to follow links in rule results in the JMC UI Message-ID: <201809071643.w87GhN3v011740@aojmv0008.oracle.com> Changeset: 31576d187ec3 Author: hirt Date: 2018-09-07 18:39 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/31576d187ec3 JMC-5419: Making it possible to follow links in rule results in the JMC UI Reviewed-by: hirt Contributed-by: mirage22 ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java From jmatsuok at redhat.com Fri Sep 7 19:55:13 2018 From: jmatsuok at redhat.com (Joshua Matsuoka) Date: Fri, 7 Sep 2018 15:55:13 -0400 Subject: JMC-5502: Add support for ClassDefine and ClassLoaderStatistics events to the Class Loading page In-Reply-To: <86CFB435-A46A-4A42-91B9-89CD36EB752A@oracle.com> References: <86CFB435-A46A-4A42-91B9-89CD36EB752A@oracle.com> Message-ID: Hi Marcus, I've gone ahead and updated the patch following our discussions on IRC http://cr.openjdk.java.net/~jmatsuoka/JMC-5502/webrev.01/ The ClassLoader statistics table is now in a tabbed group with the Class Loader table, and selections in it filter down to the Class loading/unloading/defining tables based on the class loader in the event(s). With regards to the column ordering, I've moved the timestamps to the left and sorted them by ascending. Cheers, - Josh On Mon, Aug 27, 2018 at 1:36 PM, Marcus Hirt wrote: > Hi Josh! > > Excellent! The Class Defining and Class Unloader events you probably want > to > read as a log - I think it would be nice to have the timestamps to the > left > and sort in ascending order. The Class Defining and Class Unloading tables > you > probably want to listen for selections in the table above. > > Probably want to move the ClassLoader statistics table. It is the only > table > that will not be naturally filtered as a consequence from the table above. > We probably also want to move the columns about a bit and select what to > sort on by default (perhaps class count or block size in descending order). > We can discuss where to move the table and how to change the column order > on > the IRC. > > Kind regards, > Marcus > > ?On 2018-08-27, 18:18, "jmc-dev on behalf of Joshua Matsuoka" < > jmc-dev-bounces at openjdk.java.net on behalf of jmatsuok at redhat.com> wrote: > > http://cr.openjdk.java.net/~jmatsuoka/JMC-5502/webrev.00/ > > > From miro.wengner at gmail.com Sat Sep 8 07:55:28 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Sat, 8 Sep 2018 09:55:28 +0200 Subject: [PATCH] JMC-5419 : Links in rules do not work In-Reply-To: References: <18D953C2-18EE-4F48-86C8-8BFD0B257104@gmail.com> <8F35781B-EAB5-4957-8482-F6764A9D4A5C@oracle.com> <67D0E497-C8B7-41CA-A6D5-785B191038EC@gmail.com> Message-ID: <7713A84B-A879-43D3-B5F8-19C742CE9CC0@gmail.com> Hi Marcus and All, it was my pleasure ! nice spot! I?m thinking if we update it then we need to care about the new group and we may slightly move from the statement what you have written ?we want people to only use strict html subset?. but you are right I can probably improve the regular expression to reflect some possible deviations from the standard. Thank you! Kind Regards, Miro > On Sep 7, 2018, at 5:15 PM, Marcus Hirt wrote: > > > Hi Miro, > > The only nit is that href (as the matching is written) must be the first > parameter. You could put another capture group between the a and href. That > said, since it normally is, and we want people to only use a strict html subset > in rule results anyways, I think it is fine. Unless someone objects, I'll go > ahead and push later tonight. > > Thanks for the contribution! > > Kind regards, > Marcus > > ?On 2018-09-07, 00:33, "application/pgp-signature Miro Wengner protocol=; micalg=pgp-sha256" wrote: > > > Hi Marcus, > thank you for review and suggestions and help! > I?ve renamed the variable and method to the following: > > String adjustedHtml = adjustAnchorFollowAction(... > > and I?ve add the comments to the newly created method : adjustAnchorFollowAction > > I hope now is all correct. > Kind Regards, > Miro > > updated diff: > > diff -r aac652534dc7 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java > --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Thu Sep 06 20:39:49 2018 +0200 > +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Fri Sep 07 00:24:09 2018 +0200 > @@ -39,8 +39,11 @@ > import java.util.Collection; > import java.util.HashMap; > import java.util.List; > +import java.util.Map; > import java.util.concurrent.ConcurrentLinkedQueue; > import java.util.logging.Level; > +import java.util.regex.Matcher; > +import java.util.regex.Pattern; > import java.util.stream.Collectors; > import java.util.stream.Stream; > > @@ -49,13 +52,18 @@ > import org.eclipse.swt.SWTException; > import org.eclipse.swt.browser.Browser; > import org.eclipse.swt.browser.BrowserFunction; > +import org.eclipse.swt.browser.CloseWindowListener; > +import org.eclipse.swt.browser.OpenWindowListener; > import org.eclipse.swt.browser.ProgressAdapter; > import org.eclipse.swt.browser.ProgressEvent; > +import org.eclipse.swt.browser.WindowEvent; > import org.eclipse.swt.graphics.ImageData; > import org.eclipse.swt.graphics.ImageLoader; > +import org.eclipse.swt.layout.FillLayout; > +import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Event; > import org.eclipse.swt.widgets.Listener; > - > +import org.eclipse.swt.widgets.Shell; > import org.openjdk.jmc.common.IState; > import org.openjdk.jmc.common.IWritableState; > import org.openjdk.jmc.flightrecorder.rules.IRule; > @@ -79,6 +87,8 @@ > > private static final String OVERVIEW_MAKE_SCALABLE = "overview.makeScalable();"; //$NON-NLS-1$ > private static final String OVERVIEW_UPDATE_PAGE_HEADERS_VISIBILITY = "overview.updatePageHeadersVisibility();"; //$NON-NLS-1$ > + private static final Pattern HTML_ANCHOR_PATTERN = Pattern.compile("(.*?)"); > + private static final String OPEN_BROWSER_WINDOW = "openWindowByUrl"; > > private static class Linker extends BrowserFunction { > > @@ -143,6 +153,19 @@ > > } > > + public class OpenWindowFunction extends BrowserFunction { > + > + public OpenWindowFunction (final Browser browser, final String name) { > + super(browser, name); > + } > + public Object function (Object[] arguments) { > + final String url = String.valueOf(arguments[0]); > + final String title = String.valueOf(arguments[1]); > + openBrowserByUrl(url, title); > + return null; > + } > + } > + > private static class PageContainerResultProvider implements HtmlResultProvider { > private IPageContainer editor; > > @@ -224,14 +247,64 @@ > private Collection descriptors; > private boolean isSinglePage = false; > > + private void openBrowserByUrl(final String url, final String title) { > + final Display display = Display.getDefault(); > + final Shell shell = new Shell(display); > + shell.setText(title); > + shell.setLayout(new FillLayout()); > + final Browser browser = new Browser(shell, SWT.NONE); > + initializeBrowser(display, browser, shell); > + shell.open(); > + browser.setUrl(url); > + } > + > + private void initializeBrowser(final Display display, final Browser browser, final Shell shell) { > + browser.addOpenWindowListener(new OpenWindowListener() { > + public void open(WindowEvent event) { > + initializeBrowser(display, browser, shell); > + event.browser = browser; > + } > + }); > + browser.addCloseWindowListener(new CloseWindowListener() { > + public void close(WindowEvent event) { > + Browser browser = (Browser)event.widget; > + Shell shell = browser.getShell(); > + shell.close(); > + } > + }); > + } > + > + /* > + * We replace the anchors in the HTML when running in the JMC UI to make > + * it possible to follow them. See JMC-5419 for more information. > + */ > + private static String adjustAnchorFollowAction(String html) { > + Map map = new HashMap<>(); > + Matcher m = HTML_ANCHOR_PATTERN.matcher(html); > + while (m.find()) { > + map.put(m.group(1), m.group(2)); > + } > + for(Map.Entry e: map.entrySet()){ > + html = html.replace(e.getKey(), openWindowMethod(e.getKey(), e.getValue())); > + } > + return html; > + } > + > + private static String openWindowMethod(String url, String name){ > + return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") > + .append(url).append("\u0027").append(',').append("\u0027") > + .append(name).append("\u0027").append(")").toString(); > + } > + > public ResultReportUi(boolean isSinglePage) { > this.isSinglePage = isSinglePage; > } > > public List getHtml(IPageContainer editor) { > List overviewHtml = new ArrayList<>(1); > - overviewHtml.add(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, > + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, > resultExpandedStates, true)); > + overviewHtml.add(adjustedHtml); > return overviewHtml; > } > > @@ -245,8 +318,10 @@ > .allMatch(d -> d > RulesHtmlToolkit.IN_PROGRESS && d < Severity.INFO.getLimit()) && !showOk; > browser.evaluate(String.format("overview.allOk(%b);", allOk)); //$NON-NLS-1$ > } catch (SWTException swte) { > - browser.setText(RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), > - descriptors, resultExpandedStates, false)); > + String html = RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), > + descriptors, resultExpandedStates, false); > + String adjustedHtml = adjustAnchorFollowAction(html); > + browser.setText(adjustedHtml); > } > } > } > @@ -276,7 +351,8 @@ > continue; > } > long score = Math.round(result.getScore()); > - String quoteEscape = RulesHtmlToolkit.getDescription(result).replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ > + String adjustedHtml = adjustAnchorFollowAction(RulesHtmlToolkit.getDescription(result));//$NON-NLS-1$ //$NON-NLS-2$ > + String quoteEscape = adjustedHtml.replaceAll("\\\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$ > String description = quoteEscape.replaceAll("\n", "
"); //$NON-NLS-1$ //$NON-NLS-2$ > script.append(String.format("overview.updateResult(\"%s\", %d, \"%s\");", //$NON-NLS-1$ > result.getRule().getId(), score, description)); > @@ -310,9 +386,11 @@ > try { > FlightRecorderUI.getDefault().getLogger().log(Level.INFO, > "Could not update single result, redrawing html view. " + e.getMessage()); //$NON-NLS-1$ > - browser.setText(isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) > + String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) > : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), > - descriptors, resultExpandedStates, false)); > + descriptors, resultExpandedStates, false); > + String adjustedHtml = adjustAnchorFollowAction(html); > + browser.setText(adjustedHtml); > } catch (Exception e1) { > FlightRecorderUI.getDefault().getLogger().log(Level.WARNING, "Could not update Result Overview", //$NON-NLS-1$ > e1); > @@ -346,11 +424,13 @@ > String html = isSinglePage ? RulesHtmlToolkit.generateSinglePageHtml(results) > : RulesHtmlToolkit.generateStructuredHtml(new PageContainerResultProvider(editor), descriptors, > resultExpandedStates, false); > - browser.setText(html, true); > + String adjustedHtml = adjustAnchorFollowAction(html); > + browser.setText(adjustedHtml, true); > browser.setJavascriptEnabled(true); > browser.addProgressListener(new ProgressAdapter() { > @Override > public void completed(ProgressEvent event) { > + new OpenWindowFunction(browser, OPEN_BROWSER_WINDOW); //$NON-NLS-1$ > new Linker(browser, "linker", descriptors, editor); //$NON-NLS-1$ > new Expander(browser, "expander"); //$NON-NLS-1$ > browser.execute(String.format("overview.showOk(%b);", showOk)); //$NON-NLS-1$ > > > >> On Sep 7, 2018, at 12:08 AM, Marcus Hirt wrote: >> >> Hi Miro, >> >> Some comments: >> >> 1. I think perhaps a better name can be found for correctAnchor method. >> The current name makes it feel like the anchor was incorrect to begin with - >> but we're adjusting the Anchor open actions to make them work better when >> running in the Eclipse RCP UI. Also, a comment with a reference to the >> bug would be nice to have there. >> >> 2. Likewise with the correctedAnchor variables. Especially in the getHtml() >> method - calling it correctedAnchor may be misleading, since it is the >> entire overview html, with adjusted anchors. >> >> Otherwise it looks fine to me. >> >> Kind regards, >> Marcus >> >> ?On 2018-09-06, 23:13, "jmc-dev on behalf of Miro Wengner" wrote: >> >> Hi Everyone, >> here is my patch to not working links inside the UI. >> I?ve tested links in Overview, Tabs. I?ve also generated JfrHTMLRuleReports. >> Looks all works properly. >> >> >> Kind Regards, >> Miro >> >> >> >> >> > > > > > From sasiddiq at redhat.com Mon Sep 10 17:32:24 2018 From: sasiddiq at redhat.com (Salman Siddiqui) Date: Mon, 10 Sep 2018 13:32:24 -0400 Subject: JMC-6118: Java Mission Control tests fails on OpenJDK 8 Message-ID: Hi, At the request of Mario, I've been working on JMC-6118. Some tests require commercial features and, as a result, are failing on OpenJDK 8. My approach for a solution was to have a build profile that will specify test.excludes in the tycho-surefire-plugin configuration for tests that require commercial features. The profile will be activated when an OpenJDK runtime is detected. However, it seems to not be working. I was hoping someone take a look at the attached patch file and give some pointers on how to approach a fix. Cheers, Salman -------------- next part -------------- A non-text attachment was scrubbed... Name: JMC-6118.patch Type: text/x-patch Size: 7260 bytes Desc: not available URL: From miro.wengner at gmail.com Tue Sep 11 21:17:21 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Tue, 11 Sep 2018 23:17:21 +0200 Subject: [PATCH ] Update JMC-5419 : Links in rules do not work Message-ID: <4A44CE71-5407-43B7-9898-E0ECCFAEC9C3@gmail.com> Hi Everyone, Marcus notified me about an issue with current patch https://bugs.openjdk.java.net/browse/JMC-5419 I?ve not tested it on windows machine (currently working on to have windows system) I?ve tested the anchor behavior on my old windows machine but I still don?t have full JMC there, if some with windows machine can test it. Thank you for notifying me! Kind Regards, Miro Here is the fix to the issue. PATCH: diff -r 31576d187ec3 application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Fri Sep 07 18:39:12 2018 +0200 +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java Tue Sep 11 21:17:27 2018 +0200 @@ -293,7 +293,7 @@ private static String openWindowMethod(String url, String name){ return new StringBuilder().append("#\" onclick=\"").append(OPEN_BROWSER_WINDOW).append("(").append("\u0027") .append(url).append("\u0027").append(',').append("\u0027") - .append(name).append("\u0027").append(")").toString(); + .append(name).append("\u0027").append(")").append(";return false;").toString(); } public ResultReportUi(boolean isSinglePage) { From guru.hb at oracle.com Wed Sep 12 11:42:34 2018 From: guru.hb at oracle.com (Guru) Date: Wed, 12 Sep 2018 17:12:34 +0530 Subject: Review Request : JMC-6139 : java doc missing for JMC Core modules Message-ID: <7834A660-4530-4232-ACB2-E997F6219957@oracle.com> Hi, Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6139 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6139/webrev.0/ Root cause : Fix for JMC-6108 removed the javadoc generation. Solution: enable ?maven-javadoc-plugin? and generate javadoc for core modules. Thanks, Guru From marcus.hirt at oracle.com Wed Sep 12 14:22:00 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 12 Sep 2018 07:22:00 -0700 Subject: Review Request : JMC-6139 : java doc missing for JMC Core modules In-Reply-To: References: Message-ID: <59341290-D5A0-4DD1-BE85-74EF647E38CB@oracle.com> Looks good Guru! Kind regards, Marcus From: Guru Date: Wednesday, 12 September 2018 at 04:42 To: Cc: Marcus Hirt , Sharath Ballal , Prem Kumar Balakrishnan Subject: Review Request : JMC-6139 : java doc missing for JMC Core modules Hi, Please review the fix for JBS : https://bugs.openjdk.java.net/browse/JMC-6139 Webrev : http://cr.openjdk.java.net/~ghb/JMC-6139/webrev.0/ Root cause : Fix for JMC-6108 removed the javadoc generation. Solution: enable ?maven-javadoc-plugin? and generate javadoc for core modules. Thanks, Guru From guru.hb at oracle.com Wed Sep 12 14:37:58 2018 From: guru.hb at oracle.com (guru.hb at oracle.com) Date: Wed, 12 Sep 2018 14:37:58 +0000 Subject: hg: jmc/jmc: JMC-6139: java doc missing for JMC Core modules Message-ID: <201809121437.w8CEbwP4009045@aojmv0008.oracle.com> Changeset: a512c2fb89fa Author: ghb Date: 2018-09-12 20:07 +0530 URL: http://hg.openjdk.java.net/jmc/jmc/rev/a512c2fb89fa JMC-6139: java doc missing for JMC Core modules Reviewed-by: hirt ! core/pom.xml From marcus.hirt at oracle.com Wed Sep 12 15:03:30 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 12 Sep 2018 08:03:30 -0700 Subject: Subject: Review request for JMC-6135: Cannot run core tests on JDK 11 Message-ID: <36A0601F-B366-4C55-944F-23D57FF6FD9B@oracle.com> Hi all, Please review this fix to make core buildable (and testable) with JDK 11. Jira: https://bugs.openjdk.java.net/browse/JMC-6135 Fix: diff -r 726d0b963dbb core/tests/pom.xml --- a/core/tests/pom.xml Fri Sep 07 05:16:57 2018 +0530 +++ b/core/tests/pom.xml Wed Sep 12 07:58:34 2018 -0700 @@ -117,7 +117,7 @@ maven-surefire-plugin 2.22.0 - -Duser.language=en -Duser.region=nl -Djava.locale.providers=JRE,CLDR + -Duser.language=en -Duser.region=nl -Djava.locale.providers=COMPAT ${test.includes} ${test.excludes} ${fail.if.no.tests} Kind regards, Marcus From guru.hb at oracle.com Wed Sep 12 15:16:59 2018 From: guru.hb at oracle.com (Guru) Date: Wed, 12 Sep 2018 20:46:59 +0530 Subject: Subject: Review request for JMC-6135: Cannot run core tests on JDK 11 In-Reply-To: <36A0601F-B366-4C55-944F-23D57FF6FD9B@oracle.com> References: <36A0601F-B366-4C55-944F-23D57FF6FD9B@oracle.com> Message-ID: <869658F7-45E9-40F6-A51F-DF3D61DCCEF0@oracle.com> +1 Looks good to me Tested with 8u172b07 and 11eab20 , Both on 8 and 11 JDK tests compilation succeeded. Thanks, Guru > On 12-Sep-2018, at 8:33 PM, Marcus Hirt wrote: > > Hi all, > > Please review this fix to make core buildable (and testable) with JDK 11. > > Jira: https://bugs.openjdk.java.net/browse/JMC-6135 > > Fix: > diff -r 726d0b963dbb core/tests/pom.xml > --- a/core/tests/pom.xml Fri Sep 07 05:16:57 2018 +0530 > +++ b/core/tests/pom.xml Wed Sep 12 07:58:34 2018 -0700 > @@ -117,7 +117,7 @@ > maven-surefire-plugin > 2.22.0 > > - -Duser.language=en -Duser.region=nl -Djava.locale.providers=JRE,CLDR > + -Duser.language=en -Duser.region=nl -Djava.locale.providers=COMPAT > ${test.includes} > ${test.excludes} > ${fail.if.no.tests} > > > Kind regards, > Marcus > > From marcus.hirt at oracle.com Wed Sep 12 15:23:56 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Wed, 12 Sep 2018 15:23:56 +0000 Subject: hg: jmc/jmc: JMC-6135: Making the JMC core tests run on JDK 11 Message-ID: <201809121523.w8CFNuJO024381@aojmv0008.oracle.com> Changeset: 3979c47fdfaf Author: hirt Date: 2018-09-12 08:17 -0700 URL: http://hg.openjdk.java.net/jmc/jmc/rev/3979c47fdfaf JMC-6135: Making the JMC core tests run on JDK 11 Reviewed-by: ghb ! core/tests/pom.xml From marcus.hirt at oracle.com Wed Sep 12 16:21:15 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Wed, 12 Sep 2018 16:21:15 +0000 Subject: hg: jmc/jmc: JMC-5502: Provides core support (attributes, filters, typeids etc) and user interface for the new class loading related events Message-ID: <201809121621.w8CGLGB0015199@aojmv0008.oracle.com> Changeset: f6a6e6ba4472 Author: hirt Date: 2018-09-12 09:20 -0700 URL: http://hg.openjdk.java.net/jmc/jmc/rev/f6a6e6ba4472 JMC-5502: Provides core support (attributes, filters, typeids etc) and user interface for the new class loading related events Reviewed-by: hirt Contributed-by: jmatsuoka ! application/org.openjdk.jmc.flightrecorder.ui/defaultPages.xml ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/DataPageToolkit.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/pages/ClassLoadingPage.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages.properties ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAttributes.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkFilters.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkQueries.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkTypeIDs.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/messages/internal/Messages.java ! core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/jdk/messages/internal/messages.properties From marcus.hirt at oracle.com Wed Sep 12 16:21:45 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 12 Sep 2018 09:21:45 -0700 Subject: JMC-5502: Add support for ClassDefine and ClassLoaderStatistics events to the Class Loading page In-Reply-To: References: <86CFB435-A46A-4A42-91B9-89CD36EB752A@oracle.com> Message-ID: The changes look good! Thank you for your contribution Josh! Kind regards, Marcus From: Joshua Matsuoka Date: Friday, 7 September 2018 at 12:55 To: Marcus Hirt Cc: Subject: Re: JMC-5502: Add support for ClassDefine and ClassLoaderStatistics events to the Class Loading page Hi Marcus, I've gone ahead and updated the patch following our discussions on IRC http://cr.openjdk.java.net/~jmatsuoka/JMC-5502/webrev.01/ The ClassLoader statistics table is now in a tabbed group with the Class Loader table, and selections in it filter down to the Class loading/unloading/defining tables based on the class loader in the event(s). With regards to the column ordering, I've moved the timestamps to the left and sorted them by ascending. Cheers, - Josh On Mon, Aug 27, 2018 at 1:36 PM, Marcus Hirt wrote: Hi Josh! Excellent! The Class Defining and Class Unloader events you probably want to read as a log - I think it would be nice to have the timestamps to the left and sort in ascending order. The Class Defining and Class Unloading tables you probably want to listen for selections in the table above. Probably want to move the ClassLoader statistics table. It is the only table that will not be naturally filtered as a consequence from the table above. We probably also want to move the columns about a bit and select what to sort on by default (perhaps class count or block size in descending order). We can discuss where to move the table and how to change the column order on the IRC. Kind regards, Marcus ?On 2018-08-27, 18:18, "jmc-dev on behalf of Joshua Matsuoka" wrote: http://cr.openjdk.java.net/~jmatsuoka/JMC-5502/webrev.00/ From marcus.hirt at oracle.com Thu Sep 13 23:22:34 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 13 Sep 2018 23:22:34 +0000 Subject: hg: jmc/jmc: JMC-5419: Fix for opening browser with blank page Message-ID: <201809132322.w8DNMYwL009803@aojmv0008.oracle.com> Changeset: 9ebfa2888b8f Author: hirt Date: 2018-09-14 01:21 +0200 URL: http://hg.openjdk.java.net/jmc/jmc/rev/9ebfa2888b8f JMC-5419: Fix for opening browser with blank page Reviewed-by: hirt Contributed-by: mwengner ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/overview/ResultReportUi.java From sasiddiq at redhat.com Fri Sep 14 13:01:01 2018 From: sasiddiq at redhat.com (Salman Siddiqui) Date: Fri, 14 Sep 2018 09:01:01 -0400 Subject: JMC-6118: Java Mission Control tests fails on OpenJDK 8 In-Reply-To: References: Message-ID: Hi, Please review attached patch file for fix to JMC-6118. I've tested on Linux (Fedora) with OpenJDK 8. I don't have a Windows machine available for testing so I'd appreciate some help on that front. Thanks, Salman On Mon, Sep 10, 2018 at 1:32 PM Salman Siddiqui wrote: > Hi, > > At the request of Mario, I've been working on JMC-6118. > Some tests require commercial features and, as a result, are failing on > OpenJDK 8. > My approach for a solution was to have a build profile that will specify > test.excludes in the tycho-surefire-plugin configuration for tests that > require commercial features. The profile will be activated when an OpenJDK > runtime is detected. > However, it seems to not be working. > I was hoping someone take a look at the attached patch file and give some > pointers on how to approach a fix. > > Cheers, > Salman > -------------- next part -------------- A non-text attachment was scrubbed... Name: JMC-6118.patch Type: text/x-patch Size: 4566 bytes Desc: not available URL: From marcus.hirt at oracle.com Fri Sep 14 14:16:06 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Fri, 14 Sep 2018 07:16:06 -0700 Subject: JMC-6118: Java Mission Control tests fails on OpenJDK 8 In-Reply-To: <151DB053-0910-4B26-BA7D-FBEE50E24DC8@redhat.com> References: <151DB053-0910-4B26-BA7D-FBEE50E24DC8@redhat.com> Message-ID: <5CA1715A-6F81-4A08-9966-85A9DF459E95@oracle.com> Hi Salman, I'll try the patch on my Windows machine at home tonight. If it works on my machine, then I'll open up a new bug for fixing so that the browser UI-tests run properly on Fedora. Kind regards, Marcus ?On 2018-09-14, 06:01, "jmc-dev on behalf of Salman Siddiqui" wrote: Hi, Please review attached patch file for fix to JMC-6118. I've tested on Linux (Fedora) with OpenJDK 8. I don't have a Windows machine available for testing so I'd appreciate some help on that front. Thanks, Salman On Mon, Sep 10, 2018 at 1:32 PM Salman Siddiqui wrote: > Hi, > > At the request of Mario, I've been working on JMC-6118. > Some tests require commercial features and, as a result, are failing on > OpenJDK 8. > My approach for a solution was to have a build profile that will specify > test.excludes in the tycho-surefire-plugin configuration for tests that > require commercial features. The profile will be activated when an OpenJDK > runtime is detected. > However, it seems to not be working. > I was hoping someone take a look at the attached patch file and give some > pointers on how to approach a fix. > > Cheers, > Salman > From kdobson at redhat.com Tue Sep 18 21:07:40 2018 From: kdobson at redhat.com (Ken Dobson) Date: Tue, 18 Sep 2018 17:07:40 -0400 Subject: JMC-5639: Can't resolve event type names without Recording Settings event Message-ID: Hi all, This is a pretty simple fix for https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5663 if someone could please review it that would be great. diff -r 49f6575169ce core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Tue Jul 31 20:02:30 2018 +0200 +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Wed Sep 12 16:11:17 2018 -0400 @@ -952,12 +952,16 @@ private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ - if (names == null) { - return null; + List quotedNames = new ArrayList<>(); + if (names == null || names.isEmpty()) { + for(IItemIterable iter : items){ + quotedNames.add("'" + iter.getType().getIdentifier() + "'"); + } } - List quotedNames = new ArrayList<>(); - for (String name : names) { - quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + else { + for (String name : names) { + quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ Thanks, Ken From kdobson at redhat.com Tue Sep 18 21:17:22 2018 From: kdobson at redhat.com (Ken Dobson) Date: Tue, 18 Sep 2018 17:17:22 -0400 Subject: JMC-5359: Ugly values on Y axis when no events Message-ID: Hi all, This is another simple UI fix for JMC-5359, which also appears to be a duplicate of JMC-5045 as well. If someone could have a look at it that'd be great. Jira: https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5359 https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5045 diff -r 9ebfa2888b8f application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/charts/XYDataRenderer.java --- a/application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/charts/XYDataRenderer.java Fri Sep 14 01:21:16 2018 +0200 +++ b/application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/charts/XYDataRenderer.java Tue Sep 18 17:11:03 2018 -0400 @@ -44,6 +44,7 @@ import org.openjdk.jmc.common.IDisplayable; import org.openjdk.jmc.common.unit.IQuantity; +import org.openjdk.jmc.common.unit.UnitLookup; import org.openjdk.jmc.common.util.ColorToolkit; import org.openjdk.jmc.ui.charts.AWTChartToolkit.IColorProvider; import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IBucket; @@ -200,9 +201,11 @@ if (yAxisMin != null && yAxisMax != null) { FontMetrics fm = context.getFontMetrics(); - // If min=max, expand range to be [min, min+1] + /* If min=max, expand range to be [min, min+1], or [min, min+1024] in the case of + a graph measured in bytes*/ if (yAxisMin.compareTo(yAxisMax) == 0) { - yAxisMax = yAxisMin.getUnit().quantity(yAxisMin.doubleValue() + 1); + int offset = yAxisMin.getUnit() == UnitLookup.BYTE ? 1024 : 1; + yAxisMax = yAxisMin.getUnit().quantity(yAxisMin.doubleValue() + offset); } else { // Add sufficient padding to ensure that labels for ticks <= yAxisMax fit, // and constant value graphs are discernible. Thanks, Ken From marcus.hirt at oracle.com Wed Sep 19 13:09:11 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 19 Sep 2018 06:09:11 -0700 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: References: Message-ID: <88F62BF3-24EF-4C54-A8F5-0775B201F375@oracle.com> Hi Ken, I would get the distinct event types through an aggregator rather than iterating the IItemIterables, like so: private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ List quotedNames = new ArrayList<>(); if (names == null || names.isEmpty()) { Set> types = items.getAggregate(Aggregators.distinct("", JfrAttributes.EVENT_TYPE)); //$NON-NLS-1$ for (IType type : types) { quotedNames.add("'" + type.getIdentifier() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } else { for (String name : names) { quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ } Note that both of these implementations, whilst probably good enough in practice, are not strictly correct. If there are only some types lacking recording settings, they will not be listed. This means the customer may need to make several attempts before finding them all. A fully correct implementation would compare the set of type ids available in the collection, to the set of type ids represented in the recording settings, and only add the type ids for the type ids missing in the recording settings. A smaller and simpler correct fix, given that the TYPE_NAME_ACCESSOR_FACTORY is only used by the getEventTypeNames method, would probably be to edit the TYPE_NAME_ACCESSOR_FACTORY to something like this: /* * Returns the type name, as available in the recording settings, or simply the type id, if not available. */ private static final IAccessorFactory TYPE_NAME_ACCESSOR_FACTORY = new IAccessorFactory() { @Override public IMemberAccessor getAccessor(final IType type) { final IMemberAccessor ta = JdkAttributes.REC_SETTING_FOR.getAccessor(type); return new IMemberAccessor() { @Override public String getMember(T inObject) { LabeledIdentifier eventType = ta.getMember(inObject); return eventType == null ? type.getIdentifier() : eventType.getName(); } }; } }; Hope this helps! Kind regards, Marcus ?On 2018-09-18, 14:08, "jmc-dev on behalf of Ken Dobson" wrote: Hi all, This is a pretty simple fix for https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5663 if someone could please review it that would be great. diff -r 49f6575169ce core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Tue Jul 31 20:02:30 2018 +0200 +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Wed Sep 12 16:11:17 2018 -0400 @@ -952,12 +952,16 @@ private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ - if (names == null) { - return null; + List quotedNames = new ArrayList<>(); + if (names == null || names.isEmpty()) { + for(IItemIterable iter : items){ + quotedNames.add("'" + iter.getType().getIdentifier() + "'"); + } } - List quotedNames = new ArrayList<>(); - for (String name : names) { - quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + else { + for (String name : names) { + quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ Thanks, Ken From marcus.hirt at oracle.com Wed Sep 19 13:23:07 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 19 Sep 2018 06:23:07 -0700 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> Message-ID: Added a webrev here: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.01/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java.cdiff.html Kind regards, Marcus ?On 2018-09-19, 06:09, "jmc-dev on behalf of Marcus Hirt" wrote: Hi Ken, I would get the distinct event types through an aggregator rather than iterating the IItemIterables, like so: private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ List quotedNames = new ArrayList<>(); if (names == null || names.isEmpty()) { Set> types = items.getAggregate(Aggregators.distinct("", JfrAttributes.EVENT_TYPE)); //$NON-NLS-1$ for (IType type : types) { quotedNames.add("'" + type.getIdentifier() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } else { for (String name : names) { quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ } Note that both of these implementations, whilst probably good enough in practice, are not strictly correct. If there are only some types lacking recording settings, they will not be listed. This means the customer may need to make several attempts before finding them all. A fully correct implementation would compare the set of type ids available in the collection, to the set of type ids represented in the recording settings, and only add the type ids for the type ids missing in the recording settings. A smaller and simpler correct fix, given that the TYPE_NAME_ACCESSOR_FACTORY is only used by the getEventTypeNames method, would probably be to edit the TYPE_NAME_ACCESSOR_FACTORY to something like this: /* * Returns the type name, as available in the recording settings, or simply the type id, if not available. */ private static final IAccessorFactory TYPE_NAME_ACCESSOR_FACTORY = new IAccessorFactory() { @Override public IMemberAccessor getAccessor(final IType type) { final IMemberAccessor ta = JdkAttributes.REC_SETTING_FOR.getAccessor(type); return new IMemberAccessor() { @Override public String getMember(T inObject) { LabeledIdentifier eventType = ta.getMember(inObject); return eventType == null ? type.getIdentifier() : eventType.getName(); } }; } }; Hope this helps! Kind regards, Marcus ?On 2018-09-18, 14:08, "jmc-dev on behalf of Ken Dobson" wrote: Hi all, This is a pretty simple fix for https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5663 if someone could please review it that would be great. diff -r 49f6575169ce core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Tue Jul 31 20:02:30 2018 +0200 +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Wed Sep 12 16:11:17 2018 -0400 @@ -952,12 +952,16 @@ private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ - if (names == null) { - return null; + List quotedNames = new ArrayList<>(); + if (names == null || names.isEmpty()) { + for(IItemIterable iter : items){ + quotedNames.add("'" + iter.getType().getIdentifier() + "'"); + } } - List quotedNames = new ArrayList<>(); - for (String name : names) { - quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + else { + for (String name : names) { + quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ Thanks, Ken From marcus.hirt at oracle.com Wed Sep 19 13:28:54 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 19 Sep 2018 06:28:54 -0700 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> Message-ID: <25699BAC-1717-4C29-819D-E618129EE2D2@oracle.com> Decided to change a variable name and remove unnecessary newline: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.02/ Kind regards, Marcus ?On 2018-09-19, 06:23, "jmc-dev on behalf of Marcus Hirt" wrote: Added a webrev here: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.01/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java.cdiff.html Kind regards, Marcus ?On 2018-09-19, 06:09, "jmc-dev on behalf of Marcus Hirt" wrote: Hi Ken, I would get the distinct event types through an aggregator rather than iterating the IItemIterables, like so: private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ List quotedNames = new ArrayList<>(); if (names == null || names.isEmpty()) { Set> types = items.getAggregate(Aggregators.distinct("", JfrAttributes.EVENT_TYPE)); //$NON-NLS-1$ for (IType type : types) { quotedNames.add("'" + type.getIdentifier() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } else { for (String name : names) { quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ } Note that both of these implementations, whilst probably good enough in practice, are not strictly correct. If there are only some types lacking recording settings, they will not be listed. This means the customer may need to make several attempts before finding them all. A fully correct implementation would compare the set of type ids available in the collection, to the set of type ids represented in the recording settings, and only add the type ids for the type ids missing in the recording settings. A smaller and simpler correct fix, given that the TYPE_NAME_ACCESSOR_FACTORY is only used by the getEventTypeNames method, would probably be to edit the TYPE_NAME_ACCESSOR_FACTORY to something like this: /* * Returns the type name, as available in the recording settings, or simply the type id, if not available. */ private static final IAccessorFactory TYPE_NAME_ACCESSOR_FACTORY = new IAccessorFactory() { @Override public IMemberAccessor getAccessor(final IType type) { final IMemberAccessor ta = JdkAttributes.REC_SETTING_FOR.getAccessor(type); return new IMemberAccessor() { @Override public String getMember(T inObject) { LabeledIdentifier eventType = ta.getMember(inObject); return eventType == null ? type.getIdentifier() : eventType.getName(); } }; } }; Hope this helps! Kind regards, Marcus ?On 2018-09-18, 14:08, "jmc-dev on behalf of Ken Dobson" wrote: Hi all, This is a pretty simple fix for https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5663 if someone could please review it that would be great. diff -r 49f6575169ce core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Tue Jul 31 20:02:30 2018 +0200 +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Wed Sep 12 16:11:17 2018 -0400 @@ -952,12 +952,16 @@ private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ - if (names == null) { - return null; + List quotedNames = new ArrayList<>(); + if (names == null || names.isEmpty()) { + for(IItemIterable iter : items){ + quotedNames.add("'" + iter.getType().getIdentifier() + "'"); + } } - List quotedNames = new ArrayList<>(); - for (String name : names) { - quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + else { + for (String name : names) { + quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ Thanks, Ken From marcus.hirt at oracle.com Thu Sep 20 14:29:11 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 20 Sep 2018 07:29:11 -0700 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: <621E946F-24B9-4CC7-9FBE-0F1BAEF1DA0E@oracle.com> References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> <621E946F-24B9-4CC7-9FBE-0F1BAEF1DA0E@oracle.com> Message-ID: <2EE34877-C543-4EAB-AEE3-E526BEAACEC5@oracle.com> Took a closer look at this just now, and realized that there is one additional change required: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.03/ Kind regards, Marcus ?On 2018-09-19, 06:29, "jmc-dev on behalf of Marcus Hirt" wrote: Decided to change a variable name and remove unnecessary newline: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.02/ Kind regards, Marcus ?On 2018-09-19, 06:23, "jmc-dev on behalf of Marcus Hirt" wrote: Added a webrev here: http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.01/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java.cdiff.html Kind regards, Marcus ?On 2018-09-19, 06:09, "jmc-dev on behalf of Marcus Hirt" wrote: Hi Ken, I would get the distinct event types through an aggregator rather than iterating the IItemIterables, like so: private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ List quotedNames = new ArrayList<>(); if (names == null || names.isEmpty()) { Set> types = items.getAggregate(Aggregators.distinct("", JfrAttributes.EVENT_TYPE)); //$NON-NLS-1$ for (IType type : types) { quotedNames.add("'" + type.getIdentifier() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } else { for (String name : names) { quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ } Note that both of these implementations, whilst probably good enough in practice, are not strictly correct. If there are only some types lacking recording settings, they will not be listed. This means the customer may need to make several attempts before finding them all. A fully correct implementation would compare the set of type ids available in the collection, to the set of type ids represented in the recording settings, and only add the type ids for the type ids missing in the recording settings. A smaller and simpler correct fix, given that the TYPE_NAME_ACCESSOR_FACTORY is only used by the getEventTypeNames method, would probably be to edit the TYPE_NAME_ACCESSOR_FACTORY to something like this: /* * Returns the type name, as available in the recording settings, or simply the type id, if not available. */ private static final IAccessorFactory TYPE_NAME_ACCESSOR_FACTORY = new IAccessorFactory() { @Override public IMemberAccessor getAccessor(final IType type) { final IMemberAccessor ta = JdkAttributes.REC_SETTING_FOR.getAccessor(type); return new IMemberAccessor() { @Override public String getMember(T inObject) { LabeledIdentifier eventType = ta.getMember(inObject); return eventType == null ? type.getIdentifier() : eventType.getName(); } }; } }; Hope this helps! Kind regards, Marcus ?On 2018-09-18, 14:08, "jmc-dev on behalf of Ken Dobson" wrote: Hi all, This is a pretty simple fix for https://bugs.openjdk.java.net/projects/JMC/issues/JMC-5663 if someone could please review it that would be great. diff -r 49f6575169ce core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java --- a/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Tue Jul 31 20:02:30 2018 +0200 +++ b/core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java Wed Sep 12 16:11:17 2018 -0400 @@ -952,12 +952,16 @@ private static String getEventTypeNames(IItemCollection items) { Set names = items.getAggregate(Aggregators.distinct("", TYPE_NAME_ACCESSOR_FACTORY)); //$NON-NLS-1$ - if (names == null) { - return null; + List quotedNames = new ArrayList<>(); + if (names == null || names.isEmpty()) { + for(IItemIterable iter : items){ + quotedNames.add("'" + iter.getType().getIdentifier() + "'"); + } } - List quotedNames = new ArrayList<>(); - for (String name : names) { - quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + else { + for (String name : names) { + quotedNames.add("'" + name + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + } } Collections.sort(quotedNames); return StringToolkit.join(quotedNames, ", "); //$NON-NLS-1$ Thanks, Ken From neugens at redhat.com Thu Sep 20 15:25:05 2018 From: neugens at redhat.com (Mario Torre) Date: Thu, 20 Sep 2018 17:25:05 +0200 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: <2EE34877-C543-4EAB-AEE3-E526BEAACEC5@oracle.com> References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> <621E946F-24B9-4CC7-9FBE-0F1BAEF1DA0E@oracle.com> <2EE34877-C543-4EAB-AEE3-E526BEAACEC5@oracle.com> Message-ID: On 09/20/2018 04:29 PM, Marcus Hirt wrote: > Took a closer look at this just now, and realized that there is one additional > > change required: > > > > http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.03/ The patch looks good, I would like a test added though. Perhaps, that could be the start of a shared repository of records for tests, like we discussed over IRC? Cheers, Mario -- Mario Torre Associate Manager, Software Engineering Red Hat GmbH 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From marcus.hirt at oracle.com Thu Sep 20 15:32:23 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 20 Sep 2018 15:32:23 +0000 Subject: hg: jmc/jmc: JMC-5663: Ensuring that the GC Pause Peak Duration rule properly lists unknown event IDs Message-ID: <201809201532.w8KFWOwf025168@aojmv0008.oracle.com> Changeset: 896f9586d4c6 Author: hirt Date: 2018-09-20 08:32 -0700 URL: http://hg.openjdk.java.net/jmc/jmc/rev/896f9586d4c6 JMC-5663: Ensuring that the GC Pause Peak Duration rule properly lists unknown event IDs Reviewed-by: hirt, neugens, mwengner Contributed-by: Ken Dobson , hirt ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/LongGcPauseRule.java ! core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java From miro.wengner at gmail.com Thu Sep 20 15:35:09 2018 From: miro.wengner at gmail.com (Miro Wengner) Date: Thu, 20 Sep 2018 17:35:09 +0200 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> <621E946F-24B9-4CC7-9FBE-0F1BAEF1DA0E@oracle.com> <2EE34877-C543-4EAB-AEE3-E526BEAACEC5@oracle.com> Message-ID: <51490D75-A041-466D-9EE9-6D113D7542B0@gmail.com> The patch looks good to me, I?ve it tested and I go proper messages Cheers, Miro > On Sep 20, 2018, at 5:25 PM, Mario Torre wrote: > > On 09/20/2018 04:29 PM, Marcus Hirt wrote: >> Took a closer look at this just now, and realized that there is one additional >> >> change required: >> >> >> >> http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.03/ > > The patch looks good, I would like a test added though. > > Perhaps, that could be the start of a shared repository of records for > tests, like we discussed over IRC? > > Cheers, > Mario > > -- > Mario Torre > Associate Manager, Software Engineering > Red Hat GmbH > 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From marcus.hirt at oracle.com Thu Sep 20 16:05:11 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 20 Sep 2018 09:05:11 -0700 Subject: JMC-5639: Can't resolve event type names without Recording Settings event In-Reply-To: <8A3F3777-250D-465C-9F84-15A87551B8E8@gmail.com> References: <6FDE45A1-356C-4B06-9B07-9BDC74D31A48@oracle.com> <621E946F-24B9-4CC7-9FBE-0F1BAEF1DA0E@oracle.com> <2EE34877-C543-4EAB-AEE3-E526BEAACEC5@oracle.com> <8A3F3777-250D-465C-9F84-15A87551B8E8@gmail.com> Message-ID: <0472FA24-BAFB-4631-BA2F-C0566A6109F4@oracle.com> Thanks gents. The change has been pushed! Kind regards, Marcus ?On 2018-09-20, 08:35, "jmc-dev on behalf of Miro Wengner" wrote: The patch looks good to me, I?ve it tested and I go proper messages Cheers, Miro > On Sep 20, 2018, at 5:25 PM, Mario Torre wrote: > > On 09/20/2018 04:29 PM, Marcus Hirt wrote: >> Took a closer look at this just now, and realized that there is one additional >> >> change required: >> >> >> >> http://cr.openjdk.java.net/~hirt/JMC-5663/webrev.03/ > > The patch looks good, I would like a test added though. > > Perhaps, that could be the start of a shared repository of records for > tests, like we discussed over IRC? > > Cheers, > Mario > > -- > Mario Torre > Associate Manager, Software Engineering > Red Hat GmbH > 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From sharath.ballal at oracle.com Tue Sep 25 09:35:59 2018 From: sharath.ballal at oracle.com (Sharath Ballal) Date: Tue, 25 Sep 2018 02:35:59 -0700 (PDT) Subject: RFR JMC-5622: Update the updatesite landing pages for 7.0.0 Message-ID: <78cda604-bd6f-467a-825e-0154fca14ece@default> Hi, Pls review changes to updatesite landing pages. Bug id: https://bugs.openjdk.java.net/browse/JMC-5622 Webrev: http://cr.openjdk.java.net/~sballal/JMC-5622/webrev.00/ Thanks, Sharath From marcus.hirt at oracle.com Wed Sep 26 17:12:22 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Wed, 26 Sep 2018 10:12:22 -0700 Subject: Review request for JMC-6123: Mission Control not recognising itself when running inside of Eclipse running on JDK 11 Message-ID: Please review this fix to make JMC recognize itself when launched in Eclipse from within Eclipse. (Just adding -Djdk.attach.allowAttachSelf=true to the Eclipse launchers.) Jira: https://bugs.openjdk.java.net/browse/JMC-6123 Diff: diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch --- a/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Thu Sep 20 08:32:13 2018 -0700 +++ b/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Wed Sep 26 10:05:28 2018 -0700 @@ -60,6 +60,7 @@ + diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse.launch --- a/configuration/ide/eclipse/launchers/JMC Eclipse.launch Thu Sep 20 08:32:13 2018 -0700 +++ b/configuration/ide/eclipse/launchers/JMC Eclipse.launch Wed Sep 26 10:05:28 2018 -0700 @@ -60,6 +60,7 @@ + Kind regards, Marcus From guru.hb at oracle.com Thu Sep 27 05:31:55 2018 From: guru.hb at oracle.com (Guru) Date: Thu, 27 Sep 2018 11:01:55 +0530 Subject: Review request for JMC-6123: Mission Control not recognising itself when running inside of Eclipse running on JDK 11 In-Reply-To: References: Message-ID: <64D8ADEE-2E28-4FB3-8CE5-1173D673CD9C@oracle.com> Hi Marcus, Changes look good to me, It works as expected if I run / launch the eclipse from my work space (i.e from project built from eclipse IDE) , But with one exception (Or it might be a problem mentioned in JMC-4455) i.e 1. I built JMC project from terminal 2. Launched eclipse with Latest JDK 11eab28 (using -vm /PATH_TO/JDK_11eab28/bin) 3. Installed JMC to the eclipse which is running with JDK 11 (using ?Install new Software? and path to my locally build Jmc ide update sites) 4. Restarted the eclipse 5. JVM browser shows ?[11] Local (PID)? installed of ?[11] The JVM Running Mission Control (PID)? After relaunching the eclipse (Step 2 : ) with "-vmargs -Djdk.attach.allowAttachSelf=true ? Then Eclipse shows the running JMC as ?[11] The JVM Running Mission Control(PID)?. Thanks, Guru > On 26-Sep-2018, at 10:42 PM, Marcus Hirt wrote: > > Please review this fix to make JMC recognize itself when launched in Eclipse > from within Eclipse. (Just adding -Djdk.attach.allowAttachSelf=true to the > Eclipse launchers.) > > Jira: https://bugs.openjdk.java.net/browse/JMC-6123 > Diff: > > diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch > --- a/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Thu Sep 20 08:32:13 2018 -0700 > +++ b/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Wed Sep 26 10:05:28 2018 -0700 > @@ -60,6 +60,7 @@ > > > > + > > > > diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse.launch > --- a/configuration/ide/eclipse/launchers/JMC Eclipse.launch Thu Sep 20 08:32:13 2018 -0700 > +++ b/configuration/ide/eclipse/launchers/JMC Eclipse.launch Wed Sep 26 10:05:28 2018 -0700 > @@ -60,6 +60,7 @@ > > > > + > > > > > Kind regards, > Marcus > > From marcus.hirt at oracle.com Thu Sep 27 13:54:31 2018 From: marcus.hirt at oracle.com (marcus.hirt at oracle.com) Date: Thu, 27 Sep 2018 13:54:31 +0000 Subject: hg: jmc/jmc: JMC-6123: Fixing JMC not recognizing itself when launched from withing Eclipse Message-ID: <201809271354.w8RDsWH3027471@aojmv0008.oracle.com> Changeset: d600604daa30 Author: hirt Date: 2018-09-27 06:54 -0700 URL: http://hg.openjdk.java.net/jmc/jmc/rev/d600604daa30 JMC-6123: Fixing JMC not recognizing itself when launched from withing Eclipse Reviewed-by: ghb ! configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch ! configuration/ide/eclipse/launchers/JMC Eclipse.launch From marcus.hirt at oracle.com Thu Sep 27 13:55:58 2018 From: marcus.hirt at oracle.com (Marcus Hirt) Date: Thu, 27 Sep 2018 06:55:58 -0700 Subject: Review request for JMC-6123: Mission Control not recognising itself when running inside of Eclipse running on JDK 11 In-Reply-To: References: Message-ID: Hi Guru, Yes, that is included in the documentation for the update site. See application/org.openjdk.jmc.updatesite.ide/src/main/resources/run-on-jdk-instructions/index.html. Kind regards, Marcus From: Guru Date: Wednesday, 26 September 2018 at 22:31 To: Marcus Hirt Cc: "jmc-dev at openjdk.java.net" Subject: Re: Review request for JMC-6123: Mission Control not recognising itself when running inside of Eclipse running on JDK 11 Hi Marcus, Changes look good to me, It works as expected if I run / launch the eclipse from my work space (i.e from project built from eclipse IDE) , But with one exception (Or it might be a problem mentioned in JMC-4455) i.e 1. I built JMC project from terminal 2. Launched eclipse with Latest JDK 11eab28 (using -vm /PATH_TO/JDK_11eab28/bin) 3. Installed JMC to the eclipse which is running with JDK 11 (using ?Install new Software? and path to my locally build Jmc ide update sites) 4. Restarted the eclipse 5. JVM browser shows ?[11] Local (PID)? installed of ?[11] The JVM Running Mission Control (PID)? After relaunching the eclipse (Step 2 : ) with "-vmargs -Djdk.attach.allowAttachSelf=true ? Then Eclipse shows the running JMC as ?[11] The JVM Running Mission Control(PID)?. Thanks, Guru On 26-Sep-2018, at 10:42 PM, Marcus Hirt wrote: Please review this fix to make JMC recognize itself when launched in Eclipse from within Eclipse. (Just adding -Djdk.attach.allowAttachSelf=true to the Eclipse launchers.) Jira: https://bugs.openjdk.java.net/browse/JMC-6123 Diff: diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch --- a/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Thu Sep 20 08:32:13 2018 -0700 +++ b/configuration/ide/eclipse/launchers/JMC Eclipse plug-ins.launch Wed Sep 26 10:05:28 2018 -0700 @@ -60,6 +60,7 @@ + diff -r 896f9586d4c6 configuration/ide/eclipse/launchers/JMC Eclipse.launch --- a/configuration/ide/eclipse/launchers/JMC Eclipse.launch Thu Sep 20 08:32:13 2018 -0700 +++ b/configuration/ide/eclipse/launchers/JMC Eclipse.launch Wed Sep 26 10:05:28 2018 -0700 @@ -60,6 +60,7 @@ + Kind regards, Marcus From sasiddiq at redhat.com Fri Sep 28 16:21:06 2018 From: sasiddiq at redhat.com (Salman Siddiqui) Date: Fri, 28 Sep 2018 12:21:06 -0400 Subject: JMC-6118: Java Mission Control tests fails on OpenJDK 8 In-Reply-To: <5CA1715A-6F81-4A08-9966-85A9DF459E95@oracle.com> References: <151DB053-0910-4B26-BA7D-FBEE50E24DC8@redhat.com> <5CA1715A-6F81-4A08-9966-85A9DF459E95@oracle.com> Message-ID: Hi all, I've updated the patch. If someone could please review the changes, that would be great. Thanks, Salman On Fri, Sep 14, 2018 at 10:16 AM Marcus Hirt wrote: > Hi Salman, > > I'll try the patch on my Windows machine at home tonight. If it works on > my machine, > then I'll open up a new bug for fixing so that the browser UI-tests run > properly on > Fedora. > > Kind regards, > Marcus > > ?On 2018-09-14, 06:01, "jmc-dev on behalf of Salman Siddiqui" < > jmc-dev-bounces at openjdk.java.net on behalf of sasiddiq at redhat.com> wrote: > > Hi, > > Please review attached patch file for fix to JMC-6118. > I've tested on Linux (Fedora) with OpenJDK 8. I don't have a Windows > machine available for testing so I'd appreciate some help on that > front. > > Thanks, > Salman > > On Mon, Sep 10, 2018 at 1:32 PM Salman Siddiqui > wrote: > > > Hi, > > > > At the request of Mario, I've been working on JMC-6118. > > Some tests require commercial features and, as a result, are failing > on > > OpenJDK 8. > > My approach for a solution was to have a build profile that will > specify > > test.excludes in the tycho-surefire-plugin configuration for tests > that > > require commercial features. The profile will be activated when an > OpenJDK > > runtime is detected. > > However, it seems to not be working. > > I was hoping someone take a look at the attached patch file and give > some > > pointers on how to approach a fix. > > > > Cheers, > > Salman > > > > > > > -- Salman Siddiqui Software Engineer Intern Red Hat, Toronto, Canada sasiddiq at redhat.com