From shade at openjdk.org Mon Jan 16 18:21:09 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 18:21:09 GMT Subject: RFR: 7903410: JOL: Extend "estimate" to heap dumps and Lilliput Message-ID: For Lilliput, we want an easy way to estimate the potential footprint improvements. "estimate" should be extended with Lilliput models, and "heapdump-estimate" should be added to read the data from heap dumps. ------------- Commit messages: - Heap estimates Changes: https://git.openjdk.org/jol/pull/38/files Webrev: https://webrevs.openjdk.org/?repo=jol&pr=38&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903410 Stats: 307 lines in 6 files changed: 288 ins; 12 del; 7 mod Patch: https://git.openjdk.org/jol/pull/38.diff Fetch: git fetch https://git.openjdk.org/jol pull/38/head:pull/38 PR: https://git.openjdk.org/jol/pull/38 From shade at openjdk.org Mon Jan 16 18:31:45 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 18:31:45 GMT Subject: RFR: 7903410: JOL: Extend "estimate" to heap dumps and Lilliput [v2] In-Reply-To: References: Message-ID: > For Lilliput, we want an easy way to estimate the potential footprint improvements. "estimate" should be extended with Lilliput models, and "heapdump-estimate" should be added to read the data from heap dumps. Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Reformatting ------------- Changes: - all: https://git.openjdk.org/jol/pull/38/files - new: https://git.openjdk.org/jol/pull/38/files/a7c9eb46..00abed17 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=38&range=01 - incr: https://webrevs.openjdk.org/?repo=jol&pr=38&range=00-01 Stats: 10 lines in 1 file changed: 2 ins; 7 del; 1 mod Patch: https://git.openjdk.org/jol/pull/38.diff Fetch: git fetch https://git.openjdk.org/jol pull/38/head:pull/38 PR: https://git.openjdk.org/jol/pull/38 From shade at openjdk.org Mon Jan 16 18:43:43 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 18:43:43 GMT Subject: RFR: 7903410: JOL: Extend "estimate" to heap dumps and Lilliput [v3] In-Reply-To: References: Message-ID: > For Lilliput, we want an easy way to estimate the potential footprint improvements. "estimate" should be extended with Lilliput models, and "heapdump-estimate" should be added to read the data from heap dumps. Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Simulate current state and project target ------------- Changes: - all: https://git.openjdk.org/jol/pull/38/files - new: https://git.openjdk.org/jol/pull/38/files/00abed17..93280797 Webrevs: - full: https://webrevs.openjdk.org/?repo=jol&pr=38&range=02 - incr: https://webrevs.openjdk.org/?repo=jol&pr=38&range=01-02 Stats: 14 lines in 2 files changed: 5 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jol/pull/38.diff Fetch: git fetch https://git.openjdk.org/jol pull/38/head:pull/38 PR: https://git.openjdk.org/jol/pull/38 From duke at openjdk.org Mon Jan 16 19:23:44 2023 From: duke at openjdk.org (duke) Date: Mon, 16 Jan 2023 19:23:44 GMT Subject: git: openjdk/jol: 7903410: JOL: Extend "estimate" to heap dumps and Lilliput Message-ID: <2800e709-4dbb-462c-9e1f-11df049c434f@openjdk.org> Changeset: 5be192b6 Author: Aleksey Shipil?v Committer: GitHub Date: 2023-01-16 20:22:49 +0000 URL: https://git.openjdk.org/jol/commit/5be192b6ef3c9304ab613d6f4b6e8310a86ac299 7903410: JOL: Extend "estimate" to heap dumps and Lilliput ! jol-cli/src/main/java/org/openjdk/jol/Main.java + jol-cli/src/main/java/org/openjdk/jol/operations/EstimatedModels.java + jol-cli/src/main/java/org/openjdk/jol/operations/HeapDumpEstimates.java ! jol-cli/src/main/java/org/openjdk/jol/operations/ObjectEstimates.java + jol-core/src/main/java/org/openjdk/jol/datamodel/Model64_Lilliput.java ! jol-core/src/main/java/org/openjdk/jol/layouters/RawLayouter.java From shade at openjdk.org Mon Jan 16 19:25:26 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 19:25:26 GMT Subject: Withdrawn: 7903410: JOL: Extend "estimate" to heap dumps and Lilliput In-Reply-To: References: Message-ID: <4x1Pm_3hyX8OmVpKu0YfF70ORks75TDkhSeuwln1hZ0=.0dea2bf1-b963-4a5f-b50e-78d8ce6a0197@github.com> On Mon, 16 Jan 2023 18:15:34 GMT, Aleksey Shipilev wrote: > For Lilliput, we want an easy way to estimate the potential footprint improvements. "estimate" should be extended with Lilliput models, and "heapdump-estimate" should be added to read the data from heap dumps. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jol/pull/38 From shade at openjdk.org Mon Jan 16 20:47:20 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 20:47:20 GMT Subject: RFR: 7903411: JOL: Rework Model64 to include comp ref/class attributes Message-ID: <5OGDAAoKuYRyLxSbUHgVE_cZwpIsaqFQFyNHRDZbSdU=.ee062479-d2bd-48d3-affe-8d578318c4a7@github.com> This is cleaner than having the duplicate classes. ------------- Commit messages: - Fix Changes: https://git.openjdk.org/jol/pull/39/files Webrev: https://webrevs.openjdk.org/?repo=jol&pr=39&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903411 Stats: 260 lines in 7 files changed: 7 ins; 227 del; 26 mod Patch: https://git.openjdk.org/jol/pull/39.diff Fetch: git fetch https://git.openjdk.org/jol pull/39/head:pull/39 PR: https://git.openjdk.org/jol/pull/39 From duke at openjdk.org Mon Jan 16 21:00:03 2023 From: duke at openjdk.org (duke) Date: Mon, 16 Jan 2023 21:00:03 GMT Subject: git: openjdk/jol: 7903411: JOL: Rework Model64 to include comp ref/class attributes Message-ID: Changeset: aea72b6f Author: Aleksey Shipil?v Committer: GitHub Date: 2023-01-16 21:57:46 +0000 URL: https://git.openjdk.org/jol/commit/aea72b6f8e0d6b77d579a2f5c6ae0fbd66d5bea2 7903411: JOL: Rework Model64 to include comp ref/class attributes ! jol-cli/src/main/java/org/openjdk/jol/operations/EstimatedModels.java ! jol-cli/src/main/java/org/openjdk/jol/operations/StringCompress.java ! jol-core/src/main/java/org/openjdk/jol/datamodel/Model64.java - jol-core/src/main/java/org/openjdk/jol/datamodel/Model64_CCPS.java - jol-core/src/main/java/org/openjdk/jol/datamodel/Model64_COOPS_CCPS.java ! jol-core/src/test/java/org/openjdk/jol/layouters/LayouterInvariantsTest.java ! jol-samples/src/main/java/org/openjdk/jol/samples/JOLSample_10_DataModels.java From shade at openjdk.org Mon Jan 16 21:00:29 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 21:00:29 GMT Subject: Withdrawn: 7903411: JOL: Rework Model64 to include comp ref/class attributes In-Reply-To: <5OGDAAoKuYRyLxSbUHgVE_cZwpIsaqFQFyNHRDZbSdU=.ee062479-d2bd-48d3-affe-8d578318c4a7@github.com> References: <5OGDAAoKuYRyLxSbUHgVE_cZwpIsaqFQFyNHRDZbSdU=.ee062479-d2bd-48d3-affe-8d578318c4a7@github.com> Message-ID: On Mon, 16 Jan 2023 20:42:09 GMT, Aleksey Shipilev wrote: > This is cleaner than having the duplicate classes. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jol/pull/39 From shade at openjdk.org Mon Jan 16 21:17:01 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 21:17:01 GMT Subject: RFR: 7903412: JOL: Lilliput model should include info on compressed classes/refs Message-ID: A little follow-up for [CODETOOLS-7903411](https://bugs.openjdk.org/browse/CODETOOLS-7903411), Lilliput model should also reply proper compressed refs/klasses status. ------------- Commit messages: - Fix Changes: https://git.openjdk.org/jol/pull/40/files Webrev: https://webrevs.openjdk.org/?repo=jol&pr=40&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903412 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jol/pull/40.diff Fetch: git fetch https://git.openjdk.org/jol pull/40/head:pull/40 PR: https://git.openjdk.org/jol/pull/40 From shade at openjdk.org Mon Jan 16 21:25:26 2023 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 16 Jan 2023 21:25:26 GMT Subject: Withdrawn: 7903412: JOL: Lilliput model should include info on compressed classes/refs In-Reply-To: References: Message-ID: On Mon, 16 Jan 2023 21:11:37 GMT, Aleksey Shipilev wrote: > A little follow-up for [CODETOOLS-7903411](https://bugs.openjdk.org/browse/CODETOOLS-7903411), Lilliput model should also reply proper compressed refs/klasses status. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jol/pull/40 From duke at openjdk.org Mon Jan 16 21:26:33 2023 From: duke at openjdk.org (duke) Date: Mon, 16 Jan 2023 21:26:33 GMT Subject: git: openjdk/jol: 7903412: JOL: Lilliput model should include info on compressed classes/refs Message-ID: Changeset: 5dde423f Author: Aleksey Shipil?v Committer: GitHub Date: 2023-01-16 22:22:54 +0000 URL: https://git.openjdk.org/jol/commit/5dde423fe3b9ed2648104c538eaf25d8086393e4 7903412: JOL: Lilliput model should include info on compressed classes/refs ! jol-core/src/main/java/org/openjdk/jol/datamodel/Model64_Lilliput.java From sebastian.zarnekow at gmail.com Sun Jan 29 16:14:33 2023 From: sebastian.zarnekow at gmail.com (Sebastian Zarnekow) Date: Sun, 29 Jan 2023 17:14:33 +0100 Subject: Inconsistent results from GraphLayout vs GraphStats Message-ID: Hi, I tried to find a way to submit a bug report but failed to do so. Apparently, issues are not enabled on the GitHub repository - contrary to what is mentioned in the readme.md. Maybe this mailing list is the right channel to discuss my observations: >From my understanding, the results of GraphLayout.totalSize and GraphStats.totalSize should be the same for a given object graph. However, there is some inconsistency. The following test case fails for me. I'm not sure if that's a misunderstanding on my end or a bug in the processing of arrays: @Test *public* *void* statsVsLayout() { Object[] objects = *new* Object[1]; objects[0] = *new* String[0]; GraphLayout layout = GraphLayout.*parseInstance*(*new* Object[] { objects } ); GraphStats stats = GraphStats.*parseInstance*(*new* Object[] { objects }); *assertEquals*(layout.totalSize(), stats.totalSize()); *assertEquals*(layout.totalCount(), stats.totalCount()); } Best Sebastian -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastian.zarnekow at gmail.com Sun Jan 29 16:56:31 2023 From: sebastian.zarnekow at gmail.com (Sebastian Zarnekow) Date: Sun, 29 Jan 2023 17:56:31 +0100 Subject: Inconsistent results from GraphLayout vs GraphStats In-Reply-To: References: Message-ID: It looks like the GraphStatsWalker is missing an invocation of data.addRecord for the array elements that are pushed onto the stack. On Sun, Jan 29, 2023 at 5:14 PM Sebastian Zarnekow < sebastian.zarnekow at gmail.com> wrote: > Hi, > > I tried to find a way to submit a bug report but failed to do so. > Apparently, issues are not enabled on the GitHub repository - contrary to > what is mentioned in the readme.md. > > Maybe this mailing list is the right channel to discuss my observations: > > From my understanding, the results of GraphLayout.totalSize and > GraphStats.totalSize should be the same for a given object graph. However, > there is some inconsistency. The following test case fails for me. I'm not > sure if that's a misunderstanding on my end or a bug in the processing of > arrays: > > @Test > > *public* *void* statsVsLayout() { > > Object[] objects = *new* Object[1]; > > objects[0] = *new* String[0]; > > GraphLayout layout = GraphLayout.*parseInstance*(*new* Object[] { objects > }); > > GraphStats stats = GraphStats.*parseInstance*(*new* Object[] { objects }); > > *assertEquals*(layout.totalSize(), stats.totalSize()); > > *assertEquals*(layout.totalCount(), stats.totalCount()); > > } > > > > > Best > Sebastian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shade at redhat.com Mon Jan 30 11:58:18 2023 From: shade at redhat.com (Aleksey Shipilev) Date: Mon, 30 Jan 2023 12:58:18 +0100 Subject: Inconsistent results from GraphLayout vs GraphStats In-Reply-To: References: Message-ID: <1136cfa0-69b8-f859-ea90-74917d037b99@redhat.com> On 1/29/23 17:14, Sebastian Zarnekow wrote: > From my understanding, the results of GraphLayout.totalSize and GraphStats.totalSize should be the > same for a given object graph. However, there is some inconsistency. The following test case fails > for me. I'm not sure if that's a misunderstanding on my end or a bug in the processing of arrays: I believe this is a bug fixed by: https://github.com/openjdk/jol/commit/76c554a0f8fac92e00e4a887808201eb48c5c905 I cannot reproduce the failure on your test with JOL tip. If I revert the fix above, it starts to fail. We are waiting for more PRs to land to JOL before releasing a new version with these bugfixes, sorry for the delay. -- Thanks, -Aleksey