From hirt at openjdk.java.net Wed Feb 5 14:33:15 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Wed, 5 Feb 2020 14:33:15 GMT Subject: RFR: 6684: Adding CONTRIBUTING.md file Message-ID: <79Hj4w8HzoR0x9n1HZtTTKEsBRax4dczDJZAahDlSgk=.a5dcbfd9-f44b-41bd-bc79-0aa5e137954c@github.com> 6684: Adding CONTRIBUTING.md file ------------- Commits: - 47da1634: 6684: Adding CONTRIBUTING.md file Changes: https://git.openjdk.java.net/jmc/pull/46/files Webrev: https://webrevs.openjdk.java.net/jmc/46/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6684 Stats: 45 lines in 1 file changed: 45 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jmc/pull/46.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/46/head:pull/46 PR: https://git.openjdk.java.net/jmc/pull/46 From hirt at openjdk.java.net Thu Feb 6 09:13:07 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Thu, 6 Feb 2020 09:13:07 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:11 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/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. @tabjy - did you have a chance to look at this? ------------- PR: https://git.openjdk.java.net/jmc/pull/20 From mwengner at openjdk.java.net Thu Feb 6 10:58:46 2020 From: mwengner at openjdk.java.net (Miroslav Wengner) Date: Thu, 6 Feb 2020 10:58:46 GMT Subject: RFR: 6677: search to highlight cells in the flame view Message-ID: ticket: https://bugs.openjdk.java.net/browse/JMC-6677 ------------- Commits: - 62434974: 6677: highlighting text, special characters - 26dc9c70: 6677: formatting update - 34eb6281: 6677: browser window resize update, higlight color -> magenta - 588ce3ae: 6677: minor changes, cleanup - 6b9b558a: 6677: minor cleanup - ee0cf7f7: 6677: minor cleanup - 21368146: 6677: icon resolution - cf337d6c: 6677: enable search on node name - b3f44128: 6677: spotless needs - 65f5e11e: 6677: minor renaming - be4f952e: 6677: add search icon - 5f659170: Merge branch 'master' into feature/6677_search_to_highlight_cells_flameview - 3b1fb71d: 6677: style flameview - c43bbf87: 6677: text-field fontfamily - 552ed380: 6677: update - 9f3908ed: 6677: init highlight package name in flameview Changes: https://git.openjdk.java.net/jmc/pull/45/files Webrev: https://webrevs.openjdk.java.net/jmc/45/webrev.00 Issue: https://bugs.openjdk.java.net/browse/JMC-6677 Stats: 95 lines in 7 files changed: 79 ins; 1 del; 15 mod Patch: https://git.openjdk.java.net/jmc/pull/45.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/45/head:pull/45 PR: https://git.openjdk.java.net/jmc/pull/45 From aptmac at openjdk.java.net Thu Feb 6 10:58:49 2020 From: aptmac at openjdk.java.net (Alex Macdonald) Date: Thu, 6 Feb 2020 10:58:49 GMT Subject: RFR: 6677: search to highlight cells in the flame view In-Reply-To: References: Message-ID: On Sat, 1 Feb 2020 11:19:43 GMT, Miroslav Wengner wrote: > ticket: https://bugs.openjdk.java.net/browse/JMC-6677 > /contributor add Alex Macdonald [Alex.Mcdonald at redhat.com](mailto:Alex.Mcdonald at redhat.com) Not sure if I'm supposed to be contributor on this PR, but my e-mail is `almacdon at redhat.com` regardless. > conclusion: > > 1. resize works (on mac as I've no windows easy to access ;) The svg stylesheet change works on Linux, and should also work on Windows. > 2. search considers node and package name. It searches for the strings that contains desired sequence. The search feels more intuitive now, thanks. Is it possible to have the search fire automatically (instead of hitting enter) when a certain amount of characters are entered, maybe 3+? I think there's a table of two in JMC which operate the same way. There appears to be an edge case somewhere when searching for the string, but it's in the JavaScript so it's difficult to debug. But I'll type out my steps that what's happening.. maybe it has something to do with escaping characters: - I have two entries of `ArrayList.add(Object [..])`. - If I search for "add(", then no node is highlighted - if I search for "add", then it highlights both those nodes - Now that the nodes are highlighted, I can type anything in the search bar and it will not update the chart i.e., the two nodes remain highlighted. - I would expect that inputting a string that cannot be found would highlight the nodes Additionally, I found some formatting errors in the commits here .. but there's also quite a bit that made it through previously and it'd be nice to clean that up IMO. Do we have any JavaScript formatting guidelines that we're following? With regards to the width comment on the closed https://github.com/openjdk/jmc/pull/44#issuecomment-580854588, > I can also totally remove the width scale but I've observed some not wanted behaviour on the MacOS, have you tested it on Mac ? What was the unwanted behaviour you were seeing? Here's my initial feedback on the PR: 1. As for the sizing fix, I don't think setting the chart to 95% of the window size [[0]](https://github.com/openjdk/jmc/pull/45/files#diff-30491bb3d763f9e956043f3402596f31R88) is the complete fix; the problem is that the svg doesn't change it's size when the chart is changed. So if the chart increases in size it is cutoff by the svg, and if the chart decreases in size then it leaves excess white space. GIF1: Increasing the chart size, but the SVG doesn't change ![6677-increasing-cutoff](https://user-images.githubusercontent.com/10425301/73668357-c1831c80-4673-11ea-93fd-9b6882fd81d6.gif) GIF2: Decreasing the chart size, but the SVG doesn't change ![6677-decreasing-excess](https://user-images.githubusercontent.com/10425301/73668366-c47e0d00-4673-11ea-87cc-ae3f61f41720.gif) 2. As for the search functionality itself, I think it looks really nice. My feedback for the moment is that it is using `startsWith()` for checking the strings, so it's only possible to search by class .. it would be neat to be able to search within the string as well. e.g., search for `.run()` and have it highlight all instances of `.run()` being called. [0] https://github.com/openjdk/jmc/pull/45/files#diff-30491bb3d763f9e956043f3402596f31R88 [1] https://github.com/openjdk/jmc/pull/45/files#diff-c309933c5cd238df4805885ae811bae1R128 application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 120: > 119: const colorCell = function (d) { > 120: if (textToSearch !== "" && (evaluateSearchElement(d.data.p) || evaluateSearchElement(d.data.n))){ > 121: return "magenta"; formatting: space before `{` application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 127: > 126: > 127: const evaluateSearchElement = function(text){ > 128: if((text !== undefined && text.toLowerCase().includes(textToSearch))){ formatting: space before `{` application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 128: > 127: const evaluateSearchElement = function(text){ > 128: if((text !== undefined && text.toLowerCase().includes(textToSearch))){ > 129: return true; formatting: space after `if` formatting: looks like there's an extra pair of brackets on the if-statement formatting: space before { application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template line 13: > 12: > 13: > 14: