RFR (S): 8079091: Remove dictionary NULL check on common path of BlockFreeList methods

Jon Masamitsu jon.masamitsu at oracle.com
Thu Apr 30 20:24:15 UTC 2015



On 4/30/2015 12:15 PM, Kim Barrett wrote:
> On Apr 30, 2015, at 3:37 AM, Jungwoo Ha <jwha at google.com> wrote:
>> My original change (not embedding CHeapObj): http://cr.openjdk.java.net/~jwha/8079091/webrev.00/
>> Jon's suggestion (from hotspot-gc-dev): http://cr.openjdk.java.net/~jwha/8079091/webrev.02/
>>
>> Please take a look on .02.
> Sorry, but version .02 gets a No from me.

All,

Let's go back to Jungwoo's 00 version.  It's a clean, limited change.

Objections?

Complaints about the code around it can be sent to me on the side.

Jon


>
> Casting away const is almost always an indication that something is
> wrong. Very nearly the only valid excuse for it is when dealing with
> an external library that is not itself const-correct.
>
> If you *really* want to keep the accessor function, then there
> probably needs to be two versions of it, one const and returning
> const*, and the other non-const and (probably) returning non-const*.
> But I really don't think the accessor function(s) are helpful here.
> (The accessor function would have been helpful previously if the lazy
> allocation had been encapsulated within it, but it didn't do that.)
>



More information about the hotspot-runtime-dev mailing list