harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [drlvm][gc] IdentityHashCode implementation on magics
Date Sat, 17 May 2008 10:42:18 GMT
On Fri, May 16, 2008 at 6:43 PM, Aleksey Shipilev
<aleksey.shipilev@gmail.com> wrote:
> Hi,
>  On Fri, May 16, 2008 at 10:18 AM, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>  > On Fri, May 16, 2008 at 1:41 PM, Aleksey Shipilev
>  > <aleksey.shipilev@gmail.com> wrote:
>  >> Aha, so it's literally no way to disable buffered hashcode? That means
>  >> identityHashCode GC helper can't be implemented as magic.
>  > Why not? GC helper doesn't need to include buffered hash.
>  Yep, I mean here that IHC magic will perform well only when object is
>  in young generation. Such GC helper will infer another layer of
>  indirection while obtaining IHC for mature object (e.g. call to GC
>  helper -> check -> call to VM helper -> call to native GC). On the
>  other hand, it should eliminate JNI stub for
>  VMMemoryManager.getIdentityHashCode after all. Need to experiment
>  more.

Most of the objects in mature space have attached hashcode. Only those
objects moved in major collections and do not yet have attached
hashcode before the move will use buffered hashcode.  The number
should be minimum in most applications, so can be dealt with in slow
path. GC helpers only need to deal with fast path.


>  Thanks,
>  Aleksey.


View raw message