From github.com+318788+s1ck at openjdk.java.net Wed Apr 14 00:20:19 2021 From: github.com+318788+s1ck at openjdk.java.net (Martin Junghanns) Date: Wed, 14 Apr 2021 00:20:19 GMT Subject: RFR: Bring back support for GPR visitors Message-ID: Hey @shipilev First of all: Thanks for this useful library. I wanted to switch from jol 0.10 to 0.15 in one of my projects because of some issues on openJDK 15. I discovered that the ability to register visitors had been removed at some point. The interface `org.openjdk.jol.info.GraphVisitor` is actually still around. I find that feature quite useful as it allows users to compute some custom statistics of the object graph. I tried to use the `GraphLayout` to access the GPRs, but it's all package-private. It would be nice if we could bring the feature back. Also, if you think the approach is not ideal, we can maybe figure out something else. Thanks for your time. ------------- Commit messages: - Bring back support for GPR visitors Changes: https://git.openjdk.java.net/jol/pull/15/files Webrev: https://webrevs.openjdk.java.net/?repo=jol&pr=15&range=00 Stats: 22 lines in 4 files changed: 16 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jol/pull/15.diff Fetch: git fetch https://git.openjdk.java.net/jol pull/15/head:pull/15 PR: https://git.openjdk.java.net/jol/pull/15 From github.com+415502+stokito at openjdk.java.net Wed Apr 14 05:55:04 2021 From: github.com+415502+stokito at openjdk.java.net (Sergey Ponomarev) Date: Wed, 14 Apr 2021 05:55:04 GMT Subject: RFR: Bring back support for GPR visitors In-Reply-To: References: Message-ID: On Mon, 12 Apr 2021 16:00:49 GMT, Martin Junghanns wrote: > Hey @shipilev First of all: Thanks for this useful library. I wanted to switch from jol 0.10 to 0.15 in one of my projects because of some issues on openJDK 15. I discovered that the ability to register visitors had been removed at some point. The interface `org.openjdk.jol.info.GraphVisitor` is actually still around. I find that feature quite useful as it allows users to compute some custom statistics of the object graph. I tried to use the `GraphLayout` to access the GPRs, but it's all package-private. > > It would be nice if we could bring the feature back. Also, if you think the approach is not ideal, we can maybe figure out something else. > > Thanks for your time. Marked as reviewed by stokito at github.com (no known OpenJDK username). ------------- PR: https://git.openjdk.java.net/jol/pull/15 From orionllmain at gmail.com Sat Apr 17 11:19:30 2021 From: orionllmain at gmail.com (Zheka Kozlov) Date: Sat, 17 Apr 2021 18:19:30 +0700 Subject: JOL is broken on module path Message-ID: Hi! javac cannot compile a Java project with module-info.java that requires JOL: module { requires jol.core; } Error: the unnamed module reads package java.lang from both java.base and jol.core The problem is the class JOLUnsafeTrampoline which is in the java.lang package. This causes a split package error. I propose the following simple solution. Since the class is injected via Unsafe::defineAnonymousClass, we can put it anywhere in the JAR. For example, we can put it in the root without the .class extension (so Java will not treat it as a class file). What do you think? From github.com+318788+s1ck at openjdk.java.net Tue Apr 20 14:25:16 2021 From: github.com+318788+s1ck at openjdk.java.net (Martin Junghanns) Date: Tue, 20 Apr 2021 14:25:16 GMT Subject: RFR: Bring back support for GPR visitors In-Reply-To: References: Message-ID: <7N3DIjezMMASvKGJf89K-0JrCy-aCJiFI75xcQqkTyo=.71e29122-7a36-48fb-88c9-9e12d2dedb75@github.com> On Wed, 14 Apr 2021 05:51:54 GMT, Sergey Ponomarev wrote: >> Hey @shipilev First of all: Thanks for this useful library. I wanted to switch from jol 0.10 to 0.15 in one of my projects because of some issues on openJDK 15. I discovered that the ability to register visitors had been removed at some point. The interface `org.openjdk.jol.info.GraphVisitor` is actually still around. I find that feature quite useful as it allows users to compute some custom statistics of the object graph. I tried to use the `GraphLayout` to access the GPRs, but it's all package-private. >> >> It would be nice if we could bring the feature back. Also, if you think the approach is not ideal, we can maybe figure out something else. >> >> Thanks for your time. > > Marked as reviewed by stokito at github.com (no known OpenJDK username). @stokito Thanks for the review! What are the next steps to get this merged / released? ------------- PR: https://git.openjdk.java.net/jol/pull/15 From github.com+415502+stokito at openjdk.java.net Tue Apr 20 14:30:13 2021 From: github.com+415502+stokito at openjdk.java.net (Sergey Ponomarev) Date: Tue, 20 Apr 2021 14:30:13 GMT Subject: RFR: Bring back support for GPR visitors In-Reply-To: References: Message-ID: <0W9103oDsa8sNC6k75STCoRAMrG7vflbWWxU1ypNh1E=.f50cb284-85a9-49d5-afcc-8a19d0e45d85@github.com> On Mon, 12 Apr 2021 16:00:49 GMT, Martin Junghanns wrote: > Hey @shipilev First of all: Thanks for this useful library. I wanted to switch from jol 0.10 to 0.15 in one of my projects because of some issues on openJDK 15. I discovered that the ability to register visitors had been removed at some point. The interface `org.openjdk.jol.info.GraphVisitor` is actually still around. I find that feature quite useful as it allows users to compute some custom statistics of the object graph. I tried to use the `GraphLayout` to access the GPRs, but it's all package-private. > > It would be nice if we could bring the feature back. Also, if you think the approach is not ideal, we can maybe figure out something else. > > Thanks for your time. You have to sign OCA as the bot said you. Then wait while Alexey reviews the PR ------------- PR: https://git.openjdk.java.net/jol/pull/15 From github.com+318788+s1ck at openjdk.java.net Tue Apr 20 14:30:13 2021 From: github.com+318788+s1ck at openjdk.java.net (Martin Junghanns) Date: Tue, 20 Apr 2021 14:30:13 GMT Subject: RFR: Bring back support for GPR visitors In-Reply-To: References: Message-ID: <767lu0mtcVXwwZhocav1r29m2jBvh-8Io0Rr7lzWPK0=.73cbd85e-ae6f-4e6a-8a2b-28ebcf24a18a@github.com> On Mon, 12 Apr 2021 16:00:49 GMT, Martin Junghanns wrote: > Hey @shipilev First of all: Thanks for this useful library. I wanted to switch from jol 0.10 to 0.15 in one of my projects because of some issues on openJDK 15. I discovered that the ability to register visitors had been removed at some point. The interface `org.openjdk.jol.info.GraphVisitor` is actually still around. I find that feature quite useful as it allows users to compute some custom statistics of the object graph. I tried to use the `GraphLayout` to access the GPRs, but it's all package-private. > > It would be nice if we could bring the feature back. Also, if you think the approach is not ideal, we can maybe figure out something else. > > Thanks for your time. Thanks. I did already sign the OCA. Let's wait then :) ------------- PR: https://git.openjdk.java.net/jol/pull/15