From jkang at openjdk.java.net Mon Jan 6 14:04:26 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Mon, 6 Jan 2020 14:04:26 GMT Subject: RFR: 6665: .project files still exist for removed platform definitions Message-ID: Removes the .project files that remain in the directories. See https://github.com/openjdk/jmc/commit/423e72db602667b72ac924d1178301253321cbd1 for the removal of the platform definitions. ------------- Commits: - 0c5147e5: 6665: .project files still exist for removed platform definitions Changes: https://git.openjdk.java.net/jmc/pull/25/files Webrev: https://webrevs.openjdk.java.net/jmc/25/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6665 Stats: 68 lines in 4 files changed: 0 ins; 68 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/25.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/25/head:pull/25 PR: https://git.openjdk.java.net/jmc/pull/25 From jkang at openjdk.java.net Mon Jan 6 19:39:59 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Mon, 6 Jan 2020 19:39:59 GMT Subject: RFR: 6663: Reloading the Flame Chart View in Linux displays file browser Message-ID: The context menu to reload is disabled The disable comes from looking at Webkit source that respects doit field: https://github.com/eclipse/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/gtk/org/eclipse/swt/browser/WebKit.java#L819 The issue occurs as we set Browser text to some HTML and no URL is set. The reload action seems to revisit the URL with the default result being the file system, I guess. A bug against SWT was opened to respect HTML text set when refresh/reload. https://bugs.eclipse.org/bugs/show_bug.cgi?id=558846 ------------- Commits: - 0996a28a: 6663: Reloading the Flame Chart View in Linux displays file browser Changes: https://git.openjdk.java.net/jmc/pull/26/files Webrev: https://webrevs.openjdk.java.net/jmc/26/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6663 Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/26.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/26/head:pull/26 PR: https://git.openjdk.java.net/jmc/pull/26 From jkang at openjdk.java.net Mon Jan 6 20:06:27 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Mon, 6 Jan 2020 20:06:27 GMT Subject: RFR: 6663: Reloading the Flame Chart View in Linux displays file browser In-Reply-To: References: Message-ID: <0ZjOc0h5dKTGuUWYCPMALOvrjwBrMNyvT-o4Cd3njY8=.10be7868-cfee-4347-b6a6-353f5ccbdb50@github.com> On Mon, 6 Jan 2020 16:41:04 GMT, Jie Kang wrote: > The context menu to reload is disabled > > The disable comes from looking at Webkit source that respects doit field: > https://github.com/eclipse/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/gtk/org/eclipse/swt/browser/WebKit.java#L819 > > The issue occurs as we set Browser text to some HTML and no URL is set. The reload action seems to revisit the URL with the default result being the file system, I guess. > > A bug against SWT was opened to respect HTML text set when refresh/reload. > https://bugs.eclipse.org/bugs/show_bug.cgi?id=558846 Er, just to be clear. This is a workaround fix that prevents users from reloading/refreshing. As far as I can tell the keyboard shortcuts aren't being captured so various modifier + R combinations don't reload either. ------------- PR: https://git.openjdk.java.net/jmc/pull/26 From hirt at openjdk.java.net Tue Jan 7 00:49:19 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 7 Jan 2020 00:49:19 GMT Subject: RFR: 6665: .project files still exist for removed platform definitions In-Reply-To: References: Message-ID: On Mon, 6 Jan 2020 14:01:09 GMT, Jie Kang wrote: > Removes the .project files that remain in the directories. See https://github.com/openjdk/jmc/commit/423e72db602667b72ac924d1178301253321cbd1 for the removal of the platform definitions. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/25 From hirt at openjdk.java.net Tue Jan 7 09:32:24 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 7 Jan 2020 09:32:24 GMT Subject: RFR: 6663: Reloading the Flame Chart View in Linux displays file browser In-Reply-To: References: Message-ID: <0bUe4GDxj_r47h0PZ50A8FQbhezcGqf5hNDV4e_es_o=.f08c8357-e429-41e5-8d4a-6883362fe374@github.com> On Mon, 6 Jan 2020 16:41:04 GMT, Jie Kang wrote: > The context menu to reload is disabled > > The disable comes from looking at Webkit source that respects doit field: > https://github.com/eclipse/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/gtk/org/eclipse/swt/browser/WebKit.java#L819 > > The issue occurs as we set Browser text to some HTML and no URL is set. The reload action seems to revisit the URL with the default result being the file system, I guess. > > A bug against SWT was opened to respect HTML text set when refresh/reload. > https://bugs.eclipse.org/bugs/show_bug.cgi?id=558846 ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/26 From aptmac at openjdk.java.net Tue Jan 7 15:39:14 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Tue, 7 Jan 2020 15:39:14 GMT Subject: [Integrated] RFR: 6665: .project files still exist for removed platform definitions In-Reply-To: References: Message-ID: Changeset: 31d82a7d Author: Jie Kang Committer: Alex Macdonald Date: 2020-01-07 15:38:19 +0000 URL: https://git.openjdk.java.net/jmc/commit/31d82a7d 6665: .project files still exist for removed platform definitions Reviewed-by: hirt - releng/platform-definitions/platform-definition-2018-09/.project - releng/platform-definitions/platform-definition-2018-12/.project - releng/platform-definitions/platform-definition-2019-03/.project - releng/platform-definitions/platform-definition-2019-06/.project From aptmac at openjdk.java.net Tue Jan 7 15:40:10 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Tue, 7 Jan 2020 15:40:10 GMT Subject: [Integrated] RFR: 6663: Reloading the Flame Chart View in Linux displays file browser In-Reply-To: References: Message-ID: <43a66b9f-b8ca-41af-a91f-b6ef3b03a074@openjdk.org> Changeset: 7ad8f7c0 Author: Jie Kang Committer: Alex Macdonald Date: 2020-01-07 15:39:08 +0000 URL: https://git.openjdk.java.net/jmc/commit/7ad8f7c0 6663: Reloading the Flame Chart View in Linux displays file browser Reviewed-by: hirt ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java From jkang at redhat.com Tue Jan 7 21:09:44 2020 From: jkang at redhat.com (Jie Kang) Date: Tue, 7 Jan 2020 16:09:44 -0500 Subject: Proposal: Moving/refactoring some more bundles/packages/classes from application into core Message-ID: Hi, For 8.0.0 and beyond I would like to propose moving some portion of the below bundles/packages/classes from application module into core module for easier re-use by third-party applications. I've tried to divide things into sensible sets and provide a quick explanation for each. I'm willing to prepare patches for sets on a case-by-case basis but would like some opinions now before I start to put in a large amount of work. Bundle: org.openjdk.jmc.flightrecorder.configuration This bundle contains classes used to manipulate the configuration for a Flight Recording. For example to describe which events should be enabled and with what parameters when starting a recording. It requires one bundle and imports one package, both from core. I think moving the entire bundle is low risk. Bundle: org.openjdk.jmc.jdp This bundle contains classes used to discover JVM services on a network. It has zero imports. I think moving the entire bundle is low risk. Bundles: org.openjdk.jmc.rjmx org.openjdk.jmc.rjmx.services.jfr These bundles are used to provide jfr rjmx client side API to connect to a JVM and start/stop/extract flight recordings, etc. Moving these, or some part of these would require some refactoring (yet to analyze), and would be higher risk. Conceptually, I think it makes sense to provide these features in core for third-party applications to use. Bundle: org.openjdk.jmc.ui.common Package group: org.openjdk.jmc.ui.common.security Some of the packages in this bundle don't seem to fit the term 'ui'. Specifically the security package provides a SecurityManager, one use being secure rjmx connections for the above org.openjdk.jmc.rjmx and org.openjdk.rjmx.services.jfr functionality. In general it's used to securely store usernames/passwords in various configuration pages. This comes about as a dependency from using the rjmx code; moving this may also require some refactoring and rework. Usage of these bundles comes from work to reuse existing code to manage connections to JVMs for JFR related tasks, starting, stopping, extracting recordings, etc. I think it makes sense to have this capability in the exported API, core. I'd appreciate your opinions on this proposal, thanks! Regards, From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 8 17:49:10 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 8 Jan 2020 17:49:10 GMT Subject: [Rev 01] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: > This patch addresses [JMC-6658](https://bugs.openjdk.java.net/browse/JMC-6658) and removes the unnecessary storing of pre-instrumented bytecode that was implemented in [JMC-5458](https://bugs.openjdk.java.net/browse/JMC-5458). The pull request has been updated with a new target base due to a merge or a rebase. ------------- Commits: - dc2c00b5: Make testSetTransforms check if byte code is actually transformed/reverted - 6a3c9141: Remove unnecessary storing of pre-instrumented bytecode Changes: https://git.openjdk.java.net/jmc/pull/23/files Webrev: https://webrevs.openjdk.java.net/jmc/23/webrev.01 Stats: 154 lines in 4 files changed: 76 ins; 48 del; 30 mod Patch: https://git.openjdk.java.net/jmc/pull/23.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/23/head:pull/23 PR: https://git.openjdk.java.net/jmc/pull/23 From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 8 18:01:48 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 8 Jan 2020 18:01:48 GMT Subject: RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: <3c9YvOmWOPHQM_wd6sDmWP7YOyWzb4BAjOfwQw4I9BE=.3065105d-7594-40db-8eeb-fc4d1539ac88@github.com> References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> <3c9YvOmWOPHQM_wd6sDmWP7YOyWzb4BAjOfwQw4I9BE=.3065105d-7594-40db-8eeb-fc4d1539ac88@github.com> Message-ID: On Fri, 20 Dec 2019 19:02:18 GMT, Marcus Hirt wrote: >> This patch addresses [JMC-6658](https://bugs.openjdk.java.net/browse/JMC-6658) and removes the unnecessary storing of pre-instrumented bytecode that was implemented in [JMC-5458](https://bugs.openjdk.java.net/browse/JMC-5458). > > Hi Jessye! Looks good, but the testClearAllTransforms tests should really validate that the byte code no longer contains the emission of the events. Also, since the test execution order can't be known, the clear all transforms test should first attempt to transform. Also - the JMX API should really, really not return (potentially serialize) classes, but I will open a separate issue for this, as it is not related to this PR. With huge help from @tabjy in https://github.com/openjdk/jmc/pull/23/commits/dc2c00b5da05bcb584fb83f7bac1893452bb0c9d I have made the two previous tests, testSetTransforms and testClearAllTransforms, into one testSetTransforms test. I did this to make one non redundant test because as mentioned, before testing the clearing of all transforms, transforms have to be applied first, which is what testSetTransforms was previously doing . In this patch testSetTransforms has been modified to transform a method with an event that throws a run time exception. To test that the byte code actually gets instrumented the transformed method is ran and checked to see that this run time exception is fired. Similarly, clearing all transforms is tested by rerunning this method and ensuring that the exception is not fired. ------------- PR: https://git.openjdk.java.net/jmc/pull/23 From hirt at openjdk.java.net Wed Jan 8 19:29:01 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 8 Jan 2020 19:29:01 GMT Subject: [Rev 01] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: On Wed, 8 Jan 2020 19:29:00 GMT, Jessye Coleman-Shapiro wrote: >> This patch addresses [JMC-6658](https://bugs.openjdk.java.net/browse/JMC-6658) and removes the unnecessary storing of pre-instrumented bytecode that was implemented in [JMC-5458](https://bugs.openjdk.java.net/browse/JMC-5458). > > The pull request has been updated with a new target base due to a merge or a rebase. core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java line 101: > 100: injectFailingEvent(); > 101: doSetTransfroms(XML_DESCRIPTION); > 102: try { doSetTransfroms -> doSetTransforms core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java line 105: > 104: } catch (RuntimeException e) { > 105: excpetionThrown = true; > 106: } Typo: excpetionThrown -> exceptionThrown ------------- Changes requested by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/23 From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 8 19:53:31 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 8 Jan 2020 19:53:31 GMT Subject: [Rev 02] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: > This patch addresses [JMC-6658](https://bugs.openjdk.java.net/browse/JMC-6658) and removes the unnecessary storing of pre-instrumented bytecode that was implemented in [JMC-5458](https://bugs.openjdk.java.net/browse/JMC-5458). The pull request has been updated with 1 additional commit. ------------- Added commits: - 846cddff: Fix typos Changes: - all: https://git.openjdk.java.net/jmc/pull/23/files - new: https://git.openjdk.java.net/jmc/pull/23/files/dc2c00b5..846cddff Webrevs: - full: https://webrevs.openjdk.java.net/jmc/23/webrev.02 - incr: https://webrevs.openjdk.java.net/jmc/23/webrev.01-02 Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.java.net/jmc/pull/23.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/23/head:pull/23 PR: https://git.openjdk.java.net/jmc/pull/23 From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 8 19:53:33 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 8 Jan 2020 19:53:33 GMT Subject: [Rev 01] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: <4Ci5xQ9OuWbpzvguKhXloDo_L5TOTQtzgZuX44rPy-0=.9c3ea616-3bfb-4eca-ab5d-a3fb4cfd8ebd@github.com> On Wed, 8 Jan 2020 19:28:04 GMT, Marcus Hirt wrote: >> The pull request has been updated with a new target base due to a merge or a rebase. > > core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java line 105: > >> 104: } catch (RuntimeException e) { >> 105: excpetionThrown = true; >> 106: } > > Typo: excpetionThrown -> exceptionThrown Fixed in https://github.com/openjdk/jmc/pull/23/commits/846cddff4c5d733e7544d096755566bc783cd5bf ------------- PR: https://git.openjdk.java.net/jmc/pull/23 From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 8 19:54:04 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 8 Jan 2020 19:54:04 GMT Subject: [Rev 01] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: On Wed, 8 Jan 2020 19:26:05 GMT, Marcus Hirt wrote: >> The pull request has been updated with a new target base due to a merge or a rebase. > > core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java line 101: > >> 100: injectFailingEvent(); >> 101: doSetTransfroms(XML_DESCRIPTION); >> 102: try { > > Typo: doSetTransfroms -> doSetTransforms Fixed in https://github.com/openjdk/jmc/pull/23/commits/846cddff4c5d733e7544d096755566bc783cd5bf ------------- PR: https://git.openjdk.java.net/jmc/pull/23 From hirt at openjdk.java.net Thu Jan 9 14:21:27 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 9 Jan 2020 14:21:27 GMT Subject: [Rev 02] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: On Thu, 9 Jan 2020 14:21:26 GMT, Jessye Coleman-Shapiro wrote: >> This patch addresses [JMC-6658](https://bugs.openjdk.java.net/browse/JMC-6658) and removes the unnecessary storing of pre-instrumented bytecode that was implemented in [JMC-5458](https://bugs.openjdk.java.net/browse/JMC-5458). > > The pull request has been updated with 1 additional commit. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/23 From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 10 14:35:28 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 10 Jan 2020 14:35:28 GMT Subject: RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable Message-ID: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> This patch addresses the following issue: When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. ------------- Commits: - cd97aca3: Add ability to remove the 'Showing X of Y events...' table message Changes: https://git.openjdk.java.net/jmc/pull/28/files Webrev: https://webrevs.openjdk.java.net/jmc/28/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6659 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/28.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/28/head:pull/28 PR: https://git.openjdk.java.net/jmc/pull/28 From jkang at openjdk.java.net Fri Jan 10 15:12:27 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Fri, 10 Jan 2020 15:12:27 GMT Subject: RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: On Fri, 10 Jan 2020 14:34:27 GMT, Jessye Coleman-Shapiro wrote: > This patch addresses the following issue: > > When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. > ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) > > This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. Could the change be made to the user of this class? ExtraRowTableViewer could be used elsewhere for showing any kind of extra message not necessarily related to x of y events; maybe some text they always want to show. Then applying this logic wouldn't make sense. ------------- PR: https://git.openjdk.java.net/jmc/pull/28 From aptmac at openjdk.java.net Fri Jan 10 15:13:12 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Fri, 10 Jan 2020 15:13:12 GMT Subject: RFR: 6364: Improvements to the Thread Graph Message-ID: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> This patch addresses JMC-6364 [[0]](https://bugs.openjdk.java.net/browse/JMC-6364), the epic for tracking Improvements to the JFR Thread Graph. This RFR is also a follow-up to an RFC [[1]](http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html) that was posted to the jmc-dev list and incorporates the feedback that was brought up during discussion. The new design and features was imagined in collaboration with our UX team, and the implementation has been a joint effort between myself and Jessye (@jessyec-s) - we had been originally collaborating on a fork of the old (unofficial) JMC GitHub repo. I've folded all the commits down into one because the older commits were merged using PRs with a similar format (e.g., `jmc/pull/23`) to this repo, so to avoid accidental noise (sorry about that) on other PRs I've just folded them away. If anyone is interested in the individual commits that got to this point, I've kept them around in the old repo [[2]](https://github.com/aptmac/jmc-old/commits/jfr-threads-page). This PR aims to improve the usability and functionality of the JFR Threads Page by extending and enhancing existing classes. In an attempt to not clutter this PR with lots of images and explanatory text, I've created a gist [[3]](https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36) that provides information and images/gifs of the new components and intended functionality. Gist: https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 Summary of changes: - Introduction of canvases to display the thread names (left) and timeline (bottom) - Scrolled composites to house the text and chart canvases, for vertical scrolling of the chart area - Timeline canvas (bottom) is draggable for panning the chart - Current threads table has been re-located to a popup table - New filter bar (top) which alters the chart view based on time ranges and desired visible activity lanes - New display bar (right) which houses the zoom mechanics - New zoom pan component for easily navigating the chart - Introduction of a colour palette to increase contrast between neighbouring activity lanes - Controls to change the height of the thread lanes - updated and new uitests Before: ![before](https://i.imgur.com/TNfGrtJ.png) After: ![after](https://user-images.githubusercontent.com/10425301/71993902-dfd93200-3205-11ea-8249-cc50409a7a9f.png) Let me know if you have any questions about the design & functionality. [0] https://bugs.openjdk.java.net/browse/JMC-6364 [1] http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html [2] https://github.com/aptmac/jmc-old/commits/jfr-threads-page [3] https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 ------------- Commits: - 5dc0e35f: re-ran mvn spotless:apply with the uitest profile active - 8b53fd7d: cleaned up formatting issues by running mvn spotless:apply - 157a98ab: 6364: Improvements to the Thread Graph Changes: https://git.openjdk.java.net/jmc/pull/27/files Webrev: https://webrevs.openjdk.java.net/jmc/27/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6364 Stats: 4087 lines in 43 files changed: 3943 ins; 38 del; 106 mod Patch: https://git.openjdk.java.net/jmc/pull/27.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/27/head:pull/27 PR: https://git.openjdk.java.net/jmc/pull/27 From jkang at openjdk.java.net Fri Jan 10 15:13:12 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Fri, 10 Jan 2020 15:13:12 GMT Subject: RFR: 6364: Improvements to the Thread Graph In-Reply-To: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> References: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> Message-ID: <9z2_Fmh0wzUWsp9Tu1bEudv8_BvAjeAC6RVPPe76FRQ=.1d13e3bc-3d48-4a9b-831f-40b784d57106@github.com> On Wed, 8 Jan 2020 15:59:38 GMT, Alex Macdonald wrote: > This patch addresses JMC-6364 [[0]](https://bugs.openjdk.java.net/browse/JMC-6364), the epic for tracking Improvements to the JFR Thread Graph. This RFR is also a follow-up to an RFC [[1]](http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html) that was posted to the jmc-dev list and incorporates the feedback that was brought up during discussion. > > The new design and features was imagined in collaboration with our UX team, and the implementation has been a joint effort between myself and Jessye (@jessyec-s) - we had been originally collaborating on a fork of the old (unofficial) JMC GitHub repo. I've folded all the commits down into one because the older commits were merged using PRs with a similar format (e.g., `jmc/pull/23`) to this repo, so to avoid accidental noise (sorry about that) on other PRs I've just folded them away. If anyone is interested in the individual commits that got to this point, I've kept them around in the old repo [[2]](https://github.com/aptmac/jmc-old/commits/jfr-threads-page). > > This PR aims to improve the usability and functionality of the JFR Threads Page by extending and enhancing existing classes. In an attempt to not clutter this PR with lots of images and explanatory text, I've created a gist [[3]](https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36) that provides information and images/gifs of the new components and intended functionality. > > Gist: https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 > > Summary of changes: > - Introduction of canvases to display the thread names (left) and timeline (bottom) > - Scrolled composites to house the text and chart canvases, for vertical scrolling of the chart area > - Timeline canvas (bottom) is draggable for panning the chart > - Current threads table has been re-located to a popup table > - New filter bar (top) which alters the chart view based on time ranges and desired visible activity lanes > - New display bar (right) which houses the zoom mechanics > - New zoom pan component for easily navigating the chart > - Introduction of a colour palette to increase contrast between neighbouring activity lanes > - Controls to change the height of the thread lanes > - updated and new uitests > > Before: > ![before](https://i.imgur.com/TNfGrtJ.png) > > After: > ![after](https://user-images.githubusercontent.com/10425301/71993902-dfd93200-3205-11ea-8249-cc50409a7a9f.png) > > Let me know if you have any questions about the design & functionality. > > [0] https://bugs.openjdk.java.net/browse/JMC-6364 > [1] http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html > [2] https://github.com/aptmac/jmc-old/commits/jfr-threads-page > [3] https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 jcheck is requesting: s/JMC-6364/6364 ------------- PR: https://git.openjdk.java.net/jmc/pull/27 From aptmac at openjdk.java.net Fri Jan 10 15:14:37 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Fri, 10 Jan 2020 15:14:37 GMT Subject: RFR: 6364: Improvements to the Thread Graph In-Reply-To: <9z2_Fmh0wzUWsp9Tu1bEudv8_BvAjeAC6RVPPe76FRQ=.1d13e3bc-3d48-4a9b-831f-40b784d57106@github.com> References: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> <9z2_Fmh0wzUWsp9Tu1bEudv8_BvAjeAC6RVPPe76FRQ=.1d13e3bc-3d48-4a9b-831f-40b784d57106@github.com> Message-ID: On Fri, 10 Jan 2020 14:00:27 GMT, Jie Kang wrote: >> This patch addresses JMC-6364 [[0]](https://bugs.openjdk.java.net/browse/JMC-6364), the epic for tracking Improvements to the JFR Thread Graph. This RFR is also a follow-up to an RFC [[1]](http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html) that was posted to the jmc-dev list and incorporates the feedback that was brought up during discussion. >> >> The new design and features was imagined in collaboration with our UX team, and the implementation has been a joint effort between myself and Jessye (@jessyec-s) - we had been originally collaborating on a fork of the old (unofficial) JMC GitHub repo. I've folded all the commits down into one because the older commits were merged using PRs with a similar format (e.g., `jmc/pull/23`) to this repo, so to avoid accidental noise (sorry about that) on other PRs I've just folded them away. If anyone is interested in the individual commits that got to this point, I've kept them around in the old repo [[2]](https://github.com/aptmac/jmc-old/commits/jfr-threads-page). >> >> This PR aims to improve the usability and functionality of the JFR Threads Page by extending and enhancing existing classes. In an attempt to not clutter this PR with lots of images and explanatory text, I've created a gist [[3]](https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36) that provides information and images/gifs of the new components and intended functionality. >> >> Gist: https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 >> >> Summary of changes: >> - Introduction of canvases to display the thread names (left) and timeline (bottom) >> - Scrolled composites to house the text and chart canvases, for vertical scrolling of the chart area >> - Timeline canvas (bottom) is draggable for panning the chart >> - Current threads table has been re-located to a popup table >> - New filter bar (top) which alters the chart view based on time ranges and desired visible activity lanes >> - New display bar (right) which houses the zoom mechanics >> - New zoom pan component for easily navigating the chart >> - Introduction of a colour palette to increase contrast between neighbouring activity lanes >> - Controls to change the height of the thread lanes >> - updated and new uitests >> >> Before: >> ![before](https://i.imgur.com/TNfGrtJ.png) >> >> After: >> ![after](https://user-images.githubusercontent.com/10425301/71993902-dfd93200-3205-11ea-8249-cc50409a7a9f.png) >> >> Let me know if you have any questions about the design & functionality. >> >> [0] https://bugs.openjdk.java.net/browse/JMC-6364 >> [1] http://mail.openjdk.java.net/pipermail/jmc-dev/2019-October/001454.html >> [2] https://github.com/aptmac/jmc-old/commits/jfr-threads-page >> [3] https://gist.github.com/aptmac/61808c89bfcf1888080884fc8a61bd36 > > jcheck is requesting: > > s/JMC-6364/6364 > jcheck is requesting: > > s/JMC-6364/6364 Neat, thanks for the heads up. I changed the commit description and force pushed them back here, but it looks like once a PR has been made with the invalid ID format it's the PR name change that gets jcheck to pass. This automation is nice, the `mvn spotless:apply` was especially nice to have. ------------- PR: https://git.openjdk.java.net/jmc/pull/27 From hirt at openjdk.java.net Fri Jan 10 15:59:55 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 10 Jan 2020 15:59:55 GMT Subject: [Integrated] RFR: 6658: Remove unnecessary storing of pre-instrumented bytecode In-Reply-To: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> References: <1Z7bs2mtx6tx71c_9QAAaTRcOXmgvndyX4FE2zlCQCw=.79b5a212-8ad0-4d2a-9e20-0a495f078943@github.com> Message-ID: <7befd1b1-afa5-4168-b0ac-144290ef89b7@openjdk.org> Changeset: 67bc8668 Author: Jessye Coleman-Shapiro Committer: Marcus Hirt Date: 2020-01-10 15:59:20 +0000 URL: https://git.openjdk.java.net/jmc/commit/67bc8668 6658: Remove unnecessary storing of pre-instrumented bytecode Reviewed-by: hirt ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/TransformRegistry.java ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/Transformer.java ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/impl/DefaultTransformRegistry.java ! core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java From hdafgard at openjdk.java.net Fri Jan 10 16:06:07 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Fri, 10 Jan 2020 16:06:07 GMT Subject: [Rev 01] RFR: 5721: Reintroduce the Percentage column In-Reply-To: <48uTfzrJj_PisNEMpIkEKE_8BCpkw9v0cbbhBWGtVG4=.6b089079-91ef-4fd1-83d4-d4b55b4b7503@github.com> References: <6xxEdn0pmrGCcBbu3ONWdZ3C06ED04eg3H_0OZQfxRw=.3e084af0-b37d-42d1-8457-b27dab8e6239@github.com> <48uTfzrJj_PisNEMpIkEKE_8BCpkw9v0cbbhBWGtVG4=.6b089079-91ef-4fd1-83d4-d4b55b4b7503@github.com> Message-ID: <-7m3WlvSMIDYFnUhFXoy8emjkiVaMA5oMNvRjVkVaQw=.d0428330-91a1-4b2c-b403-62578103a718@github.com> On Fri, 10 Jan 2020 16:06:07 GMT, Dmitry Popov wrote: >> This patch addresses [JMC-5721](https://bugs.openjdk.java.net/browse/JMC-5721): Reintroduce the Percentage column. >> >> 1. StacktraceView has been amended to display Percentage column as well it displays stack trace and count ones. Percentage format is #.## (up-to 2 decimal points), it will also arbitrarily round the number. >> 2. Tool tip with frame fraction and sibling groups info has been moved from Count column to Percentage. >> 3. Currently Background drawer decorates Percentage column instead of Count. > > Previous commits in this pull request have been removed, probably due to a force push. The incremental views will show differences compared to the previous content of the PR. ------------- Marked as reviewed by hdafgard (Reviewer). PR: https://git.openjdk.java.net/jmc/pull/12 From kxu at openjdk.java.net Fri Jan 10 18:33:58 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 10 Jan 2020 18:33:58 GMT Subject: [Rev 04] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: > This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). > > In the xml configuration, a field capture looks like: > > a field value > a field value capture with a path syntax > this.field.prop > > See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. > > There are currently two limitations to pay attention to: > > 1. Instrumentation point cannot be in synthesized classes: > Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. > > 2. Instrumentation is unable to access nestmates' private fields: > Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. > > Please let me know your thoughts. Thank you very much! The pull request has been updated with a new target base due to a merge or a rebase. ------------- Commits: - 4bb163b9: update TestSetTransforms with new changes - 04185668: Merge remote-tracking branch 'upstream/master' into agent-path-expression - c78ce947: lazy-load class with InspectionClassLoader - c35788f2: add javadoc - 9782c758: update license header year - caaa7e7e: resolve conflicts after merging from master - 3383c080: Merge branch 'master' into agent-path-expression - a3e0c61e: error on private member access between nestmates - 5c19b765: add test cases for field capture feature - e05ea8bf: support legacy JFR api - 1019ca0d: change indentations to using tabs. add license headers - 1c7b0ac6: rename "watch" to "field" - e93a31e2: refactor error handling. cache resolved reference chain - 92b92502: add a QualifiedThisReference only when making qualified .this or .super - db3d6266: WIP: refactor - 040a42d8: add final modifiers - a803e7e7: remove unnecessary null checks - af33e32f: implemented path-syntax evaluation - 4cc7b9ea: WIP: add check for access and static context. improves error messages - 036b324e: WIP: state machine for parsing expression - 3f2f4023: WIP: syntax parsing with state machine - b58a44e4: WIP: implement implicit upwards reference in a nest - ad7d64f6: WIP: enforce access checks on reference chains - 5e46ed6f: WIP: avoid loading instrumentation pending classes with parent loader - 1964111f: WIP: fix loading "this" - 74624291: WIP: BCI agent path-syntax evaluation Changes: https://git.openjdk.java.net/jmc/pull/20/files Webrev: https://webrevs.openjdk.java.net/jmc/20/webrev.04 Stats: 2403 lines in 24 files changed: 2306 ins; 1 del; 96 mod Patch: https://git.openjdk.java.net/jmc/pull/20.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/20/head:pull/20 PR: https://git.openjdk.java.net/jmc/pull/20 From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 10 20:02:33 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 10 Jan 2020 20:02:33 GMT Subject: [Rev 01] RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: > This patch addresses the following issue: > > When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. > ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) > > This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. The pull request has been updated with 1 additional commit. ------------- Added commits: - fec30fd1: Move fix to base class Changes: - all: https://git.openjdk.java.net/jmc/pull/28/files - new: https://git.openjdk.java.net/jmc/pull/28/files/cd97aca3..fec30fd1 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/28/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/28/webrev.00-01 Stats: 32 lines in 3 files changed: 27 ins; 4 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/28.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/28/head:pull/28 PR: https://git.openjdk.java.net/jmc/pull/28 From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 10 20:09:05 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 10 Jan 2020 20:09:05 GMT Subject: RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: On Fri, 10 Jan 2020 15:12:18 GMT, Jie Kang wrote: >> This patch addresses the following issue: >> >> When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. >> ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) >> >> This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. > > Could the change be made to the user of this class? ExtraRowTableViewer could be used elsewhere for showing any kind of extra message not necessarily related to x of y events; maybe some text they always want to show. Then applying this logic wouldn't make sense. In https://github.com/openjdk/jmc/pull/28/commits/fec30fd19289b4b2446f242723a6e7e7ee2b98d4 I have modified this patch to be implemented in the users of the ExtraRowTableViewer class instead of the class itself. This is keep the functionality of the ExtraRowTableViewer class more general as @jiekang mentioned. ------------- PR: https://git.openjdk.java.net/jmc/pull/28 From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 10 20:23:17 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 10 Jan 2020 20:23:17 GMT Subject: [Rev 02] RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: > This patch addresses the following issue: > > When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. > ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) > > This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. The pull request has been updated with 1 additional commit. ------------- Added commits: - fa8bf0bd: Fix formatting errors Changes: - all: https://git.openjdk.java.net/jmc/pull/28/files - new: https://git.openjdk.java.net/jmc/pull/28/files/fec30fd1..fa8bf0bd Webrevs: - full: https://webrevs.openjdk.java.net/jmc/28/webrev.02 - incr: https://webrevs.openjdk.java.net/jmc/28/webrev.01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/28.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/28/head:pull/28 PR: https://git.openjdk.java.net/jmc/pull/28 From mwengner at openjdk.java.net Sun Jan 12 19:43:38 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Sun, 12 Jan 2020 19:43:38 GMT Subject: RFR: 6549: Color flame chart based on package name Message-ID: implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 additionally: 1. fixed issue with displaying big data set in flameview 2. improved display speed comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. conclusion: the flameview is always displayed ------------- Commits: - c173c1cf: 6549: Color flame chart based on package name Changes: https://git.openjdk.java.net/jmc/pull/29/files Webrev: https://webrevs.openjdk.java.net/jmc/29/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6549 Stats: 162 lines in 5 files changed: 151 ins; 1 del; 10 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 00:08:04 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 00:08:04 GMT Subject: RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: <5IxfI_JttZ54ndevl-V8G_jdsX7t61wU3XW0OAgxNp0=.20357fab-8034-4f0f-b8d3-7eaded3f7f86@github.com> On Sun, 12 Jan 2020 19:41:43 GMT, Miroslav Wengner wrote: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 78: > 77: const modulo = function(a, b){ > 78: if (b === 0 || isNaN(a) || isNaN(b)) { > 79: return NaN; This JavaScript is imported as is into the template right? No template replacements. I think you should be able to just use the modulo operator. ------------- Changes requested by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 00:09:16 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 00:09:16 GMT Subject: RFR: 6549: Color flame chart based on package name In-Reply-To: <5IxfI_JttZ54ndevl-V8G_jdsX7t61wU3XW0OAgxNp0=.20357fab-8034-4f0f-b8d3-7eaded3f7f86@github.com> References: <5IxfI_JttZ54ndevl-V8G_jdsX7t61wU3XW0OAgxNp0=.20357fab-8034-4f0f-b8d3-7eaded3f7f86@github.com> Message-ID: On Mon, 13 Jan 2020 00:07:50 GMT, Marcus Hirt wrote: >> implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 >> additionally: >> 1. fixed issue with displaying big data set in flameview >> 2. improved display speed >> >> comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. >> conclusion: the flameview is always displayed > > Also formatting errors. Try mvn spotless:check to see your formatting errors. Usually mvn spotless:apply will fix them for you. ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hdafgard at openjdk.java.net Mon Jan 13 12:19:53 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 13 Jan 2020 12:19:53 GMT Subject: [Integrated] RFR: 5721: Reintroduce the Percentage column In-Reply-To: <6xxEdn0pmrGCcBbu3ONWdZ3C06ED04eg3H_0OZQfxRw=.3e084af0-b37d-42d1-8457-b27dab8e6239@github.com> References: <6xxEdn0pmrGCcBbu3ONWdZ3C06ED04eg3H_0OZQfxRw=.3e084af0-b37d-42d1-8457-b27dab8e6239@github.com> Message-ID: Changeset: 0f08461f Author: Dmitry Popov Committer: Henrik Dafg?rd Date: 2020-01-13 12:19:09 +0000 URL: https://git.openjdk.java.net/jmc/commit/0f08461f 5721: Reintroduce the Percentage column Reviewed-by: hdafgard ! application/l10n/org.openjdk.jmc.flightrecorder.ui.ja/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages_ja.properties ! application/l10n/org.openjdk.jmc.flightrecorder.ui.zh_CN/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages_zh_CN.properties ! 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/views/stacktrace/StacktraceView.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/resources/org/openjdk/jmc/flightrecorder/ui/messages/internal/messages.properties From mwengner at openjdk.java.net Mon Jan 13 12:27:53 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 12:27:53 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. ------------- Added commits: - 4d6f5838: 6549: Color flame chart based on package name - b051b390: Merge branch 'master' of https://github.com/openjdk/jmc into feature/JMC_6549_color_flame_chart_based_packagename - 67bc8668: 6658: Remove unnecessary storing of pre-instrumented bytecode Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/c173c1cf..4d6f5838 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.00-01 Stats: 186 lines in 8 files changed: 77 ins; 71 del; 38 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 12:32:23 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 12:32:23 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: <5IxfI_JttZ54ndevl-V8G_jdsX7t61wU3XW0OAgxNp0=.20357fab-8034-4f0f-b8d3-7eaded3f7f86@github.com> References: <5IxfI_JttZ54ndevl-V8G_jdsX7t61wU3XW0OAgxNp0=.20357fab-8034-4f0f-b8d3-7eaded3f7f86@github.com> Message-ID: <7eq_jYs_FFhhtdMLJk6rslTI_XeqqA4f_QC9SlbIMpA=.cfa564cc-d189-455e-82ef-d8ca6fc20a1b@github.com> On Mon, 13 Jan 2020 00:07:20 GMT, Marcus Hirt wrote: >> The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 78: > >> 77: const modulo = function(a, b){ >> 78: if (b === 0 || isNaN(a) || isNaN(b)) { >> 79: return NaN; > > This JavaScript is imported as is into the template right? No template replacements. I think you should be able to just use the modulo operator. corrected and tested ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 13:41:23 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 13:41:23 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 13:41:21 GMT, Miroslav Wengner wrote: >> implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 >> additionally: >> 1. fixed issue with displaying big data set in flameview >> 2. improved display speed >> >> comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. >> conclusion: the flameview is always displayed > > The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 39: > 38: const packageMarkerSelected = getPackageMarker(packageNameStrip); > 39: > 40: const packageNameStripHash = packageNameStrip.hashCode(); Formatting looks funny here. application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 92: > 91: return d.data.n + "\u003Cbr\u002F\u003Epackage: " + d.data.p + "\u003Cbr\u002F\u003Esamples: " + d.data.v; > 92: }; Perhaps add newline here. ------------- Changes requested by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/29 From kxu at openjdk.java.net Mon Jan 13 16:35:02 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Mon, 13 Jan 2020 16:35:02 GMT Subject: [Rev 05] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: > This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). > > In the xml configuration, a field capture looks like: > > a field value > a field value capture with a path syntax > this.field.prop > > See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. > > There are currently two limitations to pay attention to: > > 1. Instrumentation point cannot be in synthesized classes: > Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. > > 2. Instrumentation is unable to access nestmates' private fields: > Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. > > Please let me know your thoughts. Thank you very much! The pull request has been updated with 1 additional commit. ------------- Added commits: - f7c3e52e: empty commit to force re-trigger github actions Changes: - all: https://git.openjdk.java.net/jmc/pull/20/files - new: https://git.openjdk.java.net/jmc/pull/20/files/4bb163b9..f7c3e52e Webrevs: - full: https://webrevs.openjdk.java.net/jmc/20/webrev.05 - incr: https://webrevs.openjdk.java.net/jmc/20/webrev.04-05 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/20.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/20/head:pull/20 PR: https://git.openjdk.java.net/jmc/pull/20 From kxu at openjdk.java.net Mon Jan 13 16:52:28 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Mon, 13 Jan 2020 16:52:28 GMT Subject: [Rev 06] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: <55U3P5dsnqhOUnqkYe7DCIKyCTkDSmB-KCOAP278eyc=.4bc8eb23-d9a4-4ae0-9678-ea36c22c014f@github.com> > This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). > > In the xml configuration, a field capture looks like: > > a field value > a field value capture with a path syntax > this.field.prop > > See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. > > There are currently two limitations to pay attention to: > > 1. Instrumentation point cannot be in synthesized classes: > Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. > > 2. Instrumentation is unable to access nestmates' private fields: > Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. > > Please let me know your thoughts. Thank you very much! Previous commits in this pull request have been removed, probably due to a force push. The incremental views will show differences compared to the previous content of the PR. ------------- Added commits: - 09abbb99: remove unused function Changes: - all: https://git.openjdk.java.net/jmc/pull/20/files - new: https://git.openjdk.java.net/jmc/pull/20/files/f7c3e52e..09abbb99 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/20/webrev.06 - incr: https://webrevs.openjdk.java.net/jmc/20/webrev.05-06 Stats: 24 lines in 1 file changed: 0 ins; 24 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/20.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/20/head:pull/20 PR: https://git.openjdk.java.net/jmc/pull/20 From mwengner at openjdk.java.net Mon Jan 13 18:16:35 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 18:16:35 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 13:39:58 GMT, Marcus Hirt wrote: >> The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 39: > >> 38: const packageMarkerSelected = getPackageMarker(packageNameStrip); >> 39: >> 40: const packageNameStripHash = packageNameStrip.hashCode(); > > Formatting looks funny here. I've not spot anything unusual. IDE gives me such formatting by default ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 18:17:56 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 18:17:56 GMT Subject: [Rev 02] RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: On Mon, 13 Jan 2020 18:17:56 GMT, Jessye Coleman-Shapiro wrote: >> This patch addresses the following issue: >> >> When a table made with an itemList has more rows than the set maximum that can be shown, it displays a message "Showing X of Y events..." in its last row. This message is not removed if a search is performed on the table that results in fewer then the maximum number of events being displayed. For example, this is seen in the Exceptions page in the Event Log table. >> ![table-example](https://user-images.githubusercontent.com/29706926/72159945-6cf9c380-338b-11ea-9f32-0fd3a6654709.png) >> >> This patch makes the 'Showing X of Y events...' table message disappear when less than the maximum number of events that can be displayed populate a table. > > The pull request has been updated with 1 additional commit. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/28 From hirt at openjdk.java.net Mon Jan 13 18:23:46 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 18:23:46 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 18:16:29 GMT, Miroslav Wengner wrote: >> application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 39: >> >>> 38: const packageMarkerSelected = getPackageMarker(packageNameStrip); >>> 39: >>> 40: const packageNameStripHash = packageNameStrip.hashCode(); >> >> Formatting looks funny here. > > I've not spot anything unusual. IDE gives me such formatting by default Indentation level looks like it is different for packageMarkerSelected and packageNameStripHash, but it should not be. I would also remove the new line. ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 19:00:16 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 19:00:16 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 18:23:37 GMT, Marcus Hirt wrote: >> I've not spot anything unusual. IDE gives me such formatting by default > > Indentation level looks like it is different for packageMarkerSelected and packageNameStripHash, but it should not be. I would also remove the new line. corrected ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hdafgard at openjdk.java.net Mon Jan 13 19:11:30 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 13 Jan 2020 19:11:30 GMT Subject: RFR: 6671: Eagerly convert end time to the same unit as start time Message-ID: Set event end time to use the same unit as start time when accessing the values, rather than when comparing between them. ------------- Commits: - f27518aa: Eagerly convert end time to the same unit as start time Changes: https://git.openjdk.java.net/jmc/pull/30/files Webrev: https://webrevs.openjdk.java.net/jmc/30/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6671 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/30.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/30/head:pull/30 PR: https://git.openjdk.java.net/jmc/pull/30 From hirt at openjdk.java.net Mon Jan 13 19:14:58 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 19:14:58 GMT Subject: RFR: 6671: Eagerly convert end time to the same unit as start time In-Reply-To: References: Message-ID: <6hBE9MdbKgTfJNp4if9Blhcj7-SzEAdqRlkVo5v5Bxw=.3cb9be46-d3a8-45d5-9c05-1b0158177fdd@github.com> On Mon, 13 Jan 2020 19:10:11 GMT, Henrik Dafg?rd wrote: > Set event end time to use the same unit as start time when accessing the values, rather than when comparing between them. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/30 From mwengner at openjdk.java.net Mon Jan 13 19:36:54 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 19:36:54 GMT Subject: [Rev 02] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: <8hrSWZVfHJOy7BNm0l76vn_jMGa5astJc9LKgYUmcfo=.de79fd8a-70ab-4d1c-b093-a6d2f1f2b857@github.com> > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - daf8a309: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/4d6f5838..daf8a309 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.02 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.01-02 Stats: 13 lines in 1 file changed: 8 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 19:42:09 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 19:42:09 GMT Subject: [Rev 03] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. ------------- Added commits: - 9970ca65: Merge branch 'master' of https://github.com/openjdk/jmc into feature/JMC_6549_color_flame_chart_based_packagename - 0f08461f: 5721: Reintroduce the Percentage column Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/daf8a309..9970ca65 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.03 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.02-03 Stats: 23 lines in 5 files changed: 16 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 19:48:11 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 19:48:11 GMT Subject: [Rev 04] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - 59afc3d9: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/9970ca65..59afc3d9 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.04 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 19:58:59 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 19:58:59 GMT Subject: [Rev 05] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - be283068: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/59afc3d9..be283068 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.05 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.04-05 Stats: 7 lines in 1 file changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 20:34:22 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 20:34:22 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 13:41:02 GMT, Marcus Hirt wrote: >> The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. > > Still a few confusing colorings for JDK base packages. We want java.*, sun.*, com.sun.* to be grey. (Come to think of it, we probably want to add jdk.* classes to the grey ones too.) And we've said that we want the really core public APIs to be lighter grey and the most internal ones be a darker grey. To me, that means that java.lang should probably be a smidge lighter than java.util. And sun.* be darker than com.sun. We may want to set the colors for these packages, and some other popular ones, like java.io, java.nio ourselves. Or simply have one lighter grey for java.*, one a little bit darker for com.sun.* and jdk.*, and a dark one for sun.*. None with any other hint of color in them (equal amounts of R, G and B). ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 20:39:36 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 20:39:36 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 20:33:43 GMT, Marcus Hirt wrote: >> > > Still a few confusing colorings for JDK base packages. We want java.*, sun.*, com.sun.* to be grey. (Come to think of it, we probably want to add jdk.* classes to the grey ones too.) And we've said that we want the really core public APIs to be lighter grey and the most internal ones be a darker grey. To me, that means that java.lang should probably be a smidge lighter than java.util. And sun.* be darker than com.sun. We may want to set the colors for these packages, and some other popular ones, like java.io, java.nio ourselves. Or simply have one lighter grey for java.*, one a little bit darker for com.sun.* and jdk.*, and a dark one for sun.*. None with any other hint of color in them (equal amounts of R, G and B). I think the last (easiest) alternative is probably quite okay since: 1. You typically care less about the JDK classes (you're normally not interested in changing them). 2. The fact that package transitions in JDK classes are less obvious with the easy pure grey coloring scheme is outweighed by reliably being able to identify them as JDK classes (if it's a pure grey, it's JDK). ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Mon Jan 13 20:45:51 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 13 Jan 2020 20:45:51 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 20:39:24 GMT, Marcus Hirt wrote: >> Still a few confusing colorings for JDK base packages. We want java.*, sun.*, com.sun.* to be grey. (Come to think of it, we probably want to add jdk.* classes to the grey ones too.) And we've said that we want the really core public APIs to be lighter grey and the most internal ones be a darker grey. To me, that means that java.lang should probably be a smidge lighter than java.util. And sun.* be darker than com.sun. We may want to set the colors for these packages, and some other popular ones, like java.io, java.nio ourselves. Or simply have one lighter grey for java.*, one a little bit darker for com.sun.* and jdk.*, and a dark one for sun.*. None with any other hint of color in them (equal amounts of R, G and B). > > I think the last (easiest) alternative is probably quite okay since: > 1. You typically care less about the JDK classes (you're normally not interested in changing them). > 2. The fact that package transitions in JDK classes are less obvious with the easy pure grey coloring scheme is outweighed by reliably being able to identify them as JDK classes (if it's a pure grey, it's JDK). So, in other words, these simple semantics: 1. Is it a standard public Java JDK API -> light grey. 2. Is it a public non-standard Java JDK API -> medium grey. 3. Is it an internal Java JDK API -> dark grey. ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hdafgard at openjdk.java.net Mon Jan 13 21:34:50 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 13 Jan 2020 21:34:50 GMT Subject: [Integrated] RFR: 6671: Eagerly convert end time to the same unit as start time In-Reply-To: References: Message-ID: <91bbe06d-bca9-4e66-8605-b682bb59042a@openjdk.org> Changeset: bfb23cde Author: Henrik Dafg?rd Date: 2020-01-13 21:33:40 +0000 URL: https://git.openjdk.java.net/jmc/commit/bfb23cde 6671: Eagerly convert end time to the same unit as start time Reviewed-by: hirt ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/util/DisjointBuilder.java From mwengner at openjdk.java.net Mon Jan 13 22:13:31 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 22:13:31 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: On Mon, 13 Jan 2020 20:45:20 GMT, Marcus Hirt wrote: >> I think the last (easiest) alternative is probably quite okay since: >> 1. You typically care less about the JDK classes (you're normally not interested in changing them). >> 2. The fact that package transitions in JDK classes are less obvious with the easy pure grey coloring scheme is outweighed by reliably being able to identify them as JDK classes (if it's a pure grey, it's JDK). > > So, in other words, these simple semantics: > 1. Is it a standard public Java JDK API -> light grey. > 2. Is it a public non-standard Java JDK API -> medium grey. > 3. Is it an internal Java JDK API -> dark grey. I thing that such coloring makes things simpler. I've modified the colors: 1. standard public (java.*) -> light grey 2. public non-standard (com.sun.*, jdk.*) -> dark grey 3. internal (sun.*) -> grey scale according to the semantic is from Lighter to Darker (1,2,3) ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Mon Jan 13 22:17:06 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 13 Jan 2020 22:17:06 GMT Subject: [Rev 06] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - 53b90b12: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/be283068..53b90b12 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.06 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.05-06 Stats: 18 lines in 1 file changed: 0 ins; 9 del; 9 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From mwengner at openjdk.java.net Tue Jan 14 07:13:57 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Tue, 14 Jan 2020 07:13:57 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> Message-ID: <62RUPmGpB1Bwg13hAjgVSXDhsc1sMUv9-u_vBC15-pw=.9556f3bf-50fb-4544-8285-11cdadc74219@github.com> On Mon, 13 Jan 2020 22:08:19 GMT, Miroslav Wengner wrote: >> So, in other words, these simple semantics: >> 1. Is it a standard public Java JDK API -> light grey. >> 2. Is it a public non-standard Java JDK API -> medium grey. >> 3. Is it an internal Java JDK API -> dark grey. > > I thing that such coloring makes things simpler. I've modified the colors: > > 1. standard public (java.*) -> light grey > 2. public non-standard (com.sun.*, jdk.*) -> dark grey > 3. internal (sun.*) -> grey > scale according to the semantic is from Lighter to Darker (1,2,3) looks like the job has been terminated for windows. ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Tue Jan 14 12:14:31 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 12:14:31 GMT Subject: [Rev 06] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: <7JKjsSro-czIrvqb8I28JBVLdpGtcHW-OMa2aRmKgPw=.f8be3836-13c5-4a8d-a687-2b9ea12e3909@github.com> On Thu, 19 Dec 2019 12:05:17 GMT, Marcus Hirt wrote: >> Previous commits in this pull request have been removed, probably due to a force push. The incremental views will show differences compared to the previous content of the PR. > > First quick review. Will take a closer look as soon as I can find some more time. All copyrights need to have 2020 added now, like so: * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. Happy New Year! :) ------------- PR: https://git.openjdk.java.net/jmc/pull/20 From hirt at openjdk.java.net Tue Jan 14 12:16:53 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 12:16:53 GMT Subject: [Integrated] RFR: 6659: Remove 'Showing X of Y events...' table message when not applicable In-Reply-To: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> References: <_OYHr-aREyM4qKoWpexU3IMTNCvrgwOBNUdMopW0dvk=.6cb7ce47-7324-4955-b800-bf1c6a53b577@github.com> Message-ID: Changeset: 055db4fc Author: Jessye Coleman-Shapiro Committer: Marcus Hirt Date: 2020-01-14 12:16:15 +0000 URL: https://git.openjdk.java.net/jmc/commit/055db4fc 6659: Remove 'Showing X of Y events...' table message when not applicable Reviewed-by: hirt ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ExtraRowTableViewer.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/FilterComponent.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/common/ItemList.java From hirt at openjdk.java.net Tue Jan 14 12:19:43 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 12:19:43 GMT Subject: [Rev 01] RFR: 6549: Color flame chart based on package name In-Reply-To: <62RUPmGpB1Bwg13hAjgVSXDhsc1sMUv9-u_vBC15-pw=.9556f3bf-50fb-4544-8285-11cdadc74219@github.com> References: <9-KKCnb1k5TSbULJa9u5Dk6OWdHDHrIfBgjiUB5a0xE=.7e394362-66cf-4080-8d38-6069b9a94ff6@github.com> <62RUPmGpB1Bwg13hAjgVSXDhsc1sMUv9-u_vBC15-pw=.9556f3bf-50fb-4544-8285-11cdadc74219@github.com> Message-ID: On Tue, 14 Jan 2020 07:13:42 GMT, Miroslav Wengner wrote: >> I thing that such coloring makes things simpler. I've modified the colors: >> >> 1. standard public (java.*) -> light grey >> 2. public non-standard (com.sun.*, jdk.*) -> dark grey >> 3. internal (sun.*) -> grey >> scale according to the semantic is from Lighter to Darker (1,2,3) > > looks like the job has been terminated for windows. Copyrights need to be updated, e.g.: * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2020, Datadog, Inc. All rights reserved. ------------- PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Tue Jan 14 12:20:08 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 12:20:08 GMT Subject: RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: On Fri, 20 Dec 2019 11:02:57 GMT, Marcus Hirt wrote: >> @thegreystone >> >> Thanks for taking a look. I have shortened the names and added translations. I am also looking at moving the percentage aggregators (e.g. JdkAggregators.ALLOC_INSIDE_TLAB_SUM_PERCENTAGE) out of core, probably into the TlabPage related code, as well as adding something there to make it a cleaner solution. >> >> It's a bit ugly since the aggregator does not compute a percentage itself. I've been toying with writing some helper classes or functions to work over multiple aggregators and item collections but I haven't come up with anything clean and it's outside the scope of this issue, imo. >> >> @egahlin >> >> Thank you for sharing the screenshot. I like the setup shown there as well. I will see if I can follow-up the changes here with some more adjustments to the Memory/Tlab page UI in JDK Mission Control. >> >> Having the Stacktrace View be generic and available for all pages has made things a bit more complicated to mimic what you have shown. It may be cool to have some kind of extension functionality such that when a page is visited, the page can augment this generic view with additional columns (e.g. to show allocation pressure by method while on the memory page). >> >> Regarding removal of reference to TLAB and having more advanced options via initially hidden features (e.g. columns), I think what you wrote makes sense. It may be that what you described is close to what is in JDK Mission Control. The Memory page shows events by class and includes the percentage column for total allocations. It has initially hidden columns for in/out of TLAB related aggregations. The TLAB page on the other hand, (screenshot in initial description) shows these TLAB events and now by thread or by top method. I think the organization of the UI can be improved and I'm going to think about and potentially propose more changes after this. (I should have also included a screenshot of the Memory page...) > > Yep, it's already split up in a general "Memory" page and a TLAB allocations page (which is located under JVM Internals), and which is already grouped by class. The only missing part would be the "Pressure", which is basically Total Allocation (%), added by Jie's PR. > >> It may be cool to have some kind of extension functionality such that when a page is visited, the page can augment this generic view with additional columns (e.g. to show allocation pressure by method while on the memory page). > > Agreed. I believe this is discussed in another already existing issue. We can start a thread on the dev-list to discuss this in more detail. Note that copyrights need to be updated. ------------- PR: https://git.openjdk.java.net/jmc/pull/21 From jkang at openjdk.java.net Tue Jan 14 16:10:27 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Tue, 14 Jan 2020 16:10:27 GMT Subject: [Rev 05] RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: > This patch addresses https://bugs.openjdk.java.net/browse/JMC-6657, which itself is a clone of https://bugs.openjdk.java.net/browse/JMC-5923 that targets the Memory and TLAB pages, rather than the stacktrace view. > > The ItemHistogram and related classes now have support for Percentage columns that divides the aggregate value for items in a row against the aggregate value for all items in the model. > > This is used in the Memory page to show Total Allocation as a Percentage. The TLAB page is modified to be tabbed and contains two ItemHistograms, one for classifying against Threads (previously existed) and one against Top Methods (new). Both also have two new columns: allocations inside and outside TLABs, as a percentage. > > ![tlab-page](https://user-images.githubusercontent.com/5430520/71093691-b2094c00-2177-11ea-9965-f27948964cd3.png) > TLABs by Top Methods, showcasing sorting by the new percentage column. Together with the stacktrace view, I believe these changes make it easier to see relevant areas of allocation pressure. The pull request has been updated with 1 additional commit. ------------- Added commits: - b118b2a3: Update licenses for year 2020 Changes: - all: https://git.openjdk.java.net/jmc/pull/21/files - new: https://git.openjdk.java.net/jmc/pull/21/files/1aa7e63b..b118b2a3 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/21/webrev.05 - incr: https://webrevs.openjdk.java.net/jmc/21/webrev.04-05 Stats: 13 lines in 13 files changed: 0 ins; 0 del; 13 mod Patch: https://git.openjdk.java.net/jmc/pull/21.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/21/head:pull/21 PR: https://git.openjdk.java.net/jmc/pull/21 From kxu at openjdk.java.net Tue Jan 14 17:18:05 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Tue, 14 Jan 2020 17:18:05 GMT Subject: [Rev 07] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: > This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). > > In the xml configuration, a field capture looks like: > > a field value > a field value capture with a path syntax > this.field.prop > > See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. > > There are currently two limitations to pay attention to: > > 1. Instrumentation point cannot be in synthesized classes: > Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. > > 2. Instrumentation is unable to access nestmates' private fields: > Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. > > Please let me know your thoughts. Thank you very much! The pull request has been updated with 1 additional commit. ------------- Added commits: - 10e48d58: update license header year values Changes: - all: https://git.openjdk.java.net/jmc/pull/20/files - new: https://git.openjdk.java.net/jmc/pull/20/files/09abbb99..10e48d58 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/20/webrev.07 - incr: https://webrevs.openjdk.java.net/jmc/20/webrev.06-07 Stats: 25 lines in 24 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.java.net/jmc/pull/20.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/20/head:pull/20 PR: https://git.openjdk.java.net/jmc/pull/20 From mwengner at openjdk.java.net Tue Jan 14 18:45:03 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Tue, 14 Jan 2020 18:45:03 GMT Subject: [Rev 07] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: <-0xlnpkvkaOsfUnw6NKM5oLG2Q_8ZmYsY4__rB0WCUY=.7a64cd24-f5a7-4a4f-9040-d4a32b98917d@github.com> > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - 738bfe8e: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/53b90b12..738bfe8e Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.07 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.06-07 Stats: 34 lines in 1 file changed: 34 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From hdafgard at openjdk.java.net Tue Jan 14 18:54:34 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Tue, 14 Jan 2020 18:54:34 GMT Subject: RFR: 6674: Optimize finding of first start time and first & last end times Message-ID: This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. ------------- Commits: - f6af24e4: Update RulesToolkit.java - 56a760ef: Optimize sliding window and other start time aggregations Changes: https://git.openjdk.java.net/jmc/pull/31/files Webrev: https://webrevs.openjdk.java.net/jmc/31/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6674 Stats: 123 lines in 10 files changed: 93 ins; 9 del; 21 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From hdafgard at openjdk.java.net Tue Jan 14 18:59:48 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Tue, 14 Jan 2020 18:59:48 GMT Subject: [Rev 01] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: <2mCEyGGcGKiGWvQ_YJ75R2N4-tbKYSMQXRP1LveEuc0=.629a1822-ec93-426e-98e4-bc477c1b4aa5@github.com> > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. The pull request has been updated with 1 additional commit. ------------- Added commits: - 25fb5af9: Update RulesToolkit.java Changes: - all: https://git.openjdk.java.net/jmc/pull/31/files - new: https://git.openjdk.java.net/jmc/pull/31/files/f6af24e4..25fb5af9 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/31/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/31/webrev.00-01 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From hirt at openjdk.java.net Tue Jan 14 19:32:28 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 19:32:28 GMT Subject: RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: On Tue, 14 Jan 2020 18:53:19 GMT, Henrik Dafg?rd wrote: > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. Careful here. They are not sorted on start and end time both, and events are not guaranteed (except that we recommend that this is the case for the events of a particular event type, if at all possible) to be non-overlapping. ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From mwengner at openjdk.java.net Tue Jan 14 22:35:22 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Tue, 14 Jan 2020 22:35:22 GMT Subject: [Rev 08] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: > implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 > additionally: > 1. fixed issue with displaying big data set in flameview > 2. improved display speed > > comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. > conclusion: the flameview is always displayed The pull request has been updated with 1 additional commit. ------------- Added commits: - 6180dd37: 6549: Color flame chart based on package name Changes: - all: https://git.openjdk.java.net/jmc/pull/29/files - new: https://git.openjdk.java.net/jmc/pull/29/files/738bfe8e..6180dd37 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/29/webrev.08 - incr: https://webrevs.openjdk.java.net/jmc/29/webrev.07-08 Stats: 8 lines in 4 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/jmc/pull/29.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/29/head:pull/29 PR: https://git.openjdk.java.net/jmc/pull/29 From hirt at openjdk.java.net Tue Jan 14 23:12:26 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 14 Jan 2020 23:12:26 GMT Subject: [Rev 04] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: On Tue, 14 Jan 2020 23:12:25 GMT, Miroslav Wengner wrote: >> implemented ticket : https://bugs.openjdk.java.net/browse/JMC-6549 >> additionally: >> 1. fixed issue with displaying big data set in flameview >> 2. improved display speed >> >> comments: cell coloring algorithm is based on packageName hash with defined depth to avoid collisions and guarantee same stripPackageName color. >> conclusion: the flameview is always displayed > > The pull request has been updated with 1 additional commit. application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js line 42: > 41: if (packageSelectedColor === undefined) { > 42: const packageMarkerSelected = getPackageMarker(packageNameStrip); > 43: const packageNameStripHash = packageNameStrip.hashCode(); These lines are mixing space and tabs for indentation. The rest of the file is using spaces for indentation. I'd go with tabs throughout the file, since that is used for the rest of the project. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/29 From github.com+29706926+jessyec-s at openjdk.java.net Wed Jan 15 15:09:30 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Wed, 15 Jan 2020 15:09:30 GMT Subject: RFR: 6660: Make JMX API not return classes Message-ID: This patch modifies the JMX API so that functions return void instead of class arrays. The name of the function setTransforms was also changed to defineEventProbes as a result of this change because an mbean function whose name begins with "set", has one parameter and a return type of void, gets registered as a setter not an operation. ------------- Commits: - e935d42d: Make JMX API not return classes Changes: https://git.openjdk.java.net/jmc/pull/32/files Webrev: https://webrevs.openjdk.java.net/jmc/32/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6660 Stats: 356 lines in 6 files changed: 174 ins; 176 del; 6 mod Patch: https://git.openjdk.java.net/jmc/pull/32.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/32/head:pull/32 PR: https://git.openjdk.java.net/jmc/pull/32 From hdafgard at openjdk.java.net Wed Jan 15 17:03:56 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 15 Jan 2020 17:03:56 GMT Subject: RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: On Tue, 14 Jan 2020 19:31:59 GMT, Marcus Hirt wrote: >> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. >> >> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. > > Careful here. They are not sorted on start and end time both, and events are not guaranteed (except that we recommend that this is the case for the events of a particular event type, if at all possible) to be non-overlapping. JMC parser currently guarantees that IItemCollection events are retrieved in sorted, disjoint, lanes. Each event is iterated over in the time that it was emitted, and if there is an overlap then it will be in another lane. This is why we iterate through the IItemCollection and then through the IItemIterable, even if the IItemCollection is filtered to only contain one type. There is still the problem that this relies on the implicit assumption that these lanes are sorted in this fashion, but since we're currently performing a computationally intensive sorting during the parsing we should think about exploiting that fact. ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From hdafgard at openjdk.java.net Wed Jan 15 17:14:02 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 15 Jan 2020 17:14:02 GMT Subject: RFR: 6674: Use try-with-resource in more places and close un-closed resources Message-ID: This PR fixes a few places where we didn't close resources properly before and also changes a number of older usages of IOToolkit to instead use try-with-resource. ------------- Commits: - 3d150a42: Fix formatting - 428e6409: Use auto-closable in more places and close un-closed resources Changes: https://git.openjdk.java.net/jmc/pull/33/files Webrev: https://webrevs.openjdk.java.net/jmc/33/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6674 Stats: 313 lines in 38 files changed: 28 ins; 151 del; 134 mod Patch: https://git.openjdk.java.net/jmc/pull/33.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/33/head:pull/33 PR: https://git.openjdk.java.net/jmc/pull/33 From hirt at openjdk.java.net Wed Jan 15 17:16:55 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 15 Jan 2020 17:16:55 GMT Subject: [Integrated] RFR: 6549: Color flame chart based on package name In-Reply-To: References: Message-ID: <201f2b04-92f4-4628-a095-805b109f81df@openjdk.org> Changeset: f74caa81 Author: Miroslav Wengner Committer: Marcus Hirt Date: 2020-01-15 17:16:02 +0000 URL: https://git.openjdk.java.net/jmc/commit/f74caa81 6549: Color flame chart based on package name Co-authored-by: Marcus Hirt Reviewed-by: hirt ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceNode.java ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java + application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template From hdafgard at openjdk.java.net Wed Jan 15 17:32:06 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 15 Jan 2020 17:32:06 GMT Subject: [Rev 02] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. The pull request has been updated with 1 additional commit. ------------- Added commits: - 9fdd627c: Fix formatting Changes: - all: https://git.openjdk.java.net/jmc/pull/31/files - new: https://git.openjdk.java.net/jmc/pull/31/files/25fb5af9..9fdd627c Webrevs: - full: https://webrevs.openjdk.java.net/jmc/31/webrev.02 - incr: https://webrevs.openjdk.java.net/jmc/31/webrev.01-02 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From hdafgard at openjdk.java.net Wed Jan 15 17:35:27 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Wed, 15 Jan 2020 17:35:27 GMT Subject: [Rev 01] RFR: 6674: Use try-with-resource in more places and close un-closed resources In-Reply-To: References: Message-ID: > This PR fixes a few places where we didn't close resources properly before and also changes a number of older usages of IOToolkit to instead use try-with-resource. The pull request has been updated with 1 additional commit. ------------- Added commits: - be2d6092: Fix formatting in core Changes: - all: https://git.openjdk.java.net/jmc/pull/33/files - new: https://git.openjdk.java.net/jmc/pull/33/files/3d150a42..be2d6092 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/33/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/33/webrev.00-01 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/33.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/33/head:pull/33 PR: https://git.openjdk.java.net/jmc/pull/33 From jkang at openjdk.java.net Wed Jan 15 19:51:08 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 15 Jan 2020 19:51:08 GMT Subject: RFR: 6668: Move org.openjdk.jmc.jdp bundle from application to core Message-ID: Addresses https://bugs.openjdk.java.net/browse/JMC-6668 No code changes were made. ------------- Commits: - 1de78af4: Update licenses for year 2020. Fix some codestyle - 6d02e3dc: Add jdp dependency to application module - 31041d2e: 6668: Move org.openjdk.jmc.jdp bundle from application to core Changes: https://git.openjdk.java.net/jmc/pull/34/files Webrev: https://webrevs.openjdk.java.net/jmc/34/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6668 Stats: 6163 lines in 77 files changed: 3069 ins; 3076 del; 18 mod Patch: https://git.openjdk.java.net/jmc/pull/34.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/34/head:pull/34 PR: https://git.openjdk.java.net/jmc/pull/34 From jkang at openjdk.java.net Wed Jan 15 19:51:49 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 15 Jan 2020 19:51:49 GMT Subject: [Rev 06] RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: <98K_kDEvWOmKRYNY-fbrNTNcO5G9u0LmA5howej904A=.b1c52a6d-7988-4c2b-86a7-0d0b9f93901d@github.com> > This patch addresses https://bugs.openjdk.java.net/browse/JMC-6657, which itself is a clone of https://bugs.openjdk.java.net/browse/JMC-5923 that targets the Memory and TLAB pages, rather than the stacktrace view. > > The ItemHistogram and related classes now have support for Percentage columns that divides the aggregate value for items in a row against the aggregate value for all items in the model. > > This is used in the Memory page to show Total Allocation as a Percentage. The TLAB page is modified to be tabbed and contains two ItemHistograms, one for classifying against Threads (previously existed) and one against Top Methods (new). Both also have two new columns: allocations inside and outside TLABs, as a percentage. > > ![tlab-page](https://user-images.githubusercontent.com/5430520/71093691-b2094c00-2177-11ea-9965-f27948964cd3.png) > TLABs by Top Methods, showcasing sorting by the new percentage column. Together with the stacktrace view, I believe these changes make it easier to see relevant areas of allocation pressure. The pull request has been updated with 1 additional commit. ------------- Added commits: - 867c2bb9: Update licenses with correct year field Changes: - all: https://git.openjdk.java.net/jmc/pull/21/files - new: https://git.openjdk.java.net/jmc/pull/21/files/b118b2a3..867c2bb9 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/21/webrev.06 - incr: https://webrevs.openjdk.java.net/jmc/21/webrev.05-06 Stats: 13 lines in 13 files changed: 0 ins; 0 del; 13 mod Patch: https://git.openjdk.java.net/jmc/pull/21.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/21/head:pull/21 PR: https://git.openjdk.java.net/jmc/pull/21 From hdafgard at openjdk.java.net Thu Jan 16 13:36:08 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Thu, 16 Jan 2020 13:36:08 GMT Subject: RFR: 6668: Move org.openjdk.jmc.jdp bundle from application to core In-Reply-To: References: Message-ID: <6AVpavOTwKdxyS2pxt2HZ7n3nuuKJHeZP0pfB9kQ66M=.849ef59e-e3d9-4db3-b945-206468217c4f@github.com> On Wed, 15 Jan 2020 19:48:49 GMT, Jie Kang wrote: > Addresses https://bugs.openjdk.java.net/browse/JMC-6668 > > No code changes were made. Looks good to me! ------------- Marked as reviewed by hdafgard (Reviewer). PR: https://git.openjdk.java.net/jmc/pull/34 From hdafgard at openjdk.java.net Thu Jan 16 15:54:09 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Thu, 16 Jan 2020 15:54:09 GMT Subject: [Integrated] RFR: 6668: Move org.openjdk.jmc.jdp bundle from application to core In-Reply-To: References: Message-ID: <4dc9a453-9ca7-4e49-97d7-bef8e2f399d2@openjdk.org> Changeset: 87905922 Author: Jie Kang Committer: Henrik Dafg?rd Date: 2020-01-16 15:53:39 +0000 URL: https://git.openjdk.java.net/jmc/commit/87905922 6668: Move org.openjdk.jmc.jdp bundle from application to core Reviewed-by: hdafgard ! application/coverage/pom.xml - application/org.openjdk.jmc.jdp/build.properties - application/org.openjdk.jmc.jdp/pom.xml - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/Discoverable.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/DiscoveryEvent.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/DiscoveryListener.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/JDPClient.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/PacketListener.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/PacketProcessor.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/Pruner.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/package-info.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/CodingException.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/Configuration.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/ConfigurationFactory.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/JDPPacket.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/JRockitJDPPacketDecoder.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/package-info.java - application/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/jmx/JMXDataKeys.java ! application/pom.xml - application/tests/org.openjdk.jmc.jdp.test/build.properties - application/tests/org.openjdk.jmc.jdp.test/pom.xml - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/AllTests.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/ClientTester.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/ServerTester.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPClientTest.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPJMXTest.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPPacketTest.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPServerTest.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/Broadcaster.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/JDPServer.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/JMXJDPServer.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/PIDHelper.java - application/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/package-info.java ! application/tests/pom.xml ! core/coverage/pom.xml = core/org.openjdk.jmc.jdp/.classpath = core/org.openjdk.jmc.jdp/.project = core/org.openjdk.jmc.jdp/.settings/org.eclipse.jdt.core.prefs = core/org.openjdk.jmc.jdp/META-INF/MANIFEST.MF + core/org.openjdk.jmc.jdp/build.properties + core/org.openjdk.jmc.jdp/pom.xml + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/Discoverable.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/DiscoveryEvent.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/DiscoveryListener.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/JDPClient.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/PacketListener.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/PacketProcessor.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/Pruner.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/client/package-info.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/CodingException.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/Configuration.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/ConfigurationFactory.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/JDPPacket.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/JRockitJDPPacketDecoder.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/common/package-info.java + core/org.openjdk.jmc.jdp/src/main/java/org/openjdk/jmc/jdp/jmx/JMXDataKeys.java ! core/pom.xml = core/tests/org.openjdk.jmc.jdp.test/.classpath = core/tests/org.openjdk.jmc.jdp.test/.project = core/tests/org.openjdk.jmc.jdp.test/META-INF/MANIFEST.MF + core/tests/org.openjdk.jmc.jdp.test/build.properties + core/tests/org.openjdk.jmc.jdp.test/pom.xml + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/AllTests.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/ClientTester.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/ServerTester.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPClientTest.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPJMXTest.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPPacketTest.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/JDPServerTest.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/Broadcaster.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/JDPServer.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/JMXJDPServer.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/PIDHelper.java + core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/server/jmx/package-info.java ! core/tests/pom.xml From hirt at openjdk.java.net Fri Jan 17 10:27:29 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 17 Jan 2020 10:27:29 GMT Subject: [Rev 01] RFR: 6674: Use try-with-resource in more places and close un-closed resources In-Reply-To: References: Message-ID: <_ZDnwXp4IECR3xMIozTN9P5G1PHZy5a433nwjLOYpzU=.a6e3b2d2-7235-4dc7-bfca-09e4d74f3b52@github.com> On Fri, 17 Jan 2020 10:27:29 GMT, Henrik Dafg?rd wrote: >> This PR fixes a few places where we didn't close resources properly before and also changes a number of older usages of IOToolkit to instead use try-with-resource. > > The pull request has been updated with 1 additional commit. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/33 From hirt at openjdk.java.net Fri Jan 17 10:27:47 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 17 Jan 2020 10:27:47 GMT Subject: RFR: 6660: Make JMX API not return classes In-Reply-To: References: Message-ID: On Wed, 15 Jan 2020 15:07:29 GMT, Jessye Coleman-Shapiro wrote: > This patch modifies the JMX API so that functions return void instead of class arrays. > > The name of the function setTransforms was also changed to defineEventProbes as a result of this change because an mbean function whose name begins with "set", has one parameter and a return type of void, gets registered as a setter not an operation. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/32 From hdafgard at openjdk.java.net Fri Jan 17 14:26:51 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Fri, 17 Jan 2020 14:26:51 GMT Subject: [Integrated] RFR: 6674: Use try-with-resource in more places and close un-closed resources In-Reply-To: References: Message-ID: <39407cd7-bb55-4360-831a-f890793fca1d@openjdk.org> Changeset: ea933fab Author: Henrik Dafg?rd Date: 2020-01-17 14:25:45 +0000 URL: https://git.openjdk.java.net/jmc/commit/ea933fab 6674: Use try-with-resource in more places and close un-closed resources Reviewed-by: hirt ! application/org.openjdk.jmc.console.jconsole/src/main/java/org/openjdk/jmc/console/jconsole/JConsolePluginLoader.java ! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/action/TriggerActionStartTimeBoundRecording.java ! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/action/WriteAndOpenRecordingJob.java ! application/org.openjdk.jmc.console.ui.notification/src/main/java/org/openjdk/jmc/console/ui/notification/tab/TriggerToolkit.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui.configuration/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/configuration/model/xml/XMLModel.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/DumpAnyRecordingAction.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/EditRecordingAction.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/actions/StartRecordingAction.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/jobs/UpdateRecordingJob.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/EventConfiguration.java ! application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/PrivateStorageDelegate.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/RecordingLoader.java ! application/org.openjdk.jmc.ide.launch/src/main/java/org/openjdk/jmc/ide/launch/JfrLaunchDelegateHelper.java ! application/org.openjdk.jmc.ide.launch/src/main/java/org/openjdk/jmc/ide/launch/model/JfrLaunchModel.java ! application/org.openjdk.jmc.joverflow/src/main/java/org/openjdk/jmc/joverflow/heap/parser/ReadBuffer.java ! application/org.openjdk.jmc.joverflow/src/main/java/org/openjdk/jmc/joverflow/util/FileUtils.java ! application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/logging/LoggingToolkit.java ! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/persistence/internal/PersistenceFile.java ! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/subscription/internal/FileMRIMetadata.java ! application/org.openjdk.jmc.rjmx/src/main/java/org/openjdk/jmc/rjmx/triggers/internal/NotificationRuleBag.java ! application/org.openjdk.jmc.ui.common/src/main/java/org/openjdk/jmc/ui/common/util/MCVersion.java ! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/EventConfigurationModelTest.java ! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/EventConfigurationTest.java ! application/tests/org.openjdk.jmc.flightrecorder.controlpanel.ui.test/src/test/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/model/test/JfrControlTestCase.java ! application/tests/org.openjdk.jmc.rjmx.services.jfr.test/src/test/java/org/openjdk/jmc/rjmx/services/jfr/test/JfrPackageExampleTest.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/DefaultServicesTest.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/PackageExampleTest.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/services/ServicesPackageExampleTest.java ! application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/subscription/MRIMetadataServiceTest.java ! application/uitests/org.openjdk.jmc.flightrecorder.uitest/src/test/java/org/openjdk/jmc/flightrecorder/uitest/JfrMetadataToolkit.java ! application/uitests/org.openjdk.jmc.flightrecorder.uitest/src/test/java/org/openjdk/jmc/flightrecorder/uitest/MetadataTestBase.java ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/Agent.java ! core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/util/TestToolkit.java ! core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/io/IOToolkit.java ! core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/util/XmlToolkit.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/JfrLoaderToolkit.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/EventAppearance.java ! core/tests/org.openjdk.jmc.flightrecorder.rules.jdk.test/src/test/java/org/openjdk/jmc/flightrecorder/test/rules/jdk/TestRulesWithJfr.java From kxu at openjdk.java.net Fri Jan 17 17:03:27 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 17 Jan 2020 17:03:27 GMT Subject: [Rev 07] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: <118F-c92Gg2dfdCprHY8RvP2Sx6fwmFmmxae7M0O6Ik=.db96002c-5656-47ed-9c96-a753819af272@github.com> On Thu, 19 Dec 2019 11:59:55 GMT, Marcus Hirt wrote: >> Private constructor throwing unsupported exception might be nice so people don't even try instantiate it. > > Javadocs for public methods would be nice. The class is not final. A private constructor throwing exceptions has been added. Javadocs have been added for public methods. ------------- PR: https://git.openjdk.java.net/jmc/pull/20 From kxu at openjdk.java.net Fri Jan 17 17:03:29 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 17 Jan 2020 17:03:29 GMT Subject: [Rev 07] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: On Thu, 19 Dec 2019 12:01:02 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/util/InspectionClassLoader.java line 39: > >> 38: >> 39: // One-time use loader for reflective class inspection. Don't keep static reference to one of these. >> 40: public class InspectionClassLoader extends ClassLoader { > > Use javadoc instead, so that tooling will render it in IDEs. Javadoc now added. ------------- PR: https://git.openjdk.java.net/jmc/pull/20 From kxu at openjdk.java.net Fri Jan 17 19:35:22 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 17 Jan 2020 19:35:22 GMT Subject: RFR: 6246: Making the agent stop using Unsafe Message-ID: This patch addresses [JMC-6246](https://bugs.openjdk.java.net/browse/JMC-6246). The usage of `Unsafe.defineClass()` is replaced with: - for pre-Java 9, reflective access on `ClassLoader.getSystemClassLoader().defineClass()` - for Java 9 and later, `MethodHandles.Lookup.defineClass()` Please note that `LookUp.defineClass()` can only define classes within the same package of the lookup. Therefore generated events classes will be in the dedicated package `org.openjdk.jmc.agent.generated_events`, instead of being in the same package of the instrumented class. ------------- Commits: - 3c26203d: remove unsafe related helpers functions - bf895935: make agent stop using Unsafe Changes: https://git.openjdk.java.net/jmc/pull/35/files Webrev: https://webrevs.openjdk.java.net/jmc/35/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6246 Stats: 102 lines in 5 files changed: 36 ins; 58 del; 8 mod Patch: https://git.openjdk.java.net/jmc/pull/35.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/35/head:pull/35 PR: https://git.openjdk.java.net/jmc/pull/35 From hirt at openjdk.java.net Fri Jan 17 20:02:22 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 17 Jan 2020 20:02:22 GMT Subject: RFR: 6672: JavaScript formatting template Message-ID: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Also fixing indentation in various places. For some reason spotless could not use the formatting settings to format the flame view javascript file, so adding a note on how to enable it in the pom. Also lowering the animation time for animations, since they are annoyingly slow now. ------------- Commits: - e9269758: Fixing formatting and adding note on how to enable javascript in spotless - c0e921de: Merge branch 'master' into jsformatting - 7d55a7e2: 6672: Adding standardized javascript formatting Changes: https://git.openjdk.java.net/jmc/pull/36/files Webrev: https://webrevs.openjdk.java.net/jmc/36/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6672 Stats: 558 lines in 8 files changed: 418 ins; 124 del; 16 mod Patch: https://git.openjdk.java.net/jmc/pull/36.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/36/head:pull/36 PR: https://git.openjdk.java.net/jmc/pull/36 From hirt at openjdk.java.net Fri Jan 17 20:03:56 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 17 Jan 2020 20:03:56 GMT Subject: RFR: 6246: Making the agent stop using Unsafe In-Reply-To: References: Message-ID: On Fri, 17 Jan 2020 19:34:16 GMT, Kangcheng Xu wrote: > This patch addresses [JMC-6246](https://bugs.openjdk.java.net/browse/JMC-6246). > > The usage of `Unsafe.defineClass()` is replaced with: > - for pre-Java 9, reflective access on `ClassLoader.getSystemClassLoader().defineClass()` > - for Java 9 and later, `MethodHandles.Lookup.defineClass()` > > Please note that `LookUp.defineClass()` can only define classes within the same package of the lookup. Therefore generated events classes will be in the dedicated package `org.openjdk.jmc.agent.generated_events`, instead of being in the same package of the instrumented class. Doesn't this affect in which class loader the event classes are defined, and especially their unload behaviour? ------------- PR: https://git.openjdk.java.net/jmc/pull/35 From kxu at openjdk.java.net Fri Jan 17 20:11:04 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 17 Jan 2020 20:11:04 GMT Subject: RFR: 6246: Making the agent stop using Unsafe In-Reply-To: References: Message-ID: On Fri, 17 Jan 2020 20:03:42 GMT, Marcus Hirt wrote: >> This patch addresses [JMC-6246](https://bugs.openjdk.java.net/browse/JMC-6246). >> >> The usage of `Unsafe.defineClass()` is replaced with: >> - for pre-Java 9, reflective access on `ClassLoader.getSystemClassLoader().defineClass()` >> - for Java 9 and later, `MethodHandles.Lookup.defineClass()` >> >> Please note that `LookUp.defineClass()` can only define classes within the same package of the lookup. Therefore generated events classes will be in the dedicated package `org.openjdk.jmc.agent.generated_events`, instead of being in the same package of the instrumented class. > > Doesn't this affect in which class loader the event classes are defined, and especially their unload behaviour? In the case of reflective access, it's called directly on the system class loader. For `Lookup.defineClass`, the event class is defined on the class loader of the lookup, which in this case is the system class loader that loads `org.openjdk.jmc.agent.generated_events.Dummy`. In both cases, events are defined with the system class loader, just like `Unsafe.defineClass`. ------------- PR: https://git.openjdk.java.net/jmc/pull/35 From hirt at openjdk.java.net Fri Jan 17 20:17:54 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 17 Jan 2020 20:17:54 GMT Subject: [Integrated] RFR: 6660: Make JMX API not return classes In-Reply-To: References: Message-ID: <99d34a2c-d2dc-4806-8568-03f8b4f88b10@openjdk.org> Changeset: afcf74db Author: Jessye Coleman-Shapiro Committer: Marcus Hirt Date: 2020-01-17 20:04:53 +0000 URL: https://git.openjdk.java.net/jmc/commit/afcf74db 6660: Make JMX API not return classes Reviewed-by: hirt ! core/org.openjdk.jmc.agent/README.md ! core/org.openjdk.jmc.agent/pom.xml ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/jmx/AgentController.java ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/jmx/AgentControllerMBean.java + core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestDefineEventProbes.java - core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestSetTransforms.java From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 17 20:48:21 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 17 Jan 2020 20:48:21 GMT Subject: RFR: 6661: Simplify Agent JMX tests Message-ID: This patch simplifies mbean function calls for agent JMX tests. The proposed solution, which is outlined in the ticket's description, was to create an mbean object by calling ManagementFactory.newPlatformMXBeanProxy(...). However this function requires the AgentControllerMBean class to be loaded by the platform class loader, which it is not. So instead I have called the JMX.newMXBeanProxy(...) directly. ------------- Commits: - 646146d7: Simplify Agent JMX tests Changes: https://git.openjdk.java.net/jmc/pull/37/files Webrev: https://webrevs.openjdk.java.net/jmc/37/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6661 Stats: 8 lines in 1 file changed: 1 ins; 3 del; 4 mod Patch: https://git.openjdk.java.net/jmc/pull/37.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/37/head:pull/37 PR: https://git.openjdk.java.net/jmc/pull/37 From kxu at openjdk.java.net Fri Jan 17 21:00:34 2020 From: kxu at openjdk.java.net (Kangcheng Xu) Date: Fri, 17 Jan 2020 21:00:34 GMT Subject: [Rev 08] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: > This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). > > In the xml configuration, a field capture looks like: > > a field value > a field value capture with a path syntax > this.field.prop > > See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. > > There are currently two limitations to pay attention to: > > 1. Instrumentation point cannot be in synthesized classes: > Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. > > 2. Instrumentation is unable to access nestmates' private fields: > Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. > > Please let me know your thoughts. Thank you very much! The pull request has been updated with a new target base due to a merge or a rebase. ------------- Commits: - 5dc43be5: Merge remote-tracking branch 'upstream/master' into agent-path-expression - 10e48d58: update license header year values - 09abbb99: remove unused function - 4bb163b9: update TestSetTransforms with new changes - 04185668: Merge remote-tracking branch 'upstream/master' into agent-path-expression - c78ce947: lazy-load class with InspectionClassLoader - c35788f2: add javadoc - 9782c758: update license header year - caaa7e7e: resolve conflicts after merging from master - 3383c080: Merge branch 'master' into agent-path-expression - a3e0c61e: error on private member access between nestmates - 5c19b765: add test cases for field capture feature - e05ea8bf: support legacy JFR api - 1019ca0d: change indentations to using tabs. add license headers - 1c7b0ac6: rename "watch" to "field" - e93a31e2: refactor error handling. cache resolved reference chain - 92b92502: add a QualifiedThisReference only when making qualified .this or .super - db3d6266: WIP: refactor - 040a42d8: add final modifiers - a803e7e7: remove unnecessary null checks - af33e32f: implemented path-syntax evaluation - 4cc7b9ea: WIP: add check for access and static context. improves error messages - 036b324e: WIP: state machine for parsing expression - 3f2f4023: WIP: syntax parsing with state machine - b58a44e4: WIP: implement implicit upwards reference in a nest - ad7d64f6: WIP: enforce access checks on reference chains - 5e46ed6f: WIP: avoid loading instrumentation pending classes with parent loader - 1964111f: WIP: fix loading "this" - 74624291: WIP: BCI agent path-syntax evaluation Changes: https://git.openjdk.java.net/jmc/pull/20/files Webrev: https://webrevs.openjdk.java.net/jmc/20/webrev.08 Stats: 2396 lines in 24 files changed: 2282 ins; 1 del; 113 mod Patch: https://git.openjdk.java.net/jmc/pull/20.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/20/head:pull/20 PR: https://git.openjdk.java.net/jmc/pull/20 From hdafgard at openjdk.java.net Sat Jan 18 12:20:09 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Sat, 18 Jan 2020 12:20:09 GMT Subject: RFR: 6672: JavaScript formatting template In-Reply-To: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: On Fri, 17 Jan 2020 20:00:25 GMT, Marcus Hirt wrote: > Also fixing indentation in various places. For some reason spotless could not use the formatting settings to format the flame view javascript file, so adding a note on how to enable it in the pom. Also lowering the animation time for animations, since they are annoyingly slow now. application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template line 32: > 31: .cellHeight(18) > 32: .transitionDuration(320) > 33: .minFrameSize(5) Was this change intended to be included in this formatting PR? ------------- PR: https://git.openjdk.java.net/jmc/pull/36 From hirt at openjdk.java.net Sat Jan 18 16:31:27 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Sat, 18 Jan 2020 16:31:27 GMT Subject: RFR: 6672: JavaScript formatting template In-Reply-To: References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: On Sat, 18 Jan 2020 12:19:38 GMT, Henrik Dafg?rd wrote: >> Also fixing indentation in various places. For some reason spotless could not use the formatting settings to format the flame view javascript file, so adding a note on how to enable it in the pom. Also lowering the animation time for animations, since they are annoyingly slow now. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template line 32: > >> 31: .cellHeight(18) >> 32: .transitionDuration(320) >> 33: .minFrameSize(5) > > Was this change intended to be included in this formatting PR? "Also lowering the animation time for animations, since they are annoyingly slow now." Yes, thought I might as well, since it's such a small change. ------------- PR: https://git.openjdk.java.net/jmc/pull/36 From hirt at openjdk.java.net Sat Jan 18 16:36:07 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Sat, 18 Jan 2020 16:36:07 GMT Subject: RFR: 6661: Simplify Agent JMX tests In-Reply-To: References: Message-ID: On Fri, 17 Jan 2020 20:46:09 GMT, Jessye Coleman-Shapiro wrote: > This patch simplifies mbean function calls for agent JMX tests. > > The proposed solution, which is outlined in the ticket's description, was to create an mbean object by calling ManagementFactory.newPlatformMXBeanProxy(...). However this function requires the AgentControllerMBean class to be loaded by the platform class loader, which it is not. So instead I have called the JMX.newMXBeanProxy(...) directly. ------------- Marked as reviewed by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/37 From hirt at openjdk.java.net Sun Jan 19 11:35:17 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Sun, 19 Jan 2020 11:35:17 GMT Subject: RFR: 6246: Making the agent stop using Unsafe In-Reply-To: References: Message-ID: On Fri, 17 Jan 2020 20:10:37 GMT, Kangcheng Xu wrote: >> Doesn't this affect in which class loader the event classes are defined, and especially their unload behaviour? > > In the case of reflective access, it's called directly on the system class loader. For `Lookup.defineClass`, the event class is defined on the class loader of the lookup, which in this case is the system class loader that loads `org.openjdk.jmc.agent.generated_events.Dummy`. > > In both cases, events are defined with the system class loader, just like `Unsafe.defineClass`. I was under the impression that the class loader and protection domain arguments given to define class would define the class with that class loader and protection domain, allowing the event class to be unloaded when the class where it is being used is unloaded. If this is not done, we?re basically introducing a class leak. ------------- PR: https://git.openjdk.java.net/jmc/pull/35 From mwengner at openjdk.java.net Sun Jan 19 15:41:43 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Sun, 19 Jan 2020 15:41:43 GMT Subject: RFR: 6670: harmonize unclassifiable across flameview Message-ID: 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View https://bugs.openjdk.java.net/browse/JMC-6670 ------------- Commits: - 0f529ec0: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View - 16ae867f: Merge branch 'master' into feature/6670_Harmonize_Unclassifiable_across_flameview - 4d66678b: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View - 44d3e526: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View - 60a1b66a: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View Changes: https://git.openjdk.java.net/jmc/pull/38/files Webrev: https://webrevs.openjdk.java.net/jmc/38/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6670 Stats: 85 lines in 7 files changed: 62 ins; 15 del; 8 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From hdafgard at openjdk.java.net Sun Jan 19 18:07:15 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Sun, 19 Jan 2020 18:07:15 GMT Subject: RFR: 6672: JavaScript formatting template In-Reply-To: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: On Fri, 17 Jan 2020 20:00:25 GMT, Marcus Hirt wrote: > Also fixing indentation in various places. For some reason spotless could not use the formatting settings to format the flame view javascript file, so adding a note on how to enable it in the pom. Also lowering the animation time for animations, since they are annoyingly slow now. ------------- Marked as reviewed by hdafgard (Reviewer). PR: https://git.openjdk.java.net/jmc/pull/36 From mwengner at openjdk.java.net Sun Jan 19 21:09:47 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Sun, 19 Jan 2020 21:09:47 GMT Subject: RFR: 6672: JavaScript formatting template In-Reply-To: References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: On Sat, 18 Jan 2020 16:30:39 GMT, Marcus Hirt wrote: >> application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template line 32: >> >>> 31: .cellHeight(18) >>> 32: .transitionDuration(320) >>> 33: .minFrameSize(5) >> >> Was this change intended to be included in this formatting PR? > > "Also lowering the animation time for animations, since they are annoyingly slow now." > Yes, thought I might as well, since it's such a small change. it makes sense ------------- PR: https://git.openjdk.java.net/jmc/pull/36 From mwengner at openjdk.java.net Sun Jan 19 21:10:22 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Sun, 19 Jan 2020 21:10:22 GMT Subject: RFR: 6672: JavaScript formatting template In-Reply-To: References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: On Sun, 19 Jan 2020 21:09:38 GMT, Miroslav Wengner wrote: >> "Also lowering the animation time for animations, since they are annoyingly slow now." >> Yes, thought I might as well, since it's such a small change. > > it makes sense it makes sense ------------- PR: https://git.openjdk.java.net/jmc/pull/36 From mwengner at openjdk.java.net Mon Jan 20 08:57:39 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 08:57:39 GMT Subject: [Rev 01] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - f47bf343: 6670: clean up, value comparison strategy Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/0f529ec0..f47bf343 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.00-01 Stats: 30 lines in 3 files changed: 4 ins; 17 del; 9 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Mon Jan 20 12:54:50 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 12:54:50 GMT Subject: [Integrated] RFR: 6672: JavaScript formatting template In-Reply-To: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> References: <0h-E1Ss0HU19hSPno-j-GLFoHNuO32DG3ZEBrO2LHDk=.174c366a-65c8-432e-ac96-60e3c1dfcf1c@github.com> Message-ID: Changeset: c2134e2f Author: Marcus Hirt Date: 2020-01-20 12:53:32 +0000 URL: https://git.openjdk.java.net/jmc/commit/c2134e2f 6672: JavaScript formatting template Reviewed-by: hdafgard ! application/org.openjdk.jmc.flightrecorder.flameview/build.properties ! application/org.openjdk.jmc.flightrecorder.flameview/pom.xml ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java + application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js - application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/jsjmclibs/flameviewColoring.js ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template + configuration/ide/eclipse/formatting/formattingjs.xml ! pom.xml From hirt at openjdk.java.net Mon Jan 20 13:28:46 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 13:28:46 GMT Subject: [Rev 01] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 13:28:44 GMT, Miroslav Wengner wrote: >> 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View >> https://bugs.openjdk.java.net/browse/JMC-6670 > > The pull request has been updated with 1 additional commit. application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java line 56: > 55: > 56: private static TraceNode getRootTraceNode(String rootName, Fork rootFork) { > 57: return new TraceNode(rootName == null ? DEFAULT_ROOT_NAME : rootName, rootFork.getItemsInFork(), Is this really necessary? The factory class doesn't add much in terms of abstraction over having a factory method, and it's not clear to me why the get by frame method belongs in there and not the rest of the utility methods. I'd revert these changes, or at least add the helper methods as private statics without the extra inner class. application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java line 526: > 525: public static String VMOperationPage_TIMELINE_SELECTION; > 526: public static String Flameview_UNCLASSIFIABLE_FRAME_DESC; > 527: Since it's only the flame view that uses this description, it could be in FlameView (it really should be, if it is to be named FlameView something). If we want the description to be generally available, it should be somewhere else. If we want it to be available to rules etc, it probably should live somewhere in core, near to where the definition of the unclassifiable frame is, e.g. in flightrecorder. One possible solution, would e.g. be to add a public messages bundle in the stacktrace package. ------------- Changes requested by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Mon Jan 20 14:16:37 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 14:16:37 GMT Subject: [Integrated] RFR: 6661: Simplify Agent JMX tests In-Reply-To: References: Message-ID: <9c42c897-15bb-4418-9bc9-c8d797f0cd3e@openjdk.org> Changeset: e647a9d1 Author: Jessye Coleman-Shapiro Committer: Marcus Hirt Date: 2020-01-20 14:15:25 +0000 URL: https://git.openjdk.java.net/jmc/commit/e647a9d1 6661: Simplify Agent JMX tests Reviewed-by: hirt ! core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestDefineEventProbes.java From hirt at openjdk.java.net Mon Jan 20 15:00:20 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 15:00:20 GMT Subject: RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: On Tue, 14 Jan 2020 12:19:09 GMT, Marcus Hirt wrote: >> Yep, it's already split up in a general "Memory" page and a TLAB allocations page (which is located under JVM Internals), and which is already grouped by class. The only missing part would be the "Pressure", which is basically Total Allocation (%), added by Jie's PR. >> >>> It may be cool to have some kind of extension functionality such that when a page is visited, the page can augment this generic view with additional columns (e.g. to show allocation pressure by method while on the memory page). >> >> Agreed. I believe this is discussed in another already existing issue. We can start a thread on the dev-list to discuss this in more detail. > > Note that copyrights need to be updated. Hi Jie! How about hiding the count column, or even removing it? This is the event count for both of the TLAB events - it does not correspond to the number of actual objects. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, but the event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. ------------- PR: https://git.openjdk.java.net/jmc/pull/21 From hirt at openjdk.java.net Mon Jan 20 15:26:49 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 15:26:49 GMT Subject: [Rev 08] RFR: 6656: Allow capturing field values with path syntax In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 15:26:45 GMT, Kangcheng Xu wrote: >> This patch implements [JMC-6656: Allow capturing field values with path syntax](https://bugs.openjdk.java.net/browse/JMC-6656). >> >> In the xml configuration, a field capture looks like: >> >> a field value >> a field value capture with a path syntax >> this.field.prop >> >> See `org/openjdk/jmc/agent/test/jfrprobes_template.xml` for more examples. >> >> There are currently two limitations to pay attention to: >> >> 1. Instrumentation point cannot be in synthesized classes: >> Instrumented classes are first loaded by obtaining the bytecode and inspected reflectively to resolve typing information. This fails if the class load is unable to provide the bytecode when `ClassLoader.getResouce()` is called. The cases where it might fail are unlikely to be for classes like proxies or auxiliaries for Java frameworks that have no visible equivalent. >> >> 2. Instrumentation is unable to access nestmates' private fields: >> Before [nest-base access control](https://openjdk.java.net/jeps/181) was introduced in Java 11, accessing nestmates' private fields is, while lexically correct, forbidden by the JVM. The Java compiler works around by inserting synthetic getters/setters. However, it's not for a BCI agent since changing the class structure is not allowed during class transformation. >> >> Please let me know your thoughts. Thank you very much! > > The pull request has been updated with a new target base due to a merge or a rebase. core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/Transformer.java line 72: > 71: // Don't reuse this class loader instance. We want the loader and its class to unload after we're done. > 72: classBeingRedefined = new InspectionClassLoader(loader) > 73: .loadClass(TypeUtils.getCanonicalName(className)); We only need to parse/load the class if we are looking up fields. Can't we do this later, and only if we need it lazily? It's seems a bit premature to do it here in the Transformer. ------------- Changes requested by hirt (Lead). PR: https://git.openjdk.java.net/jmc/pull/20 From hdafgard at openjdk.java.net Mon Jan 20 16:19:36 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 20 Jan 2020 16:19:36 GMT Subject: RFR: 6364: Improvements to the Thread Graph In-Reply-To: References: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> <9z2_Fmh0wzUWsp9Tu1bEudv8_BvAjeAC6RVPPe76FRQ=.1d13e3bc-3d48-4a9b-831f-40b784d57106@github.com> Message-ID: On Fri, 10 Jan 2020 15:14:16 GMT, Alex Macdonald wrote: >> jcheck is requesting: >> >> s/JMC-6364/6364 > >> jcheck is requesting: >> >> s/JMC-6364/6364 > > Neat, thanks for the heads up. I changed the commit description and force pushed them back here, but it looks like once a PR has been made with the invalid ID format it's the PR name change that gets jcheck to pass. This automation is nice, the `mvn spotless:apply` was especially nice to have. I actually liked the old behaviour of being able to see all thread states on one screen (given that you had sufficient pixels to display them). It gave a more helpful overview of the application state during the recording. I.e. the old view had a minimum lane height of 1 pixel. To do the same thing here you'd have to collapse the table, since 1 pixel isn't enough to render thread names. The selection highlighter also seems to have taken a significant performance hit, so it's a bit harder to drag and select a region of threads. Unless I'm missing something it also appears that I can't sort the thread table, and I'm uncertain what order the threads are shown in now. I'm also a bit confused by why the scroll bar on the right hand side scrolls horizontally when it's rendered vertically, and the component now doesn't zoom through time with the scroll wheel, like all other pages do? It would also be nice if the "Thread State Selection" toolbar button could do more of the "Edit Thread Activity Lanes" dialog, since they're doing very similar things? ------------- PR: https://git.openjdk.java.net/jmc/pull/27 From github.com+29706926+jessyec-s at openjdk.java.net Mon Jan 20 16:37:57 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Mon, 20 Jan 2020 16:37:57 GMT Subject: RFR: 6572: Make mbean functions protected by permission checks Message-ID: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> This patch adds a permission check to Agent MBean functions for the 'control' management permission. I have also added a test "testPermissionChecks" to see if a security exception is fired when this permission is not given. ------------- Commits: - 0e3ebef1: Make mbean functions protected by permission checks Changes: https://git.openjdk.java.net/jmc/pull/39/files Webrev: https://webrevs.openjdk.java.net/jmc/39/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6572 Stats: 136 lines in 5 files changed: 128 ins; 6 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/39.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/39/head:pull/39 PR: https://git.openjdk.java.net/jmc/pull/39 From hirt at openjdk.java.net Mon Jan 20 16:50:50 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 16:50:50 GMT Subject: RFR: 6673: Upgrading to Tycho 1.6.0 Message-ID: 6673: Upgrading to Tycho 1.6.0 ------------- Commits: - eeb79868: 6673: Upgrading to Tycho 1.6.0 Changes: https://git.openjdk.java.net/jmc/pull/40/files Webrev: https://webrevs.openjdk.java.net/jmc/40/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6673 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/40.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/40/head:pull/40 PR: https://git.openjdk.java.net/jmc/pull/40 From hdafgard at openjdk.java.net Mon Jan 20 17:03:56 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 20 Jan 2020 17:03:56 GMT Subject: RFR: 6673: Upgrading to Tycho 1.6.0 In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 16:49:24 GMT, Marcus Hirt wrote: > 6673: Upgrading to Tycho 1.6.0 LGTM! Nice to have faster dependency resolution, if it's noticable. ------------- Marked as reviewed by hdafgard (Reviewer). PR: https://git.openjdk.java.net/jmc/pull/40 From hirt at openjdk.java.net Mon Jan 20 17:19:30 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 17:19:30 GMT Subject: [Integrated] RFR: 6673: Upgrading to Tycho 1.6.0 In-Reply-To: References: Message-ID: Changeset: 1676ecce Author: Marcus Hirt Date: 2020-01-20 17:18:28 +0000 URL: https://git.openjdk.java.net/jmc/commit/1676ecce 6673: Upgrading to Tycho 1.6.0 Reviewed-by: hdafgard ! pom.xml From jkang at openjdk.java.net Mon Jan 20 18:05:04 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Mon, 20 Jan 2020 18:05:04 GMT Subject: [Rev 07] RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: > This patch addresses https://bugs.openjdk.java.net/browse/JMC-6657, which itself is a clone of https://bugs.openjdk.java.net/browse/JMC-5923 that targets the Memory and TLAB pages, rather than the stacktrace view. > > The ItemHistogram and related classes now have support for Percentage columns that divides the aggregate value for items in a row against the aggregate value for all items in the model. > > This is used in the Memory page to show Total Allocation as a Percentage. The TLAB page is modified to be tabbed and contains two ItemHistograms, one for classifying against Threads (previously existed) and one against Top Methods (new). Both also have two new columns: allocations inside and outside TLABs, as a percentage. > > ![tlab-page](https://user-images.githubusercontent.com/5430520/71093691-b2094c00-2177-11ea-9965-f27948964cd3.png) > TLABs by Top Methods, showcasing sorting by the new percentage column. Together with the stacktrace view, I believe these changes make it easier to see relevant areas of allocation pressure. The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. ------------- Added commits: - b5ddfdc1: Update licenses with correct year field - 86811758: Update licenses for year 2020 - 546c1d9f: Revert field name change - dccecea0: Move name and description setting to percentage column creation. Remove duplicate aggregators - f03e96cb: Add translations for new column name and descriptions - 53cb730d: Shorten column names with short form for Allocation(s) - 0304f078: Shorten column names with short form for Average and Percentage - 658bb8a4: Fix accidental removal of code text - 81046ef0: Update name and description for percentage columns - 80136239: Fix key name in messages.properties - 44d1843d: Add tabs to tlab page for tlabs by threads and by top methods - 114ea7d4: Add percentage columns to tlab view - 9e97aa84: Store reference to all items in AggregationModel rather than the AggregationRow - 857bb4fe: Add allocation percentage column to memory view - 1676ecce: 6673: Upgrading to Tycho 1.6.0 - e647a9d1: 6661: Simplify Agent JMX tests - c2134e2f: 6672: JavaScript formatting template - afcf74db: 6660: Make JMX API not return classes - ea933fab: 6674: Use try-with-resource in more places and close un-closed resources - 87905922: 6668: Move org.openjdk.jmc.jdp bundle from application to core - f74caa81: 6549: Color flame chart based on package name - 055db4fc: 6659: Remove 'Showing X of Y events...' table message when not applicable - bfb23cde: 6671: Eagerly convert end time to the same unit as start time - 0f08461f: 5721: Reintroduce the Percentage column - 67bc8668: 6658: Remove unnecessary storing of pre-instrumented bytecode - 7ad8f7c0: 6663: Reloading the Flame Chart View in Linux displays file browser - 31d82a7d: 6665: .project files still exist for removed platform definitions - 423e72db: 6662: Updating to Eclipse 2019-12 (4.14) - 2e81a835: 6583: Add filter and search table actions to EventBrowser page Changes: - all: https://git.openjdk.java.net/jmc/pull/21/files - new: https://git.openjdk.java.net/jmc/pull/21/files/867c2bb9..b5ddfdc1 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/21/webrev.07 - incr: https://webrevs.openjdk.java.net/jmc/21/webrev.06-07 Stats: 8102 lines in 159 files changed: 3942 ins; 3950 del; 210 mod Patch: https://git.openjdk.java.net/jmc/pull/21.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/21/head:pull/21 PR: https://git.openjdk.java.net/jmc/pull/21 From hirt at openjdk.java.net Mon Jan 20 21:29:47 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 21:29:47 GMT Subject: RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> Message-ID: <4lnVm6xuwr0iZmJe_v6WKpKKQ3y32qmwo9hHH9e315Y=.6271ff68-efc1-4b91-888b-aaf97d573846@github.com> On Mon, 20 Jan 2020 16:35:16 GMT, Jessye Coleman-Shapiro wrote: > This patch adds a permission check to Agent MBean functions for the 'control' management permission. > > I have also added a test "testPermissionChecks" to see if a security exception is fired when this permission is not given. core/org.openjdk.jmc.agent/README.md line 32: > 31: ### Using a security manager > 32: To make MBean calls more secure, the agent can be run with a security manager. A manager can be enabled by adding the VM option `-Djava.security.manager` and by supplying a policy file of permissions to grant as such: `-Djava.security.policy=permissions.policy`. The 'control' Management Permission must be granted in order for MBean function calls to succeed. > 33: I'd probably paraphrase this a bit. It's running with a security manager - not just running the agent with security manager. Perhaps something along the lines of: "When running with a security manager, the 'control' Management Permission must be granted to control the agent through the MBean. To set fine grained permissions for authenticated remote users, see e.g. https://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html#gdeup and https://docs.oracle.com/javadb/10.10.1.2/adminguide/radminjmxenablepolicy.html#radminjmxenablepolicy. Blahblahblah." ------------- PR: https://git.openjdk.java.net/jmc/pull/39 From mwengner at openjdk.java.net Mon Jan 20 21:31:59 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 21:31:59 GMT Subject: [Rev 01] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 13:03:48 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java line 56: > >> 55: >> 56: private static TraceNode getRootTraceNode(String rootName, Fork rootFork) { >> 57: return new TraceNode(rootName == null ? DEFAULT_ROOT_NAME : rootName, rootFork.getItemsInFork(), > > Is this really necessary? The factory class doesn't add much in terms of abstraction over having a factory method, and it's not clear to me why the get by frame method belongs in there and not the rest of the utility methods. I'd revert these changes, or at least add the helper methods as private statics without the extra inner class. agree, helper methods are fine. ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 21:34:42 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 21:34:42 GMT Subject: [Rev 02] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: <8_PfEElffaxhciGgnfZoCU7pLnBlivA37aMyQJPbzRA=.cf860ed9-79c2-45e4-9fbc-9be7b764f908@github.com> > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - e501ab26: 6670: stactrace message, helper methods Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/f47bf343..e501ab26 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.02 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.01-02 Stats: 49 lines in 5 files changed: 21 ins; 23 del; 5 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 21:35:11 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 21:35:11 GMT Subject: [Rev 01] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 13:27:48 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/messages/internal/Messages.java line 526: > >> 525: public static String VMOperationPage_TIMELINE_SELECTION; >> 526: public static String Flameview_UNCLASSIFIABLE_FRAME_DESC; >> 527: > > Since it's only the flame view that uses this description, it could be in FlameView (it really should be, if it is to be named FlameView something). If we want the description to be generally available, it should be somewhere else. If we want it to be available to rules etc, it probably should live somewhere in core, near to where the definition of the unclassifiable frame is, e.g. in flightrecorder. One possible solution, would e.g. be to add a public messages bundle in the stacktrace package. thanks, corrected, I had the solution in stacktrace bundle before as we want to add similar tooltip to the stactrace view ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Mon Jan 20 21:37:10 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 21:37:10 GMT Subject: [Rev 02] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 21:37:09 GMT, Henrik Dafg?rd wrote: >> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. >> >> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. > > The pull request has been updated with 1 additional commit. core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java line 1432: > 1431: * Returns the latest end time in the provided item collection. This method is based on the > 1432: * assumption that item collection lanes are sorted by timestamp. > 1433: * ...and that they are not overlapping. ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From hirt at openjdk.java.net Mon Jan 20 21:37:21 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 21:37:21 GMT Subject: [Rev 02] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 21:37:20 GMT, Henrik Dafg?rd wrote: >> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. >> >> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. > > The pull request has been updated with 1 additional commit. core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java line 1402: > 1401: * Returns the earliest end time in the provided item collection. This method is based on the > 1402: * assumption that item collection lanes are sorted by timestamp. > 1403: * ...and that they are not overlapping. ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From hirt at openjdk.java.net Mon Jan 20 21:41:26 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 20 Jan 2020 21:41:26 GMT Subject: RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: On Wed, 15 Jan 2020 17:03:41 GMT, Henrik Dafg?rd wrote: >> Careful here. They are not sorted on start and end time both, and events are not guaranteed (except that we recommend that this is the case for the events of a particular event type, if at all possible) to be non-overlapping. > > JMC parser currently guarantees that IItemCollection events are retrieved in sorted, disjoint, lanes. Each event is iterated over in the time that it was emitted, and if there is an overlap then it will be in another lane. This is why we iterate through the IItemCollection and then through the IItemIterable, even if the IItemCollection is filtered to only contain one type. > > There is still the problem that this relies on the implicit assumption that these lanes are sorted in this fashion, but since we're currently performing a computationally intensive sorting during the parsing we should think about exploiting that fact. Can we add some verification tests showing that we get the same results for a few sets of data? I think it would be nice if we added a recording with (custom, well defined) overlapping events (of all types of overlap) to the test recordings. ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From mwengner at openjdk.java.net Mon Jan 20 21:58:13 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 21:58:13 GMT Subject: [Rev 03] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. ------------- Added commits: - 73095855: Merge branch 'master' into feature/6670_Harmonize_Unclassifiable_across_flameview - 1676ecce: 6673: Upgrading to Tycho 1.6.0 - e647a9d1: 6661: Simplify Agent JMX tests - c2134e2f: 6672: JavaScript formatting template Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/e501ab26..73095855 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.03 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.02-03 Stats: 583 lines in 9 files changed: 427 ins; 135 del; 21 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 22:47:18 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 22:47:18 GMT Subject: [Rev 04] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: <_8j1i3E5pdUIo_oVGrN1ovBXu9nwJlIDocjb3Pxocds=.7b7be901-ff6b-438a-b9fb-0c47b3e6e424@github.com> > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - 8c4a0f6a: 6670: stactrace message eval Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/73095855..8c4a0f6a Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.04 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.03-04 Stats: 12 lines in 3 files changed: 9 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 22:57:56 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 22:57:56 GMT Subject: [Rev 05] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - a5cfb5e5: 6670: js cleanup Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/8c4a0f6a..a5cfb5e5 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.05 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.04-05 Stats: 5 lines in 1 file changed: 2 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 23:04:44 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 23:04:44 GMT Subject: [Rev 06] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - d6410894: 6670: cleanup Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/a5cfb5e5..d6410894 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.06 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.05-06 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Mon Jan 20 23:06:47 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Mon, 20 Jan 2020 23:06:47 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - 521d1709: 6670: cleanup Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/d6410894..521d1709 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.07 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.06-07 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Tue Jan 21 11:55:21 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 21 Jan 2020 11:55:21 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Tue, 21 Jan 2020 11:55:16 GMT, Miroslav Wengner wrote: >> 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View >> https://bugs.openjdk.java.net/browse/JMC-6670 > > The pull request has been updated with 1 additional commit. Changes requested by hirt (Lead). application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java line 46: > 45: import org.openjdk.jmc.flightrecorder.stacktrace.StacktraceFrame; > 46: import org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages; > 47: Messages to be shared should not be in an internal bundle. application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java line 80: > 79: > 80: import static org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages.STACKTRACE_UNCLASSIFIABLE_FRAME; > 81: import static org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages.STACKTRACE_UNCLASSIFIABLE_FRAME_DESC; Messages to be shared should not be in an internal bundle. core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/messages.properties line 39: > 38: STACKTRACE_UNCLASSIFIABLE_FRAME=~ UNCLASSIFIABLE ~ > 39: STACKTRACE_UNCLASSIFIABLE_FRAME_DESC=Unclassified means the stacktrace reached the stackdepth limit Lacks a newline at the end of the last property. ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From github.com+29706926+jessyec-s at openjdk.java.net Tue Jan 21 14:51:04 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Tue, 21 Jan 2020 14:51:04 GMT Subject: [Rev 01] RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> Message-ID: > This patch adds a permission check to Agent MBean functions for the 'control' management permission. > > I have also added a test "testPermissionChecks" to see if a security exception is fired when this permission is not given. The pull request has been updated with 1 additional commit. ------------- Added commits: - d94062ca: Modify README description Changes: - all: https://git.openjdk.java.net/jmc/pull/39/files - new: https://git.openjdk.java.net/jmc/pull/39/files/0e3ebef1..d94062ca Webrevs: - full: https://webrevs.openjdk.java.net/jmc/39/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/39/webrev.00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/39.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/39/head:pull/39 PR: https://git.openjdk.java.net/jmc/pull/39 From github.com+29706926+jessyec-s at openjdk.java.net Tue Jan 21 14:51:49 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Tue, 21 Jan 2020 14:51:49 GMT Subject: [Rev 01] RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: <4lnVm6xuwr0iZmJe_v6WKpKKQ3y32qmwo9hHH9e315Y=.6271ff68-efc1-4b91-888b-aaf97d573846@github.com> References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> <4lnVm6xuwr0iZmJe_v6WKpKKQ3y32qmwo9hHH9e315Y=.6271ff68-efc1-4b91-888b-aaf97d573846@github.com> Message-ID: On Mon, 20 Jan 2020 21:28:31 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > core/org.openjdk.jmc.agent/README.md line 32: > >> 31: ### Using a security manager >> 32: To make MBean calls more secure, the agent can be run with a security manager. A manager can be enabled by adding the VM option `-Djava.security.manager` and by supplying a policy file of permissions to grant as such: `-Djava.security.policy=permissions.policy`. The 'control' Management Permission must be granted in order for MBean function calls to succeed. >> 33: > > I'd probably paraphrase this a bit. It's running with a security manager - not just running the agent with security manager. Perhaps something along the lines of: "When running with a security manager, the 'control' Management Permission must be granted to control the agent through the MBean. To set fine grained permissions for authenticated remote users, see e.g. https://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html#gdeup and https://docs.oracle.com/javadb/10.10.1.2/adminguide/radminjmxenablepolicy.html#radminjmxenablepolicy. Blahblahblah." Ok I have modified the description in https://github.com/openjdk/jmc/pull/39/commits/d94062ca316631dffba2e4642215ada40e34ff03. Let me know what you think. ------------- PR: https://git.openjdk.java.net/jmc/pull/39 From mwengner at openjdk.java.net Tue Jan 21 23:25:44 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Tue, 21 Jan 2020 23:25:44 GMT Subject: [Rev 08] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: <4UUA2q8DmLIDV0G-S7nKgcFblusdRghYE6l4UblJ5ao=.6ee291cf-491c-4ec4-91ca-5d28ab3828bc@github.com> > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - 910a015c: 6670: partial commit Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/521d1709..910a015c Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.08 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.07-08 Stats: 184 lines in 12 files changed: 167 ins; 12 del; 5 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From jkang at openjdk.java.net Wed Jan 22 16:30:42 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 22 Jan 2020 16:30:42 GMT Subject: [Rev 08] RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: <-UqG2ofduzPXTKh_EyYJJ0_lQEwzhHou5dFDPd23z3g=.cc669f76-c833-4aea-bc92-97fe95c68346@github.com> > This patch addresses https://bugs.openjdk.java.net/browse/JMC-6657, which itself is a clone of https://bugs.openjdk.java.net/browse/JMC-5923 that targets the Memory and TLAB pages, rather than the stacktrace view. > > The ItemHistogram and related classes now have support for Percentage columns that divides the aggregate value for items in a row against the aggregate value for all items in the model. > > This is used in the Memory page to show Total Allocation as a Percentage. The TLAB page is modified to be tabbed and contains two ItemHistograms, one for classifying against Threads (previously existed) and one against Top Methods (new). Both also have two new columns: allocations inside and outside TLABs, as a percentage. > > ![tlab-page](https://user-images.githubusercontent.com/5430520/71093691-b2094c00-2177-11ea-9965-f27948964cd3.png) > TLABs by Top Methods, showcasing sorting by the new percentage column. Together with the stacktrace view, I believe these changes make it easier to see relevant areas of allocation pressure. The pull request has been updated with 1 additional commit. ------------- Added commits: - c819e9d8: Remove count column and hide average columns by default on TlabPage Changes: - all: https://git.openjdk.java.net/jmc/pull/21/files - new: https://git.openjdk.java.net/jmc/pull/21/files/b5ddfdc1..c819e9d8 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/21/webrev.08 - incr: https://webrevs.openjdk.java.net/jmc/21/webrev.07-08 Stats: 6 lines in 2 files changed: 2 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/21.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/21/head:pull/21 PR: https://git.openjdk.java.net/jmc/pull/21 From jkang at openjdk.java.net Wed Jan 22 16:30:42 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 22 Jan 2020 16:30:42 GMT Subject: RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: On Mon, 20 Jan 2020 15:00:00 GMT, Marcus Hirt wrote: >> Note that copyrights need to be updated. > > Hi Jie! > > How about hiding the count column, or even removing it? I believe this is the event count for both of the TLAB events - it does not correspond to the number of actual objects allocated. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, with a proper description, but the total event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. > > Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. > Hi Jie! > > How about hiding the count column, or even removing it? I believe this is the event count for both of the TLAB events - it does not correspond to the number of actual objects allocated. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, with a proper description, but the total event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. > > Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. I agree with your suggestions. I've removed the count column and hidden the average columns by default. I am currently working on the backdrop bars. It's a bit more complicated than I had initially hoped. I think an estimated count of number of objects allocated could be useful. I can also try to add this here, but I think it's extending a little more past the issue contents. Is it acceptable if I open another issue in JIRA to address this? ------------- PR: https://git.openjdk.java.net/jmc/pull/21 From mwengner at openjdk.java.net Wed Jan 22 17:34:02 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 17:34:02 GMT Subject: [Rev 09] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - 9a5d526d: 6670: message bundle correction Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/910a015c..9a5d526d Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.09 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.08-09 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 17:34:04 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 17:34:04 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Tue, 21 Jan 2020 11:53:48 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java line 80: > >> 79: >> 80: import static org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages.STACKTRACE_UNCLASSIFIABLE_FRAME; >> 81: import static org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages.STACKTRACE_UNCLASSIFIABLE_FRAME_DESC; > > Messages to be shared should not be in an internal bundle. I've put them into the move them into the package : org.openjdk.jmc.flightrecorder.stacktrace.messages.common. ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 17:34:03 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 17:34:03 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Tue, 21 Jan 2020 11:52:57 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java line 46: > >> 45: import org.openjdk.jmc.flightrecorder.stacktrace.StacktraceFrame; >> 46: import org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages; >> 47: > > Messages to be shared should not be in an internal bundle. I've put them into the move them into the package : org.openjdk.jmc.flightrecorder.stacktrace.messages.common. is it fine ? ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 17:34:04 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 17:34:04 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Tue, 21 Jan 2020 11:55:04 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/messages.properties line 39: > >> 38: STACKTRACE_UNCLASSIFIABLE_FRAME=~ UNCLASSIFIABLE ~ >> 39: STACKTRACE_UNCLASSIFIABLE_FRAME_DESC=Unclassified means the stacktrace reached the stackdepth limit > > Lacks a newline at the end of the last property. corrected ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 17:45:24 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 17:45:24 GMT Subject: [Rev 10] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - 3f9ec087: 6670: cleanup Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/9a5d526d..3f9ec087 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.10 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.09-10 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 18:00:38 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 18:00:38 GMT Subject: [Rev 11] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - fac00a68: 6670: spotless correction Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/3f9ec087..fac00a68 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.11 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.10-11 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Wed Jan 22 18:45:47 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 22 Jan 2020 18:45:47 GMT Subject: RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: On Wed, 22 Jan 2020 16:10:19 GMT, Jie Kang wrote: >> Hi Jie! >> >> How about hiding the count column, or even removing it? I believe this is the event count for both of the TLAB events - it does not correspond to the number of actual objects allocated. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, with a proper description, but the total event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. >> >> Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. > >> Hi Jie! >> >> How about hiding the count column, or even removing it? I believe this is the event count for both of the TLAB events - it does not correspond to the number of actual objects allocated. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, with a proper description, but the total event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. >> >> Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. > > I agree with your suggestions. I've removed the count column and hidden the average columns by default. I am currently working on the backdrop bars. It's a bit more complicated than I had initially hoped. > > I think an estimated count of number of objects allocated could be useful. I can also try to add this here, but I think it's extending a little more past the issue contents. Is it acceptable if I open another issue in JIRA to address this? > Is it acceptable if I open another issue in JIRA to address this? Certainly! ------------- PR: https://git.openjdk.java.net/jmc/pull/21 From hirt at openjdk.java.net Wed Jan 22 19:00:17 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 22 Jan 2020 19:00:17 GMT Subject: [Rev 01] RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> Message-ID: On Wed, 22 Jan 2020 19:00:17 GMT, Jessye Coleman-Shapiro wrote: >> This patch adds a permission check to Agent MBean functions for the 'control' management permission. >> >> I have also added a test "testPermissionChecks" to see if a security exception is fired when this permission is not given. > > The pull request has been updated with 1 additional commit. Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/39 From mwengner at openjdk.java.net Wed Jan 22 19:29:55 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 19:29:55 GMT Subject: [Rev 12] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: > 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View > https://bugs.openjdk.java.net/browse/JMC-6670 The pull request has been updated with 1 additional commit. ------------- Added commits: - fc80b578: 6670: messages package correction Changes: - all: https://git.openjdk.java.net/jmc/pull/38/files - new: https://git.openjdk.java.net/jmc/pull/38/files/fac00a68..fc80b578 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/38/webrev.12 - incr: https://webrevs.openjdk.java.net/jmc/38/webrev.11-12 Stats: 121 lines in 9 files changed: 58 ins; 60 del; 3 mod Patch: https://git.openjdk.java.net/jmc/pull/38.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/38/head:pull/38 PR: https://git.openjdk.java.net/jmc/pull/38 From mwengner at openjdk.java.net Wed Jan 22 19:30:36 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Wed, 22 Jan 2020 19:30:36 GMT Subject: [Rev 07] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: On Wed, 22 Jan 2020 17:29:56 GMT, Miroslav Wengner wrote: >> application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java line 46: >> >>> 45: import org.openjdk.jmc.flightrecorder.stacktrace.StacktraceFrame; >>> 46: import org.openjdk.jmc.flightrecorder.stacktrace.messages.internal.Messages; >>> 47: >> >> Messages to be shared should not be in an internal bundle. > > I've put them into the move them into the package : org.openjdk.jmc.flightrecorder.stacktrace.messages.common. > is it fine ? moved to the org.openjdk.jmc.flightrecorder.stacktrace ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From jkang at openjdk.java.net Wed Jan 22 21:29:52 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 22 Jan 2020 21:29:52 GMT Subject: RFR: 6657: Add allocation pressure column to Memory and TLAB views In-Reply-To: References: Message-ID: On Wed, 22 Jan 2020 18:45:38 GMT, Marcus Hirt wrote: >>> Hi Jie! >>> >>> How about hiding the count column, or even removing it? I believe this is the event count for both of the TLAB events - it does not correspond to the number of actual objects allocated. We could perhaps estimate the number of allocated objects (using the size of the allocated object inside tlab and the tlab size) and add that as a new column, with a proper description, but the total event count doesn't really make sense. Now that we have the percentages, we may want to instead have the backdrop bars on them. >>> >>> Also, how about hiding the average columns by default? There is a bit of information overload right now, and I think the sums may be what people will usually want. They can show the other columns if they need them. >> >> I agree with your suggestions. I've removed the count column and hidden the average columns by default. I am currently working on the backdrop bars. It's a bit more complicated than I had initially hoped. >> >> I think an estimated count of number of objects allocated could be useful. I can also try to add this here, but I think it's extending a little more past the issue contents. Is it acceptable if I open another issue in JIRA to address this? > >> Is it acceptable if I open another issue in JIRA to address this? > > Certainly! > > Is it acceptable if I open another issue in JIRA to address this? > > Certainly! Created @ https://bugs.openjdk.java.net/browse/JMC-6678 ------------- PR: https://git.openjdk.java.net/jmc/pull/21 From aptmac at openjdk.java.net Wed Jan 22 22:06:28 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Wed, 22 Jan 2020 22:06:28 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows Message-ID: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> This PR addresses JMC-6531 [[0]](https://bugs.openjdk.java.net/browse/JMC-6531), in which the flame chart view displays nothing in Windows. tl;dr: the proposed solution uses a fork of d3-flame-graph [[1]](https://github.com/aptmac/d3-flame-graph) which substitutes the incompatible svg element with one that works with Internet Explorer, and modifies the flameviewColoring script to work with an older ECMA version. Screenshot of Windows: ![windows-works](https://user-images.githubusercontent.com/10425301/72937103-7cd3b900-3d36-11ea-9939-8c71880cfbee.png) For reference, here's the same view in Linux: ![2020-01-22-165007_1913x1031_scrot](https://user-images.githubusercontent.com/10425301/72937506-4480aa80-3d37-11ea-9628-431f240dd457.png) When I had originally taken a look into the SWT Browser and compatibility with Windows, it looked as though we'd be able to use Edge as an embedded browser, which would be nice because it already plays nice with the d3-flame-graph library. After quite a bit of trial and error I was first able to get d3 to work (making simple line charts), and then found that d3-flame-graph version <= 2.0.2 will work. With this older version of d3-flame-graph the coloured labels will be drawn, but no text is shown - regardless of the SWT browser property being set to IE or Edge .. which makes it look like Edge can be used for visiting external webpages, but not local ones (internal browser stays IE). This is because the foreignObject element is incompatible with IE, and this has already been raised as an issue and closed as a "wontfix" by the maintainer on the upstream repo [[2]](https://github.com/spiermar/d3-flame-graph/issues/84). I made a fork of the d3-flame-graph repo [[1]](https://github.com/aptmac/d3-flame-graph), which accomplishes two things: - substitutes `` for `` [[3]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211) - trims the text in the labels because the ellipsis css doesn't work [[4]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238) This forked version of d3-flame-graph is downloaded by the maven-download-plugin like the other jslibs, and is used if the Environment type is `WINDOWS` as detected in `FlameGraphView.java` [[5]](https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102). Now that the flame chart view works at this point, I had to edit `flameviewColoring.java` to be compatible with IE. From what I can find, Internet Explorer uses JScript, which in it's latest version supports ECMA 5 [[6]](https://en.wikipedia.org/wiki/JScript#JScript). This means no maps, no named functions, etc. Lastly, and not completely related to this issue, I changed the name of `page.template` to `template.html` because my IDE won't provide syntax highlighting unless the file ends with -.html, and it was a big help here. If it's deemed unecessary I can just drop the associated commit. Let me know what you think! [0] https://bugs.openjdk.java.net/browse/JMC-6531 [1] https://github.com/aptmac/d3-flame-graph [2] https://github.com/spiermar/d3-flame-graph/issues/84 [3] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211 [4] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238 [5] https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102 [6] https://en.wikipedia.org/wiki/JScript#JScript ------------- Commits: - 3b354650: rename page.template to template.html for compatibility with IDE syntax highlighting - b64b4349: 6531: Make the flame chart view render labels on windows Changes: https://git.openjdk.java.net/jmc/pull/41/files Webrev: https://webrevs.openjdk.java.net/jmc/41/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6531 Stats: 64 lines in 4 files changed: 31 ins; 0 del; 33 mod Patch: https://git.openjdk.java.net/jmc/pull/41.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/41/head:pull/41 PR: https://git.openjdk.java.net/jmc/pull/41 From aptmac at openjdk.java.net Wed Jan 22 22:22:15 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Wed, 22 Jan 2020 22:22:15 GMT Subject: [Rev 01] RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> Message-ID: > This PR addresses JMC-6531 [[0]](https://bugs.openjdk.java.net/browse/JMC-6531), in which the flame chart view displays nothing in Windows. > > tl;dr: the proposed solution uses a fork of d3-flame-graph [[1]](https://github.com/aptmac/d3-flame-graph) which substitutes the incompatible svg element with one that works with Internet Explorer, and modifies the flameviewColoring script to work with an older ECMA version. > > Screenshot of Windows: > ![windows-works](https://user-images.githubusercontent.com/10425301/72937103-7cd3b900-3d36-11ea-9939-8c71880cfbee.png) > > For reference, here's the same view in Linux: > ![2020-01-22-165007_1913x1031_scrot](https://user-images.githubusercontent.com/10425301/72937506-4480aa80-3d37-11ea-9628-431f240dd457.png) > > When I had originally taken a look into the SWT Browser and compatibility with Windows, it looked as though we'd be able to use Edge as an embedded browser, which would be nice because it already plays nice with the d3-flame-graph library. After quite a bit of trial and error I was first able to get d3 to work (making simple line charts), and then found that d3-flame-graph version <= 2.0.2 will work. With this older version of d3-flame-graph the coloured labels will be drawn, but no text is shown - regardless of the SWT browser property being set to IE or Edge .. which makes it look like Edge can be used for visiting external webpages, but not local ones (internal browser stays IE). This is because the foreignObject element is incompatible with IE, and this has already been raised as an issue and closed as a "wontfix" by the maintainer on the upstream repo [[2]](https://github.com/spiermar/d3-flame-graph/issues/84). > > I made a fork of the d3-flame-graph repo [[1]](https://github.com/aptmac/d3-flame-graph), which accomplishes two things: > - substitutes `` for `` [[3]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211) > - trims the text in the labels because the ellipsis css doesn't work [[4]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238) > > This forked version of d3-flame-graph is downloaded by the maven-download-plugin like the other jslibs, and is used if the Environment type is `WINDOWS` as detected in `FlameGraphView.java` [[5]](https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102). > > Now that the flame chart view works at this point, I had to edit `flameviewColoring.java` to be compatible with IE. From what I can find, Internet Explorer uses JScript, which in it's latest version supports ECMA 5 [[6]](https://en.wikipedia.org/wiki/JScript#JScript). This means no maps, no named functions, etc. > > Lastly, and not completely related to this issue, I changed the name of `page.template` to `template.html` because my IDE won't provide syntax highlighting unless the file ends with -.html, and it was a big help here. If it's deemed unecessary I can just drop the associated commit. > > Let me know what you think! > > [0] https://bugs.openjdk.java.net/browse/JMC-6531 > [1] https://github.com/aptmac/d3-flame-graph > [2] https://github.com/spiermar/d3-flame-graph/issues/84 > [3] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211 > [4] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238 > [5] https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102 > [6] https://en.wikipedia.org/wiki/JScript#JScript The pull request has been updated with 1 additional commit. ------------- Added commits: - c4c9e91a: fix spacing of tags in the pom.xml Changes: - all: https://git.openjdk.java.net/jmc/pull/41/files - new: https://git.openjdk.java.net/jmc/pull/41/files/3b354650..c4c9e91a Webrevs: - full: https://webrevs.openjdk.java.net/jmc/41/webrev.01 - incr: https://webrevs.openjdk.java.net/jmc/41/webrev.00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jmc/pull/41.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/41/head:pull/41 PR: https://git.openjdk.java.net/jmc/pull/41 From jkang at openjdk.java.net Wed Jan 22 22:29:57 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Wed, 22 Jan 2020 22:29:57 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> Message-ID: On Wed, 22 Jan 2020 21:57:59 GMT, Alex Macdonald wrote: > This PR addresses JMC-6531 [[0]](https://bugs.openjdk.java.net/browse/JMC-6531), in which the flame chart view displays nothing in Windows. > > tl;dr: the proposed solution uses a fork of d3-flame-graph [[1]](https://github.com/aptmac/d3-flame-graph) which substitutes the incompatible svg element with one that works with Internet Explorer, and modifies the flameviewColoring script to work with an older ECMA version. > > Screenshot of Windows: > ![windows-works](https://user-images.githubusercontent.com/10425301/72937103-7cd3b900-3d36-11ea-9939-8c71880cfbee.png) > > For reference, here's the same view in Linux: > ![2020-01-22-165007_1913x1031_scrot](https://user-images.githubusercontent.com/10425301/72937506-4480aa80-3d37-11ea-9628-431f240dd457.png) > > When I had originally taken a look into the SWT Browser and compatibility with Windows, it looked as though we'd be able to use Edge as an embedded browser, which would be nice because it already plays nice with the d3-flame-graph library. After quite a bit of trial and error I was first able to get d3 to work (making simple line charts), and then found that d3-flame-graph version <= 2.0.2 will work. With this older version of d3-flame-graph the coloured labels will be drawn, but no text is shown - regardless of the SWT browser property being set to IE or Edge .. which makes it look like Edge can be used for visiting external webpages, but not local ones (internal browser stays IE). This is because the foreignObject element is incompatible with IE, and this has already been raised as an issue and closed as a "wontfix" by the maintainer on the upstream repo [[2]](https://github.com/spiermar/d3-flame-graph/issues/84). > > I made a fork of the d3-flame-graph repo [[1]](https://github.com/aptmac/d3-flame-graph), which accomplishes two things: > - substitutes `` for `` [[3]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211) > - trims the text in the labels because the ellipsis css doesn't work [[4]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238) > > This forked version of d3-flame-graph is downloaded by the maven-download-plugin like the other jslibs, and is used if the Environment type is `WINDOWS` as detected in `FlameGraphView.java` [[5]](https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102). > > Now that the flame chart view works at this point, I had to edit `flameviewColoring.java` to be compatible with IE. From what I can find, Internet Explorer uses JScript, which in it's latest version supports ECMA 5 [[6]](https://en.wikipedia.org/wiki/JScript#JScript). This means no maps, no named functions, etc. > > Lastly, and not completely related to this issue, I changed the name of `page.template` to `template.html` because my IDE won't provide syntax highlighting unless the file ends with -.html, and it was a big help here. If it's deemed unecessary I can just drop the associated commit. > > Let me know what you think! > > [0] https://bugs.openjdk.java.net/browse/JMC-6531 > [1] https://github.com/aptmac/d3-flame-graph > [2] https://github.com/spiermar/d3-flame-graph/issues/84 > [3] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211 > [4] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238 > [5] https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102 > [6] https://en.wikipedia.org/wiki/JScript#JScript The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? Does it introduce issues outside of IE? ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From aptmac at openjdk.java.net Thu Jan 23 15:36:20 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 23 Jan 2020 15:36:20 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> Message-ID: <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> On Wed, 22 Jan 2020 22:29:20 GMT, Jie Kang wrote: >> This PR addresses JMC-6531 [[0]](https://bugs.openjdk.java.net/browse/JMC-6531), in which the flame chart view displays nothing in Windows. >> >> tl;dr: the proposed solution uses a fork of d3-flame-graph [[1]](https://github.com/aptmac/d3-flame-graph) which substitutes the incompatible svg element with one that works with Internet Explorer, and modifies the flameviewColoring script to work with an older ECMA version. >> >> Screenshot of Windows: >> ![windows-works](https://user-images.githubusercontent.com/10425301/72937103-7cd3b900-3d36-11ea-9939-8c71880cfbee.png) >> >> For reference, here's the same view in Linux: >> ![2020-01-22-165007_1913x1031_scrot](https://user-images.githubusercontent.com/10425301/72937506-4480aa80-3d37-11ea-9628-431f240dd457.png) >> >> When I had originally taken a look into the SWT Browser and compatibility with Windows, it looked as though we'd be able to use Edge as an embedded browser, which would be nice because it already plays nice with the d3-flame-graph library. After quite a bit of trial and error I was first able to get d3 to work (making simple line charts), and then found that d3-flame-graph version <= 2.0.2 will work. With this older version of d3-flame-graph the coloured labels will be drawn, but no text is shown - regardless of the SWT browser property being set to IE or Edge .. which makes it look like Edge can be used for visiting external webpages, but not local ones (internal browser stays IE). This is because the foreignObject element is incompatible with IE, and this has already been raised as an issue and closed as a "wontfix" by the maintainer on the upstream repo [[2]](https://github.com/spiermar/d3-flame-graph/issues/84). >> >> I made a fork of the d3-flame-graph repo [[1]](https://github.com/aptmac/d3-flame-graph), which accomplishes two things: >> - substitutes `` for `` [[3]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211) >> - trims the text in the labels because the ellipsis css doesn't work [[4]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238) >> >> This forked version of d3-flame-graph is downloaded by the maven-download-plugin like the other jslibs, and is used if the Environment type is `WINDOWS` as detected in `FlameGraphView.java` [[5]](https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102). >> >> Now that the flame chart view works at this point, I had to edit `flameviewColoring.java` to be compatible with IE. From what I can find, Internet Explorer uses JScript, which in it's latest version supports ECMA 5 [[6]](https://en.wikipedia.org/wiki/JScript#JScript). This means no maps, no named functions, etc. >> >> Lastly, and not completely related to this issue, I changed the name of `page.template` to `template.html` because my IDE won't provide syntax highlighting unless the file ends with -.html, and it was a big help here. If it's deemed unecessary I can just drop the associated commit. >> >> Let me know what you think! >> >> [0] https://bugs.openjdk.java.net/browse/JMC-6531 >> [1] https://github.com/aptmac/d3-flame-graph >> [2] https://github.com/spiermar/d3-flame-graph/issues/84 >> [3] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211 >> [4] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238 >> [5] https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102 >> [6] https://en.wikipedia.org/wiki/JScript#JScript > > The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? Does it introduce issues outside of IE? > The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? I'll post back on the original issue to see what they think. It looks like they start using ES6 syntax later on, which would explain why versions `> 2.0.2` don't work on IE, so inclusion of this work may be better suited for a branch of a prior version (2.0.2-ie?). > Does it introduce issues outside of IE? Outside of IE I didn't encounter any problems (but I didn't check much more than seeing what it looked like if used in Linux for JMC), although with regards to this patch and JMC the modified JS is only used in Windows environments. There is a bit more computation in the fork - the text on the labels need to be trimmed for text-overflow instead of having the css format it. From what I understand, elements within `` tags all belong to the svg namespace, but putting elements inside a `` [0] allows them to be recognized as being in the HTML namespace. So in the original code the text on the labels be treated as HTML and formatted by the css, but `svg text` doesn't appear to be formatted the same way, so there's an added function in the IE fork [1] that trims the text instead. [0] https://www.w3.org/TR/SVG2/embedded.html#ForeignObjectElement [1] https://github.com/aptmac/d3-flame-graph/blob/internet-explorer-compatibility/dist/d3-flamegraph-ie.js#L5242 ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From ehelin at openjdk.java.net Thu Jan 23 15:55:02 2020 From: ehelin at openjdk.java.net (Erik Helin) Date: Thu, 23 Jan 2020 15:55:02 GMT Subject: [Rev 01] RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> Message-ID: On Wed, 22 Jan 2020 19:00:05 GMT, Marcus Hirt wrote: >> The pull request has been updated with 1 additional commit. > > Marked as reviewed by hirt (Lead). Please ignore this comment, it is just to give the bots a nudge ?? ------------- PR: https://git.openjdk.java.net/jmc/pull/39 From aptmac at openjdk.java.net Thu Jan 23 16:39:08 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 23 Jan 2020 16:39:08 GMT Subject: RFR: 6364: Improvements to the Thread Graph In-Reply-To: References: <3b_EN291IWMTMl6vId_3HM3r9b2p0Bjxd9QYH5qgDO8=.50cc047a-4486-469a-a341-5908f78bb6df@github.com> <9z2_Fmh0wzUWsp9Tu1bEudv8_BvAjeAC6RVPPe76FRQ=.1d13e3bc-3d48-4a9b-831f-40b784d57106@github.com> Message-ID: On Mon, 20 Jan 2020 16:19:21 GMT, Henrik Dafg?rd wrote: >>> jcheck is requesting: >>> >>> s/JMC-6364/6364 >> >> Neat, thanks for the heads up. I changed the commit description and force pushed them back here, but it looks like once a PR has been made with the invalid ID format it's the PR name change that gets jcheck to pass. This automation is nice, the `mvn spotless:apply` was especially nice to have. > > I actually liked the old behaviour of being able to see all thread states on one screen (given that you had sufficient pixels to display them). It gave a more helpful overview of the application state during the recording. I.e. the old view had a minimum lane height of 1 pixel. To do the same thing here you'd have to collapse the table, since 1 pixel isn't enough to render thread names. > > The selection highlighter also seems to have taken a significant performance hit, so it's a bit harder to drag and select a region of threads. > > Unless I'm missing something it also appears that I can't sort the thread table, and I'm uncertain what order the threads are shown in now. > > I'm also a bit confused by why the scroll bar on the right hand side scrolls horizontally when it's rendered vertically, and the component now doesn't zoom through time with the scroll wheel, like all other pages do? > > It would also be nice if the "Thread State Selection" toolbar button could do more of the "Edit Thread Activity Lanes" dialog, since they're doing very similar things? > I actually liked the old behaviour of being able to see all thread states on one screen (given that you had sufficient pixels to display them). It gave a more helpful overview of the application state during the recording. I.e. the old view had a minimum lane height of 1 pixel. To do the same thing here you'd have to collapse the table, since 1 pixel isn't enough to render thread names. Fair enough, or perhaps allowing the chart lanes to shrink to that size, but have the text lanes remain at a size that is readable? e.g., having the text lanes hit a min height of ~13px, so there will only be a difference in lane height for 1-12px, and everything above that they re-sync in terms of height? > The selection highlighter also seems to have taken a significant performance hit, so it's a bit harder to drag and select a region of threads. > > Unless I'm missing something it also appears that I can't sort the thread table, and I'm uncertain what order the threads are shown in now. It should be the same order as they are now, the current table has been moved to be like a modal instead, it's available to open via a button near the "edit thread activity lanes" button in the top-right of the page. It's the same table, so the existing sorting mechanics should apply. > I'm also a bit confused by why the scroll bar on the right hand side scrolls horizontally when it's rendered vertically, Are you referring to the SWT spinner? That handles zooming in/out of the chart, and the scrollbar to the right of the chart (should) scroll vertically. > and the component now doesn't zoom through time with the scroll wheel, like all other pages do? This has to do more with what the expected behaviour should be on a page that has scrollable content. In the cases of the other pages, the charts/graphs don't scroll vertically, so having JMC-specific defined controls with the scrollwheel to zoom should be fine. However, in many other applications where pages have scrollable content (e.g., internet browsers, photoshop, music editing software, etc.) the scrollwheel is reserved for vertically navigating the content. > It would also be nice if the "Thread State Selection" toolbar button could do more of the "Edit Thread Activity Lanes" dialog, since they're doing very similar things? I could take a look into that, the concern was that it's quite a bit of information/controls to fit into a dropdown of limited space without having it overlap too much of the chart content. ------------- PR: https://git.openjdk.java.net/jmc/pull/27 From hirt at openjdk.java.net Thu Jan 23 23:15:29 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 23 Jan 2020 23:15:29 GMT Subject: [Integrated] RFR: 6572: Make mbean functions protected by permission checks In-Reply-To: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> References: <1Y3Plnbh5ixiHI0qlP2-w0kei9Mndrv-DMcDckUTsno=.997dce68-5f3a-4564-a969-605bd78bcd41@github.com> Message-ID: <4d866680-06ff-45de-baf8-ec5f3f207c3c@openjdk.org> Changeset: 2dd271f4 Author: Jessye Coleman-Shapiro Committer: Marcus Hirt Date: 2020-01-23 23:14:36 +0000 URL: https://git.openjdk.java.net/jmc/commit/2dd271f4 6572: Make mbean functions protected by permission checks Reviewed-by: hirt ! core/org.openjdk.jmc.agent/README.md ! core/org.openjdk.jmc.agent/pom.xml ! core/org.openjdk.jmc.agent/src/main/java/org/openjdk/jmc/agent/jmx/AgentController.java + core/org.openjdk.jmc.agent/src/test/java/org/openjdk/jmc/agent/test/TestPermissionChecks.java + core/org.openjdk.jmc.agent/src/test/resources/org/openjdk/jmc/agent/test/failing_control_permission.policy From hirt at openjdk.java.net Thu Jan 23 23:23:27 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 23 Jan 2020 23:23:27 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> Message-ID: On Thu, 23 Jan 2020 15:35:30 GMT, Alex Macdonald wrote: >> The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? Does it introduce issues outside of IE? > >> The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? > > I'll post back on the original issue to see what they think. It looks like they start using ES6 syntax later on, which would explain why versions `> 2.0.2` don't work on IE, so inclusion of this work may be better suited for a branch of a prior version (2.0.2-ie?). > >> Does it introduce issues outside of IE? > > Outside of IE I didn't encounter any problems (but I didn't check much more than seeing what it looked like if used in Linux for JMC), although with regards to this patch and JMC the modified JS is only used in Windows environments. > > There is a bit more computation in the fork - the text on the labels need to be trimmed for text-overflow instead of having the css format it. From what I understand, elements within `` tags all belong to the svg namespace, but putting elements inside a `` [0] allows them to be recognized as being in the HTML namespace. So in the original code the text on the labels be treated as HTML and formatted by the css, but `svg text` doesn't appear to be formatted the same way, so there's an added function in the IE fork [1] that trims the text instead. > > [0] https://www.w3.org/TR/SVG2/embedded.html#ForeignObjectElement > [1] https://github.com/aptmac/d3-flame-graph/blob/internet-explorer-compatibility/dist/d3-flamegraph-ie.js#L5242 To me it's a bit scary (as in possibly maintenance heavy) to make a fork of the d3-library, rather than investing in making the SWT browser component work with Edge or chromium. This could potentially be a stop gap measure though. @mirage22, would this complicate anything you were planning on doing with the flame view? ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From hirt at openjdk.java.net Thu Jan 23 23:25:25 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 23 Jan 2020 23:25:25 GMT Subject: [Rev 12] RFR: 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View In-Reply-To: References: Message-ID: <8NluAC-euKUOSr0cR0EGdfWrUZBupVyYRe2VqV5Ob4A=.2087e392-5ecd-48d6-ae3f-4f7349158984@github.com> On Thu, 23 Jan 2020 23:25:25 GMT, Miroslav Wengner wrote: >> 6670 : Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View >> https://bugs.openjdk.java.net/browse/JMC-6670 > > The pull request has been updated with 1 additional commit. Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/38 From hirt at openjdk.java.net Fri Jan 24 13:38:32 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Fri, 24 Jan 2020 13:38:32 GMT Subject: [Integrated] RFR: 6670: harmonize unclassifiable across flameview In-Reply-To: References: Message-ID: Changeset: 875abcd3 Author: Miroslav Wengner Committer: Marcus Hirt Date: 2020-01-24 13:37:30 +0000 URL: https://git.openjdk.java.net/jmc/commit/875abcd3 6670: Harmonize ~ Unclassifiable ~ across Flame View and Stacktrace View Reviewed-by: hirt ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/tree/TraceTreeUtils.java ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java ! application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js ! core/org.openjdk.jmc.flightrecorder/META-INF/MANIFEST.MF + core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/stacktrace/Messages.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/stacktrace/StacktraceFormatToolkit.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/Messages.java + core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages.properties ! core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/messages.properties ! core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/messages_ja.properties ! core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages/internal/messages_zh_CN.properties + core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages_ja.properties + core/org.openjdk.jmc.flightrecorder/src/main/resources/org/openjdk/jmc/flightrecorder/stacktrace/messages_zh_CN.properties From hdafgard at openjdk.java.net Fri Jan 24 15:48:06 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Fri, 24 Jan 2020 15:48:06 GMT Subject: [Rev 03] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. The pull request has been updated with 1 additional commit. ------------- Added commits: - f102abbb: Add test case with custm jfr file Changes: - all: https://git.openjdk.java.net/jmc/pull/31/files - new: https://git.openjdk.java.net/jmc/pull/31/files/9fdd627c..f102abbb Webrevs: - full: https://webrevs.openjdk.java.net/jmc/31/webrev.03 - incr: https://webrevs.openjdk.java.net/jmc/31/webrev.02-03 Stats: 89 lines in 5 files changed: 86 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From jkang at openjdk.java.net Fri Jan 24 16:55:09 2020 From: jkang at openjdk.java.net (Jie Kang) Date: Fri, 24 Jan 2020 16:55:09 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> Message-ID: <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> On Thu, 23 Jan 2020 23:23:03 GMT, Marcus Hirt wrote: >>> The comment in the upstream d3-flame-graph suggests that there is no solution and unless someone comes up with one, nothing will change. Your commits in the fork seem to be a solution. Could that be proposed upstream? >> >> I'll post back on the original issue to see what they think. It looks like they start using ES6 syntax later on, which would explain why versions `> 2.0.2` don't work on IE, so inclusion of this work may be better suited for a branch of a prior version (2.0.2-ie?). >> >>> Does it introduce issues outside of IE? >> >> Outside of IE I didn't encounter any problems (but I didn't check much more than seeing what it looked like if used in Linux for JMC), although with regards to this patch and JMC the modified JS is only used in Windows environments. >> >> There is a bit more computation in the fork - the text on the labels need to be trimmed for text-overflow instead of having the css format it. From what I understand, elements within `` tags all belong to the svg namespace, but putting elements inside a `` [0] allows them to be recognized as being in the HTML namespace. So in the original code the text on the labels be treated as HTML and formatted by the css, but `svg text` doesn't appear to be formatted the same way, so there's an added function in the IE fork [1] that trims the text instead. >> >> [0] https://www.w3.org/TR/SVG2/embedded.html#ForeignObjectElement >> [1] https://github.com/aptmac/d3-flame-graph/blob/internet-explorer-compatibility/dist/d3-flamegraph-ie.js#L5242 > > To me it's a bit scary (as in possibly maintenance heavy) to make a fork of the d3-library, rather than investing in making the SWT browser component work with Edge or chromium. This could potentially be a stop gap measure though. @mirage22, would this complicate anything you were planning on doing with the flame view? While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From aptmac at openjdk.java.net Fri Jan 24 18:09:28 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Fri, 24 Jan 2020 18:09:28 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Fri, 24 Jan 2020 16:54:52 GMT, Jie Kang wrote: >> To me it's a bit scary (as in possibly maintenance heavy) to make a fork of the d3-library, rather than investing in making the SWT browser component work with Edge or chromium. This could potentially be a stop gap measure though. @mirage22, would this complicate anything you were planning on doing with the flame view? > > While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. > While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. That sounds fair, I replied to the original Windows-related issue and tagged the repo owner, will comment back when there's a response. In other news it looks like the latest version of Edge is based on Chromium [[0]](https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium), so getting Chromium support would be nice. Progress on that is tracked at https://bugs.eclipse.org/bugs/show_bug.cgi?id=549585 [0] https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From mwengner at openjdk.java.net Sat Jan 25 11:47:26 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Sat, 25 Jan 2020 11:47:26 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Fri, 24 Jan 2020 18:09:15 GMT, Alex Macdonald wrote: >> While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. > >> While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. > > That sounds fair, I replied to the original Windows-related issue and tagged the repo owner, will comment back when there's a response. > > In other news it looks like the latest version of Edge is based on Chromium [[0]](https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium), so getting Chromium support would be nice. Progress on that is tracked at https://bugs.eclipse.org/bugs/show_bug.cgi?id=549585 > > [0] https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. I'd rather to stay with ECMA 6 due to the d3 library compatibility and its future development. I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. we are planning to do the search/highlighting of nodes inside the flameview. This feature uses d3-lib functionality. I don't know whether this patch will not force us to maintain also the fork of d3 itself. ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From hirt at openjdk.java.net Sat Jan 25 17:17:07 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Sat, 25 Jan 2020 17:17:07 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Sat, 25 Jan 2020 11:47:13 GMT, Miroslav Wengner wrote: >>> While the guard to only use this on Windows does mitigate impact of this patch, I also am concerned with maintenance of a fork of the d3-flame-graph. I would rather see the upstream updated, or as Marcus stated, the SWT browser updated to use an alternative (newer) browser. >> >> That sounds fair, I replied to the original Windows-related issue and tagged the repo owner, will comment back when there's a response. >> >> In other news it looks like the latest version of Edge is based on Chromium [[0]](https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium), so getting Chromium support would be nice. Progress on that is tracked at https://bugs.eclipse.org/bugs/show_bug.cgi?id=549585 >> >> [0] https://support.microsoft.com/en-ca/help/4501095/download-the-new-microsoft-edge-based-on-chromium > > It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. > I'd rather to stay with ECMA 6 due to the d3 library compatibility and its future development. > > I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. > > we are planning to do the search/highlighting of nodes inside the flameview. This feature uses d3-lib functionality. I don't know whether this patch will not force us to maintain also the fork of d3 itself. How hard would it be to make SWT use Edge as the default embedded browser and fall back to IE if not available? ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From github.com+3274268+jcompagner at openjdk.java.net Sat Jan 25 17:31:56 2020 From: github.com+3274268+jcompagner at openjdk.java.net (Johan Compagner) Date: Sat, 25 Jan 2020 17:31:56 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Sat, 25 Jan 2020 17:16:51 GMT, Marcus Hirt wrote: >> It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. >> I'd rather to stay with ECMA 6 due to the d3 library compatibility and its future development. >> >> I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. >> >> we are planning to do the search/highlighting of nodes inside the flameview. This feature uses d3-lib functionality. I don't know whether this patch will not force us to maintain also the fork of d3 itself. > > How hard would it be to make SWT use Edge as the default embedded browser and fall back to IE if not available? > How hard would it be to make SWT use Edge as the default embedded browser and fall back to IE if not available? I think that would be not so easy. Does MS support api for this to embed edge? Besides that Edge engine is already also kind of depricated... It will be replaced with the a blink/chromium engine.. Not sure if MS will also standardize an engine to use embedded.. What do other native window apps use? The chromium case for eclipse should just be picked up and fully supported in eclipse, in my eyes really importand, eclipse should ship with there own engine which should be the same then on all platforms.. Also on the Mac because of embedded safari we already have problems... ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From aptmac at openjdk.java.net Mon Jan 27 16:29:39 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Mon, 27 Jan 2020 16:29:39 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Sat, 25 Jan 2020 17:16:51 GMT, Marcus Hirt wrote: >> It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. >> I'd rather to stay with ECMA 6 due to the d3 library compatibility and its future development. >> >> I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. >> >> we are planning to do the search/highlighting of nodes inside the flameview. This feature uses d3-lib functionality. I don't know whether this patch will not force us to maintain also the fork of d3 itself. > > How hard would it be to make SWT use Edge as the default embedded browser and fall back to IE if not available? > It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. As for "maintaining the fork", the next version up from the fork (v2.0.3) is incompatible with IE, so the fork is basically a one-shot fix that can't be updated. The interesting thing here is that we're using v2.0.3 (Sept 2018) , so if we had used just one release prior then the flame labels would have rendered in JMC Windows (without text) prior to the latest commits for colouring. > I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. Chromium support was initially slated for integration Q1 2017 [0], and the related patch looked to be on track to be posted by the end of 2019 [1], but it hasn't made it out yet. So when the patch does get posted, it'll need review, inclusion into SWT, and then shipped with a release .. we're looking at potentially quite a bit of time before this happens, but hopefully not. I'm conflicted both ways, so I'll go based on the consensus here. I'm not sure how popular JMC is for Windows, or how many people are wanting (or trying) to use the flame view, but it doesn't sit right with me that the view doesn't display anything. Maybe it can print an error screen mentioning the incompatibility instead? [0] https://projects.eclipse.org/development_effort/implement-swtchromium-integration [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=549585#c20 ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From hirt at openjdk.java.net Mon Jan 27 17:00:43 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 27 Jan 2020 17:00:43 GMT Subject: RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> <68acjbRMLklP3EHVSDntqrgJpPbAMXc_HVPpWxdUL2E=.1d2c78f4-ddda-4a33-ab00-e7cd1b116e80@github.com> <0eEKXCG5d03xu_ImemcyQ5KLGlJ3sQr55gGz6VljGJU=.0f85c639-7e93-446d-bc95-16b30849b38f@github.com> Message-ID: On Mon, 27 Jan 2020 16:29:23 GMT, Alex Macdonald wrote: >> How hard would it be to make SWT use Edge as the default embedded browser and fall back to IE if not available? > >> It doesn't feel right to me to maintain d3-flame-graph fork, as @thegreystone stated it's a bit scary. > > As for "maintaining the fork", the next version up from the fork (v2.0.3) is incompatible with IE, so the fork is basically a one-shot fix that can't be updated. The interesting thing here is that we're using v2.0.3 (Sept 2018) , so if we had used just one release prior then the flame labels would have rendered in JMC Windows (without text) prior to the latest commits for colouring. > >> I'd propose the way @thegreystone has stated -> SWT update to use an alternative (newer) browser. > > Chromium support was initially slated for integration Q1 2017 [0], and the related patch looked to be on track to be posted by the end of 2019 [1], but it hasn't made it out yet. So when the patch does get posted, it'll need review, inclusion into SWT, and then shipped with a release .. we're looking at potentially quite a bit of time before this happens, but hopefully not. > > I'm conflicted both ways, so I'll go based on the consensus here. I'm not sure how popular JMC is for Windows, or how many people are wanting (or trying) to use the flame view, but it doesn't sit right with me that the view doesn't display anything. Maybe it can print an error screen mentioning the incompatibility instead? > > [0] https://projects.eclipse.org/development_effort/implement-swtchromium-integration > [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=549585#c20 I think I'm ok with this being a stop-gap measure. It does make third party-dependencies a bit funny - and there is a bit of trust involved in getting the javascript from a private fork of a project, and even a private push of the resulting build to a CDN. As soon as the Eclipse changes are in, in any form and shape, we should switch. ------------- PR: https://git.openjdk.java.net/jmc/pull/41 From hdafgard at openjdk.java.net Mon Jan 27 19:41:17 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 27 Jan 2020 19:41:17 GMT Subject: [Rev 04] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. The pull request has been updated with 2 additional commits. ------------- Added commits: - 5fddd578: Update test recording to include partially and completely overlapping events - e6c1b149: Improve test by using correct aggregators Changes: - all: https://git.openjdk.java.net/jmc/pull/31/files - new: https://git.openjdk.java.net/jmc/pull/31/files/f102abbb..5fddd578 Webrevs: - full: https://webrevs.openjdk.java.net/jmc/31/webrev.04 - incr: https://webrevs.openjdk.java.net/jmc/31/webrev.03-04 Stats: 47 lines in 2 files changed: 4 ins; 33 del; 10 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From hdafgard at openjdk.java.net Mon Jan 27 19:57:08 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 27 Jan 2020 19:57:08 GMT Subject: [Rev 05] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: <9eGq78rcduO3SbF1gmMnYLyyTIkYpmRBpHV1ddc5xCg=.22974350-1522-42e8-8408-333ace4ba5f1@github.com> > This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. > > This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. The pull request has been updated with 1 additional commit. ------------- Added commits: - f18c5d8e: Fix formatting Changes: - all: https://git.openjdk.java.net/jmc/pull/31/files - new: https://git.openjdk.java.net/jmc/pull/31/files/5fddd578..f18c5d8e Webrevs: - full: https://webrevs.openjdk.java.net/jmc/31/webrev.05 - incr: https://webrevs.openjdk.java.net/jmc/31/webrev.04-05 Stats: 6 lines in 1 file changed: 3 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jmc/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/31/head:pull/31 PR: https://git.openjdk.java.net/jmc/pull/31 From hirt at openjdk.java.net Mon Jan 27 20:44:15 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Mon, 27 Jan 2020 20:44:15 GMT Subject: [Rev 05] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: <9eGq78rcduO3SbF1gmMnYLyyTIkYpmRBpHV1ddc5xCg=.22974350-1522-42e8-8408-333ace4ba5f1@github.com> References: <9eGq78rcduO3SbF1gmMnYLyyTIkYpmRBpHV1ddc5xCg=.22974350-1522-42e8-8408-333ace4ba5f1@github.com> Message-ID: On Mon, 27 Jan 2020 20:44:15 GMT, Henrik Dafg?rd wrote: >> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively. >> >> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods. > > The pull request has been updated with 1 additional commit. Marked as reviewed by hirt (Lead). ------------- PR: https://git.openjdk.java.net/jmc/pull/31 From hdafgard at openjdk.java.net Mon Jan 27 21:25:14 2020 From: hdafgard at openjdk.java.net (Henrik =?UTF-8?B?RGFmZ8OlcmQ=?=) Date: Mon, 27 Jan 2020 21:25:14 GMT Subject: [Integrated] RFR: 6674: Optimize finding of first start time and first & last end times In-Reply-To: References: Message-ID: <4e8b8465-781f-4f5d-99fb-ce711641553b@openjdk.org> Changeset: 6dd19dd5 Author: Henrik Dafg?rd Date: 2020-01-27 21:24:09 +0000 URL: https://git.openjdk.java.net/jmc/commit/6dd19dd5 6674: Optimize finding of first start time and first & last end times Reviewed-by: hirt ! application/org.openjdk.jmc.flightrecorder.ext.g1/src/main/java/org/openjdk/jmc/flightrecorder/ext/g1/G1Page.java ! application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/selection/FlavorToolkit.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/dataproviders/HaltsProvider.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/general/ClassLoadingRule.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/latency/JavaBlockingRule.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/GcFreedRatioRule.java ! core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/IncreasingLiveSetRule.java ! core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java ! core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/SlidingWindowToolkit.java ! core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAggregators.java ! core/tests/org.openjdk.jmc.flightrecorder.test/META-INF/MANIFEST.MF ! core/tests/org.openjdk.jmc.flightrecorder.test/pom.xml + core/tests/org.openjdk.jmc.flightrecorder.test/src/test/java/org/openjdk/jmc/flightrecorder/test/OverlappingEventsTest.java + core/tests/org.openjdk.jmc.flightrecorder.test/src/test/resources/recordings/overlap.jfr From aptmac at openjdk.java.net Wed Jan 29 17:15:14 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Wed, 29 Jan 2020 17:15:14 GMT Subject: [Rev 02] RFR: 6531: Make the flame chart view render labels on windows In-Reply-To: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> References: <3T-jxid_jLmDFkY3ptEU22aLNooOUXnQhFEnAgI7ng8=.1467f94f-878e-41d1-a80c-0314da77ca50@github.com> Message-ID: > This PR addresses JMC-6531 [[0]](https://bugs.openjdk.java.net/browse/JMC-6531), in which the flame chart view displays nothing in Windows. > > tl;dr: the proposed solution uses a fork of d3-flame-graph [[1]](https://github.com/aptmac/d3-flame-graph) which substitutes the incompatible svg element with one that works with Internet Explorer, and modifies the flameviewColoring script to work with an older ECMA version. > > Screenshot of Windows: > ![windows-works](https://user-images.githubusercontent.com/10425301/72937103-7cd3b900-3d36-11ea-9939-8c71880cfbee.png) > > For reference, here's the same view in Linux: > ![2020-01-22-165007_1913x1031_scrot](https://user-images.githubusercontent.com/10425301/72937506-4480aa80-3d37-11ea-9628-431f240dd457.png) > > When I had originally taken a look into the SWT Browser and compatibility with Windows, it looked as though we'd be able to use Edge as an embedded browser, which would be nice because it already plays nice with the d3-flame-graph library. After quite a bit of trial and error I was first able to get d3 to work (making simple line charts), and then found that d3-flame-graph version <= 2.0.2 will work. With this older version of d3-flame-graph the coloured labels will be drawn, but no text is shown - regardless of the SWT browser property being set to IE or Edge .. which makes it look like Edge can be used for visiting external webpages, but not local ones (internal browser stays IE). This is because the foreignObject element is incompatible with IE, and this has already been raised as an issue and closed as a "wontfix" by the maintainer on the upstream repo [[2]](https://github.com/spiermar/d3-flame-graph/issues/84). > > I made a fork of the d3-flame-graph repo [[1]](https://github.com/aptmac/d3-flame-graph), which accomplishes two things: > - substitutes `` for `` [[3]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211) > - trims the text in the labels because the ellipsis css doesn't work [[4]](https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238) > > This forked version of d3-flame-graph is downloaded by the maven-download-plugin like the other jslibs, and is used if the Environment type is `WINDOWS` as detected in `FlameGraphView.java` [[5]](https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102). > > Now that the flame chart view works at this point, I had to edit `flameviewColoring.java` to be compatible with IE. From what I can find, Internet Explorer uses JScript, which in it's latest version supports ECMA 5 [[6]](https://en.wikipedia.org/wiki/JScript#JScript). This means no maps, no named functions, etc. > > Lastly, and not completely related to this issue, I changed the name of `page.template` to `template.html` because my IDE won't provide syntax highlighting unless the file ends with -.html, and it was a big help here. If it's deemed unecessary I can just drop the associated commit. > > Let me know what you think! > > [0] https://bugs.openjdk.java.net/browse/JMC-6531 > [1] https://github.com/aptmac/d3-flame-graph > [2] https://github.com/spiermar/d3-flame-graph/issues/84 > [3] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49L5211 > [4] https://github.com/aptmac/d3-flame-graph/commit/c508e2ab95de2a48f03d655d6e7f306273dcaa12#diff-e866318288d23357a14da878e2435b49R5238 > [5] https://github.com/aptmac/jmc/commit/b64b4349057a67aeeb6b5ef560261cdb616a9d24#diff-9cb007d54dc422cf345941df647ef24cR102 > [6] https://en.wikipedia.org/wiki/JScript#JScript The pull request has been updated with a new target base due to a merge or a rebase. ------------- Commits: - 4258542a: update adjustTip() to be ECMA5 compatible - a9872588: fix spacing of tags in the pom.xml - 24912301: rename page.template to template.html for compatibility with IDE syntax highlighting - 22ecd073: 6531: Make the flame chart view render labels on windows Changes: https://git.openjdk.java.net/jmc/pull/41/files Webrev: https://webrevs.openjdk.java.net/jmc/41/webrev.02 Stats: 64 lines in 4 files changed: 31 ins; 0 del; 33 mod Patch: https://git.openjdk.java.net/jmc/pull/41.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/41/head:pull/41 PR: https://git.openjdk.java.net/jmc/pull/41 From github.com+29706926+jessyec-s at openjdk.java.net Fri Jan 31 06:53:12 2020 From: github.com+29706926+jessyec-s at openjdk.java.net (Jessye Coleman-Shapiro) Date: Fri, 31 Jan 2020 06:53:12 GMT Subject: RFR: 6643: Make VM Operations rule consider close consecutive events in score Message-ID: This patch modifies the VM Operations rule's score calculation so that is considers blocking that could result from the combination of multiple close consecutive operations. Right now an application's score only takes into account the longest event in its calculation. At the moment I have determined two events to be "close" if they occur within 0.01 s of one another. ------------- Commits: - a2056e6f: Make VM Operations rule consider close consecutive events in score Changes: https://git.openjdk.java.net/jmc/pull/42/files Webrev: https://webrevs.openjdk.java.net/jmc/42/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6643 Stats: 110 lines in 3 files changed: 94 ins; 6 del; 10 mod Patch: https://git.openjdk.java.net/jmc/pull/42.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/42/head:pull/42 PR: https://git.openjdk.java.net/jmc/pull/42 From aptmac at openjdk.java.net Fri Jan 31 16:44:18 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Fri, 31 Jan 2020 16:44:18 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width Message-ID: Hi! This PR addresses JMC-6682 [[0]](https://bugs.openjdk.java.net/browse/JMC-6682), in which the flamegraph can be cutoff when resizing to increase the width. The issue is that the `d3-flame-graph` `width()` function updates the labels, but not the overall `svg` width. As a result, increasing the width of the container will cause the graph dimensions to increase, but the `svg width` stays the same as its initialized value, so clipping can occur. I've raised this as an issue in the upstream repo [[1]](https://github.com/spiermar/d3-flame-graph/issues/146), but altering the width can be done via `css`. If the `svg width` is set to `100%`, then it will fill the `chart` div, and the flamegraph will be displayed in its entirety. This width change also removes excess whitespace that results from resizing the chart smaller, and centers the chart in the view. I included a `css` file for the width value, because placing it in the template html was causing Eclipse to error when reading the html. Does the css file require a license header? I can add one if so. There are also two other changes here, but I can remove this if desired. The first being that Eclipse kept throwing NPEs when trying to open `flameviewColoring.js`, because it couldn't find the file unless the path wasn't specified to be `src/main/js/[..]`. The second is that the chart container was a SWT `SashForm`, but this could have been a `Composite` because we aren't doing anything with the sash (unless that was a future usage type of thing). [0] https://bugs.openjdk.java.net/browse/JMC-6682 [1] https://github.com/spiermar/d3-flame-graph/issues/146 Before: ![before-gif](https://user-images.githubusercontent.com/10425301/73555530-ce0d3800-441b-11ea-8e17-7ba33a95a133.gif) After: ![fixed-gif](https://user-images.githubusercontent.com/10425301/73555525-cbaade00-441b-11ea-84e3-3085690e1c0f.gif) ------------- Commits: - 87ab4c2d: replace the HTML container to be a Composite instead of a SashForm - 7be9fb54: 6682: Flamegraph gets cutoff when resized horizontally to increase the width Changes: https://git.openjdk.java.net/jmc/pull/44/files Webrev: https://webrevs.openjdk.java.net/jmc/44/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6682 Stats: 19 lines in 3 files changed: 8 ins; 2 del; 9 mod Patch: https://git.openjdk.java.net/jmc/pull/44.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/44/head:pull/44 PR: https://git.openjdk.java.net/jmc/pull/44 From mwengner at openjdk.java.net Fri Jan 31 17:28:37 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Fri, 31 Jan 2020 17:28:37 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 16:32:40 GMT, Alex Macdonald wrote: > Hi! > > This PR addresses JMC-6682 [[0]](https://bugs.openjdk.java.net/browse/JMC-6682), in which the flamegraph can be cutoff when resizing to increase the width. > > The issue is that the `d3-flame-graph` `width()` function updates the labels, but not the overall `svg` width. As a result, increasing the width of the container will cause the graph dimensions to increase, but the `svg width` stays the same as its initialized value, so clipping can occur. I've raised this as an issue in the upstream repo [[1]](https://github.com/spiermar/d3-flame-graph/issues/146), but altering the width can be done via `css`. If the `svg width` is set to `100%`, then it will fill the `chart` div, and the flamegraph will be displayed in its entirety. This width change also removes excess whitespace that results from resizing the chart smaller, and centers the chart in the view. I included a `css` file for the width value, because placing it in the template html was causing Eclipse to error when reading the html. Does the css file require a license header? I can add one if so. > > There are also two other changes here, but I can remove this if desired. The first being that Eclipse kept throwing NPEs when trying to open `flameviewColoring.js`, because it couldn't find the file unless the path wasn't specified to be `src/main/js/[..]`. The second is that the chart container was a SWT `SashForm`, but this could have been a `Composite` because we aren't doing anything with the sash (unless that was a future usage type of thing). > > [0] https://bugs.openjdk.java.net/browse/JMC-6682 > [1] https://github.com/spiermar/d3-flame-graph/issues/146 > > Before: > ![before-gif](https://user-images.githubusercontent.com/10425301/73555530-ce0d3800-441b-11ea-8e17-7ba33a95a133.gif) > > After: > ![fixed-gif](https://user-images.githubusercontent.com/10425301/73555525-cbaade00-441b-11ea-84e3-3085690e1c0f.gif) I've it fixed in my PR 6677, what do we do ? ------------- PR: https://git.openjdk.java.net/jmc/pull/44 From mwengner at openjdk.java.net Fri Jan 31 17:31:13 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Fri, 31 Jan 2020 17:31:13 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 16:32:40 GMT, Alex Macdonald wrote: > Hi! > > This PR addresses JMC-6682 [[0]](https://bugs.openjdk.java.net/browse/JMC-6682), in which the flamegraph can be cutoff when resizing to increase the width. > > The issue is that the `d3-flame-graph` `width()` function updates the labels, but not the overall `svg` width. As a result, increasing the width of the container will cause the graph dimensions to increase, but the `svg width` stays the same as its initialized value, so clipping can occur. I've raised this as an issue in the upstream repo [[1]](https://github.com/spiermar/d3-flame-graph/issues/146), but altering the width can be done via `css`. If the `svg width` is set to `100%`, then it will fill the `chart` div, and the flamegraph will be displayed in its entirety. This width change also removes excess whitespace that results from resizing the chart smaller, and centers the chart in the view. I included a `css` file for the width value, because placing it in the template html was causing Eclipse to error when reading the html. Does the css file require a license header? I can add one if so. > > There are also two other changes here, but I can remove this if desired. The first being that Eclipse kept throwing NPEs when trying to open `flameviewColoring.js`, because it couldn't find the file unless the path wasn't specified to be `src/main/js/[..]`. The second is that the chart container was a SWT `SashForm`, but this could have been a `Composite` because we aren't doing anything with the sash (unless that was a future usage type of thing). > > [0] https://bugs.openjdk.java.net/browse/JMC-6682 > [1] https://github.com/spiermar/d3-flame-graph/issues/146 > > Before: > ![before-gif](https://user-images.githubusercontent.com/10425301/73555530-ce0d3800-441b-11ea-8e17-7ba33a95a133.gif) > > After: > ![fixed-gif](https://user-images.githubusercontent.com/10425301/73555525-cbaade00-441b-11ea-84e3-3085690e1c0f.gif) I've fixed in my PR 6677 too, I didn't know about this ticket, what do we do ? ------------- PR: https://git.openjdk.java.net/jmc/pull/44 From aptmac at openjdk.java.net Fri Jan 31 17:59:28 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Fri, 31 Jan 2020 17:59:28 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 17:30:38 GMT, Miroslav Wengner wrote: >> Hi! >> >> This PR addresses JMC-6682 [[0]](https://bugs.openjdk.java.net/browse/JMC-6682), in which the flamegraph can be cutoff when resizing to increase the width. >> >> The issue is that the `d3-flame-graph` `width()` function updates the labels, but not the overall `svg` width. As a result, increasing the width of the container will cause the graph dimensions to increase, but the `svg width` stays the same as its initialized value, so clipping can occur. I've raised this as an issue in the upstream repo [[1]](https://github.com/spiermar/d3-flame-graph/issues/146), but altering the width can be done via `css`. If the `svg width` is set to `100%`, then it will fill the `chart` div, and the flamegraph will be displayed in its entirety. This width change also removes excess whitespace that results from resizing the chart smaller, and centers the chart in the view. I included a `css` file for the width value, because placing it in the template html was causing Eclipse to error when reading the html. Does the css file require a license header? I can add one if so. >> >> There are also two other changes here, but I can remove this if desired. The first being that Eclipse kept throwing NPEs when trying to open `flameviewColoring.js`, because it couldn't find the file unless the path wasn't specified to be `src/main/js/[..]`. The second is that the chart container was a SWT `SashForm`, but this could have been a `Composite` because we aren't doing anything with the sash (unless that was a future usage type of thing). >> >> [0] https://bugs.openjdk.java.net/browse/JMC-6682 >> [1] https://github.com/spiermar/d3-flame-graph/issues/146 >> >> Before: >> ![before-gif](https://user-images.githubusercontent.com/10425301/73555530-ce0d3800-441b-11ea-8e17-7ba33a95a133.gif) >> >> After: >> ![fixed-gif](https://user-images.githubusercontent.com/10425301/73555525-cbaade00-441b-11ea-84e3-3085690e1c0f.gif) > > I've fixed it in my PR 6677 too, I didn't know about this ticket. There will be few minor conflicts on the javascript side. > Have you also tested resizing the main JMC window, more than initiated default size ? > I've fixed it in my PR 6677 too, I didn't know about this ticket. There will be few minor conflicts on the javascript side. Ah fair enough, I didn't realize it was also included in 6677. I had opened the ticket after searching JIRA and not finding an existing one. Your PR fixes the increasing width issue, but when shrinking it still seems to keep excess whitespace to the right of the chart because the SVG doesn't resize to be smaller; the `svg width=100%` used in this PR would address that. I can close this PR and make reference on the bug that it'll get closed by #43 . ------------- PR: https://git.openjdk.java.net/jmc/pull/44 From mwengner at openjdk.java.net Fri Jan 31 18:30:17 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Fri, 31 Jan 2020 18:30:17 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 17:58:42 GMT, Alex Macdonald wrote: >> I've fixed it in my PR 6677 too, I didn't know about this ticket. There will be few minor conflicts on the javascript side. >> Have you also tested resizing the main JMC window, more than initiated default size ? > >> I've fixed it in my PR 6677 too, I didn't know about this ticket. There will be few minor conflicts on the javascript side. > > Ah fair enough, I didn't realize it was also included in 6677. I had opened the ticket after searching JIRA and not finding an existing one. > > Your PR fixes the increasing width issue, but when shrinking it still seems to keep excess whitespace to the right of the chart because the SVG doesn't resize to be smaller; the `svg width=100%` used in this PR would address that. > > I can close this PR and make reference on the bug that it'll get closed by #43 . actually it was not, I've asked marcus whether I could include into this one, I didn't like the fact when you use splash or resize the window that the flameview stays. I've still used the magnitude 0.95. I've also fixed this part String jsFlameviewColoring = "src/main/js/flameviewColoring.js"; to work again like was intended String jsFlameviewColoring = "flameviewColoring.js"; This was caused by the classpath, somewhere it got lost because it was working before I think I'd propose to close the ticket due to work done in 6677 and make a reference. ------------- PR: https://git.openjdk.java.net/jmc/pull/44 From mwengner at openjdk.java.net Fri Jan 31 18:31:38 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Fri, 31 Jan 2020 18:31:38 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 18:29:49 GMT, Miroslav Wengner wrote: >>> I've fixed it in my PR 6677 too, I didn't know about this ticket. There will be few minor conflicts on the javascript side. >> >> Ah fair enough, I didn't realize it was also included in 6677. I had opened the ticket after searching JIRA and not finding an existing one. >> >> Your PR fixes the increasing width issue, but when shrinking it still seems to keep excess whitespace to the right of the chart because the SVG doesn't resize to be smaller; the `svg width=100%` used in this PR would address that. >> >> I can close this PR and make reference on the bug that it'll get closed by #43 . > > actually it was not, I've asked marcus whether I could include into this one, I didn't like the fact when you use splash or resize the window that the flameview stays. I've still used the magnitude 0.95. > > I've also fixed this part > String jsFlameviewColoring = "src/main/js/flameviewColoring.js"; to work again like was intended > String jsFlameviewColoring = "flameviewColoring.js"; > This was caused by the classpath, somewhere it got lost because it was working before > > I think I'd propose to close the ticket due to work done in 6677 and make a reference. what do you think ? ------------- PR: https://git.openjdk.java.net/jmc/pull/44 From mwengner at openjdk.java.net Fri Jan 31 19:02:18 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Fri, 31 Jan 2020 19:02:18 GMT Subject: RFR: 6682: Flamegraph gets cutoff when resized horizontally to increase the width In-Reply-To: References: Message-ID: On Fri, 31 Jan 2020 18:31:29 GMT, Miroslav Wengner wrote: >> actually it was not, I've asked marcus whether I could include into this one, I didn't like the fact when you use splash or resize the window that the flameview stays. I've still used the magnitude 0.95. >> >> I've also fixed this part >> String jsFlameviewColoring = "src/main/js/flameviewColoring.js"; to work again like was intended >> String jsFlameviewColoring = "flameviewColoring.js"; >> This was caused by the classpath, somewhere it got lost because it was working before >> >> I think I'd propose to close the ticket due to work done in 6677 and make a reference. > > what do you think ? > I've also done in my ticket couple of other changes, would be great to close that one and make a reference to mine > I can also totally remove the width scale. ![image](https://user-images.githubusercontent.com/1956942/73566513-57485d00-4464-11ea-93f3-5b6f5c0a96df.png) this is how looks mine result currently ------------- PR: https://git.openjdk.java.net/jmc/pull/44