Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-24 Thread Thomas Stuefe
On Thu, 24 Oct 2024 09:54:05 GMT, Martin Doerr wrote: > As I understand the comment, it says alignment <= cache line size. But the > implementation makes alignment >= cache line size. "hyper alignment" means > alignment > cache line size? Correct. since encoding range must cover the full klass

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-24 Thread Martin Doerr
On Thu, 24 Oct 2024 09:28:13 GMT, Amit Kumar wrote: >>> But then, what exactly is the error? If it's just the test assuming that >>> cache line size is log 6, then the test should be fixed for ppc, not >>> hotspot. >> >> that is the problem, test assumes log2 of 6 for chacheline size > > PPC l

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-24 Thread Amit Kumar
On Thu, 24 Oct 2024 09:22:34 GMT, Thomas Stuefe wrote: >>> This code causes test errors in >>> `CompressedClassPointersEncodingScheme.java` on s390 and PPC64. It forces >>> the shift to `log_cacheline` which is 7 on PPC64 and 9 on s390. The test >>> passes when we remove "s > log_cacheline &&

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-24 Thread Thomas Stuefe
On Thu, 24 Oct 2024 09:12:34 GMT, Thomas Stuefe wrote: > But then, what exactly is the error? If it's just the test assuming that > cache line size is log 6, then the test should be fixed for ppc, not hotspot. that is the problem, test assumes log2 of 6 for chacheline size - PR Re

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-24 Thread Thomas Stuefe
On Wed, 23 Oct 2024 18:14:50 GMT, Martin Doerr wrote: > This code causes test errors in `CompressedClassPointersEncodingScheme.java` > on s390 and PPC64. It forces the shift to `log_cacheline` which is 7 on PPC64 > and 9 on s390. The test passes when we remove "s > log_cacheline && " from > th

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-23 Thread Martin Doerr
On Tue, 22 Oct 2024 13:53:03 GMT, Thomas Stuefe wrote: >> I will do some benchmarks > > I did SpecJBB runs with shift of 6, 8 and 10, respectively, which amounts to > Klass alignment of 64, 256 and 1K. Benchmark scores did not show a > significant pattern. I did not measure CPU stats though. >

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-22 Thread Thomas Stuefe
On Thu, 19 Sep 2024 13:34:47 GMT, Thomas Stuefe wrote: >> Do you seen any effects of this in anything other than special-crafted micro >> benchmarks? I wonder if it would be good enough to hard-code this to be 10 >> for the first integration of Lilliput. > > I will do some benchmarks I did Spe

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-08 Thread Roman Kennke
On Tue, 8 Oct 2024 10:20:45 GMT, Albert Mingkun Yang wrote: >> I was thinking that we should remove the entire: >> >> // Note: If min-fill-size decreases to 1, this whole method becomes >> redundant. >> assert(CollectedHeap::min_fill_size() >= 2, "inv"); >> >> block, since it is now incorr

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-08 Thread Albert Mingkun Yang
On Tue, 8 Oct 2024 08:12:31 GMT, Stefan Karlsson wrote: >> I took UCOH into account when this code was written -- the current version >> of PR would fail the following assert. >> >> >> // Note: If min-fill-size decreases to 1, this whole method becomes >> redundant. >> assert(CollectedHe

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-08 Thread Stefan Karlsson
On Tue, 8 Oct 2024 07:40:24 GMT, Albert Mingkun Yang wrote: >> After re-reading this again I agree with what you're writing. If you make >> the change to use: >> >> if (MinObjAlignment >= CollectedHeap::min_fill_size()) { >> return; >> } >> >> >> do you even have to check for UCOH in this f

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-08 Thread Albert Mingkun Yang
On Mon, 7 Oct 2024 11:49:21 GMT, Stefan Karlsson wrote: >> When MinObjectAlignment=16, then that method does nothing anyway: >> >> >> if (MinObjAlignment > 1) { >> return; >> } >> >> >> >> I think what it really means to say is >> >> if (MinObjAlignment >= CollectedHeap::min_fill

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-07 Thread Stefan Karlsson
On Mon, 7 Oct 2024 10:49:39 GMT, Roman Kennke wrote: >> Did you figure out if the code above is correct w.r.t. >> `MinObjectAlignment=16`? > > When MinObjectAlignment=16, then that method does nothing anyway: > > > if (MinObjAlignment > 1) { > return; > } > > > > I think what it rea

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-07 Thread Roman Kennke
On Mon, 7 Oct 2024 08:49:58 GMT, Stefan Karlsson wrote: >> Style note: The added code is inserted between a comment and the code that >> the comment refers to. It would be nice to tidy this up. > > Did you figure out if the code above is correct w.r.t. > `MinObjectAlignment=16`? When MinObject

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-10-07 Thread Stefan Karlsson
On Thu, 19 Sep 2024 05:36:41 GMT, Stefan Karlsson wrote: >> src/hotspot/share/gc/parallel/psParallelCompact.cpp line 787: >> >>> 785: // The gap is always equal to min-fill-size, so nothing to do. >>> 786: return; >>> 787: } >> >> Reading the comment, it is not obvious that this is co

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Thomas Stuefe
On Thu, 19 Sep 2024 13:08:43 GMT, Stefan Karlsson wrote: >> Yes, please, not having this code would be really nice. This is difficult >> code. > > Do you seen any effects of this in anything other than special-crafted micro > benchmarks? I wonder if it would be good enough to hard-code this to

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Stefan Karlsson
On Thu, 19 Sep 2024 12:35:30 GMT, Coleen Phillimore wrote: >> Note that if we go with my KLUT proposal for post-Lilliput (the GC oop >> iteration improvements), this will not matter anymore and can be simplified >> to a fixed shift of 10. > > Yes, please, not having this code would be really ni

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Coleen Phillimore
On Thu, 19 Sep 2024 11:47:21 GMT, Thomas Stuefe wrote: >> It lessens the cache effects of Klass hyperaligning. > > Note that if we go with my KLUT proposal for post-Lilliput (the GC oop > iteration improvements), this will not matter anymore and can be simplified > to a fixed shift of 10. Yes,

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Thomas Stuefe
On Wed, 18 Sep 2024 23:53:28 GMT, Coleen Phillimore wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/share/oops/compressedKlass.hpp line 175: > >> 173: // 5b) if CDS=off: Calls ini

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Thomas Stuefe
On Thu, 19 Sep 2024 11:43:12 GMT, Thomas Stuefe wrote: >> src/hotspot/share/oops/compressedKlass.cpp line 231: >> >>> 229: // The reason is that we want to avoid, if possible, shifts larger >>> than >>> 230: // a cacheline size. >>> 231: _base = addr; >> >> Why is this important? >

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Thomas Stuefe
On Thu, 19 Sep 2024 05:44:42 GMT, Stefan Karlsson wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/share/oops/compressedKlass.cpp line 231: > >> 229: // The reason is that we want

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Roman Kennke
On Thu, 19 Sep 2024 10:29:11 GMT, Hamlin Li wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp line 2529: > >> 2527: } >> 2528: __ decode_

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Thomas Stuefe
On Wed, 18 Sep 2024 23:49:34 GMT, Coleen Phillimore wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/share/oops/compressedKlass.cpp line 242: > >> 240: } else { >> 241: >> 242:

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-19 Thread Hamlin Li
On Wed, 18 Sep 2024 13:23:44 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-18 Thread Stefan Karlsson
On Thu, 19 Sep 2024 05:35:34 GMT, Stefan Karlsson wrote: >> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> JVMCI support > > src/hotspot/share/gc/parallel/psParallelCompact.cpp line 787: > >> 785: // The gap is always

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-18 Thread Stefan Karlsson
On Wed, 18 Sep 2024 13:23:44 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-18 Thread Coleen Phillimore
On Wed, 18 Sep 2024 13:23:44 GMT, Roman Kennke wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> It is also a follow-up to #20640, which now also includes (and supersedes) >> #20603 and #20605, plus the Tiny Class-Pointers parts that have been >> prev

Re: RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v21]

2024-09-18 Thread Roman Kennke
> This is the main body of the JEP 450: Compact Object Headers (Experimental). > > It is also a follow-up to #20640, which now also includes (and supersedes) > #20603 and #20605, plus the Tiny Class-Pointers parts that have been > previously missing. > > Main changes: > - Introduction of the (