From ghb at openjdk.java.net Tue Dec 1 02:46:57 2020 From: ghb at openjdk.java.net (Guru Hb) Date: Tue, 1 Dec 2020 02:46:57 GMT Subject: RFR: 6996: Properly support converters [v9] In-Reply-To: References: Message-ID: On Mon, 30 Nov 2020 20:08:13 GMT, Marcus Hirt wrote: >> Including simple test to verify that the resulting instrumented methods are ok. > > Marcus Hirt has updated the pull request incrementally with one additional commit since the last revision: > > Updated readme Marked as reviewed by ghb (Reviewer). ------------- PR: https://git.openjdk.java.net/jmc/pull/168 From hirt at openjdk.java.net Tue Dec 1 07:25:07 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 07:25:07 GMT Subject: RFR: 6996: Properly support converters [v10] In-Reply-To: References: Message-ID: > Including simple test to verify that the resulting instrumented methods are ok. Marcus Hirt has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: - Resolving merge conflicts - Updated readme - Formatting - Excluding abstract and interface methods - Cleanup and adding more test launchers - Fixing JMX serialization - Updated schema - Formatting - Fixes, cleanup and more tests - Fixing accidental reformat of the copyright notice - ... and 2 more: https://git.openjdk.java.net/jmc/compare/7127e403...fafa5605 ------------- Changes: https://git.openjdk.java.net/jmc/pull/168/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=168&range=09 Stats: 3242 lines in 67 files changed: 1864 ins; 1129 del; 249 mod Patch: https://git.openjdk.java.net/jmc/pull/168.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/168/head:pull/168 PR: https://git.openjdk.java.net/jmc/pull/168 From mike.skells at talk21.com Tue Dec 1 08:14:32 2020 From: mike.skells at talk21.com (mike.skells at talk21.com) Date: Tue, 1 Dec 2020 08:14:32 -0000 Subject: Native frames - https://bugs.openjdk.java.net/browse/JMC-5648 Message-ID: <2ae901d6c7b9$ffdeb170$ff9c1450$@talk21.com> Hi All, I am looking to address at least some JMC-5648, to allow Method profiling to consume NativeFrames as well. I have a few questions ? probably more to come when I start ( never delved into the plugin development, or JMC) 1. Is anyone working on this? Is there a more specific bug? 2. Are there any UI considerations? Is there any need to add checkboxes for ignoring combinations of native frames/java frames? (I cant see a great reason for this, but other have different use cases) I presume this should be within the existing page, rather than a new page I see that there is work on changing the UI in https://git.openjdk.java.net/jmc/pull/165 3. I presume there are the same considerations for the Flame Charts (to consume NativeFrames Any help/prodding in the right direction gratefully received ?? Regards Mike From hirt at openjdk.java.net Tue Dec 1 09:18:53 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 09:18:53 GMT Subject: Integrated: 6996: Properly support converters In-Reply-To: References: Message-ID: <8WlP1JYL3He5lR_aQa0YxD3OAqAfx4SZ_FCgbkwhi4s=.8384f13c-d1a8-4b4e-8323-c49cfe7654d0@github.com> On Wed, 25 Nov 2020 21:18:37 GMT, Marcus Hirt wrote: > Including simple test to verify that the resulting instrumented methods are ok. This pull request has now been integrated. Changeset: abfabc3b Author: Marcus Hirt URL: https://git.openjdk.java.net/jmc/commit/abfabc3b Stats: 3242 lines in 67 files changed: 1864 ins; 1129 del; 249 mod 6996: Properly support converters Reviewed-by: ghb ------------- PR: https://git.openjdk.java.net/jmc/pull/168 From hirt at openjdk.java.net Tue Dec 1 09:24:59 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 09:24:59 GMT Subject: RFR: 7027: Avoid NPE for callers of TransformRegistry#getTransformData In-Reply-To: <7ExVht0ovtyPgWi_PfrFhcwNoSKqeFvT5AsiM-B0-eM=.6bfb1608-1b29-45fc-a72e-df0518a69717@github.com> References: <7ExVht0ovtyPgWi_PfrFhcwNoSKqeFvT5AsiM-B0-eM=.6bfb1608-1b29-45fc-a72e-df0518a69717@github.com> Message-ID: On Sun, 29 Nov 2020 19:27:48 GMT, Gunnar Morling wrote: > ?) of no transform data exists > > @thegreystone, @Josh-Matsuoka, et al., this fixes an NPE in the `Transformer` class if there is no metadata for the given class (we unconditionally try to iterate over the returned list). I noticed this while debugging something else, it seems this NPE gets swallowed elsewhere, but creating it over and over is costly of course. > > I think never returning null from a collection method is a good practice anyways, so I've changed it accordingly. Could someone log an issue for this, so I can reference it? Thanks! Changes requested by hirt (Lead). agent/src/main/java/org/openjdk/jmc/agent/TransformRegistry.java line 2: > 1: /* > 2: * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. Update copyright year - 2018, 2020. agent/src/test/java/org/openjdk/jmc/agent/test/TestDefaultTransformRegistry.java line 2: > 1: /* > 2: * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. Update copyright year - 2018, 2020. ------------- PR: https://git.openjdk.java.net/jmc/pull/169 From hirt at openjdk.java.net Tue Dec 1 10:07:03 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 10:07:03 GMT Subject: RFR: 7028: The ids are wrong in the agent tests Message-ID: Even more important, since we may want to use them as the event name. ------------- Commit messages: - 7028: The ids are wrong in the agent tests Changes: https://git.openjdk.java.net/jmc/pull/171/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=171&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7028 Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jmc/pull/171.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/171/head:pull/171 PR: https://git.openjdk.java.net/jmc/pull/171 From hirt at openjdk.java.net Tue Dec 1 10:43:01 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 10:43:01 GMT Subject: RFR: 7029: In the event configuration the event name should be renamed label Message-ID: ...since most people use JFR 2.0 these days. ------------- Commit messages: - Formatting - 7029: In the event configuration the event name should be renamed label Changes: https://git.openjdk.java.net/jmc/pull/172/files Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=172&range=00 Issue: https://bugs.openjdk.java.net/browse/JMC-7029 Stats: 108 lines in 15 files changed: 33 ins; 0 del; 75 mod Patch: https://git.openjdk.java.net/jmc/pull/172.diff Fetch: git fetch https://git.openjdk.java.net/jmc pull/172/head:pull/172 PR: https://git.openjdk.java.net/jmc/pull/172 From marcus.hirt at datadoghq.com Tue Dec 1 15:56:17 2020 From: marcus.hirt at datadoghq.com (Marcus Hirt) Date: Tue, 1 Dec 2020 16:56:17 +0100 Subject: Native frames - https://bugs.openjdk.java.net/browse/JMC-5648 In-Reply-To: <2ae901d6c7b9$ffdeb170$ff9c1450$@talk21.com> References: <2ae901d6c7b9$ffdeb170$ff9c1450$@talk21.com> Message-ID: Hi Mike, 1. Not as far as I know. 2. JMC-5684 is more about visualizing the native method sample (jdk.NativeMethodSample) event than showing native frames / mixed native & Java stacktraces. 3. For showing other stuff in the Flame Chart, just click on something representing some events. For example, got to the event browser and select the native method sample events - now you have a flame graph of them. Kind regards, Marcus On Tue, Dec 1, 2020 at 9:14 AM wrote: > Hi All, > > I am looking to address at least some JMC-5648, to allow Method profiling > to consume NativeFrames as well. > > > > I have a few questions ? probably more to come when I start ( never delved > into the plugin development, or JMC) > > 1. Is anyone working on this? > Is there a more specific bug? > 2. Are there any UI considerations? > Is there any need to add checkboxes for ignoring combinations of native > frames/java frames? (I cant see a great reason for this, but other have > different use cases) > I presume this should be within the existing page, rather than a new page > I see that there is work on changing the UI in > https://git.openjdk.java.net/jmc/pull/165 > 3. I presume there are the same considerations for the Flame Charts > (to consume NativeFrames > > > > Any help/prodding in the right direction gratefully received ?? > > > > Regards > > Mike > > > > From mike.skells at talk21.com Tue Dec 1 16:22:34 2020 From: mike.skells at talk21.com (mike.skells at talk21.com) Date: Tue, 1 Dec 2020 16:22:34 -0000 Subject: Native frames - https://bugs.openjdk.java.net/browse/JMC-5648 In-Reply-To: References: <2ae901d6c7b9$ffdeb170$ff9c1450$@talk21.com> Message-ID: <00ba01d6c7fe$2dca46a0$895ed3e0$@talk21.com> Hi Marcus, I will proceed on - getting the MethodProfile page to include the native frames as well as the pure java frames - do this under a new ticket - consider the flame charts later, after we see how this looks for the MethodProfiler Regards Mike From: Marcus Hirt Sent: 01 December 2020 15:56 To: mike.skells at talk21.com Cc: jmc-dev at openjdk.java.net Subject: Re: Native frames - https://bugs.openjdk.java.net/browse/JMC-5648 Hi Mike, 1. Not as far as I know. 2. JMC-5684 is more about visualizing the native method sample (jdk.NativeMethodSample) event than showing native frames / mixed native & Java stacktraces. 3. For showing other stuff in the Flame Chart, just click on something representing some events. For example, got to the event browser and select the native method sample events - now you have a flame graph of them. Kind regards, Marcus On Tue, Dec 1, 2020 at 9:14 AM > wrote: Hi All, I am looking to address at least some JMC-5648, to allow Method profiling to consume NativeFrames as well. I have a few questions ? probably more to come when I start ( never delved into the plugin development, or JMC) 1. Is anyone working on this? Is there a more specific bug? 2. Are there any UI considerations? Is there any need to add checkboxes for ignoring combinations of native frames/java frames? (I cant see a great reason for this, but other have different use cases) I presume this should be within the existing page, rather than a new page I see that there is work on changing the UI in https://git.openjdk.java.net/jmc/pull/165 3. I presume there are the same considerations for the Flame Charts (to consume NativeFrames Any help/prodding in the right direction gratefully received ?? Regards Mike From hirt at openjdk.java.net Tue Dec 1 17:24:05 2020 From: hirt at openjdk.java.net (Marcus Hirt) Date: Tue, 1 Dec 2020 17:24:05 GMT Subject: RFR: 6988: Initial implementation of JFR binary format writer In-Reply-To: References: Message-ID: On Fri, 19 Jun 2020 10:22:41 GMT, Jaroslav Bachorik wrote: > This is an initial implementation of JFR binary format writer in Java. > The writer can write valid JFR files according to what is expected by the JMC JFR format reader. > The writer is not complete in terms of performance and event settings support but in spite of that it is fairly usable. > > The typical flow is: > > 1. Obtain a new instance of Recording > java > Recording r = new Recording() > 2. Register custom types for that recording > java > r.registerType(name, structure) > 3. Get a new Chunk instance > java > Chunk c = r.newChunk() > 4. Write event values > java > c.writeEvent(eventValue) > 5. Finish the chunk and get the binary data > java > byte[] data = c.finish() > > > For more complex usage check [ChunkComplexTest.java](https://github.com/openjdk/jmc/blob/4c2dd1407f462feae40b795d3a4c6d75544b4e82/core/org.openjdk.jmc.flightrecorder.writer/src/test/java/org/openjdk/jmc/flightrecorder/writer/ChunkComplexTest.java). Changes requested by hirt (Lead). core/org.openjdk.jmc.common/pom.xml line 53: > 51: 1.7.1 > 52: > 53: Since this is in a new bundle now, common doesn't need lombok. :) core/org.openjdk.jmc.flightrecorder.writer/build.properties line 2: > 1: # > 2: # Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. Wrong year, also add Datadog. core/org.openjdk.jmc.flightrecorder.writer/pom.xml line 3: > 1: > 2: