CHA for interfaces in C2 compiler

Vitaly Davidovich vitalyd at
Thu Apr 16 11:03:15 UTC 2015


I'm also unclear why you say that "every application of this will need the
same cache line as the data fields" - what if the data field fetched is a
cacheline length away from the start of the object? Say the class contains
8 doubles and the line is 64 bytes - if I'm reading the field that got laid
out last, it's going to be a different line from the class pointer on each

sent from my phone
On Apr 16, 2015 2:56 AM, "John Rose" <john.r.rose at> wrote:

> The real cost of the type check is a cache line fetch. In this case you
> have a bunch of objects whose code is the same method(s) and data fields
> are the only way to vary the behavior. So almost any plausible application
> of this pattern will need the same cache line as the data fields.
> We have yet to see a convincing use case for this CHA (THA) case.  I put
> some code in the VM to support this once but we never needed it and it was
> removed.
> (Another opt with a similar flavor would be support for the singleton
> pattern.)
> – John
> > On Apr 15, 2015, at 8:05 PM, Vitaly Davidovich <vitalyd at>
> wrote:
> >
> > That would certainly be a place where removing the type check would be
> beneficial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-compiler-dev mailing list