Eliminating static roots from gcj

David Daney ddaney@avtrex.com
Tue Mar 14 18:40:00 GMT 2006


Andrew Haley wrote:
> Hans,
> 
> I have a problem before merging this code to the trunk.
> 
> Accesses to String and Class constants is now slower than before.
> Previously, such an access was simply
> 
>    _CD_<class>[N]
> 
> where _CD_<class> was an array in the initialized data section.  With
> PIC, this simply generated a PC+offset fetch instruction:
> 
>         movq    8+_CD_q(%rip), %rax
> 
> Now that we aren't scanning the data sections of objects, we have to
> do something like
> 
>    class$->constants.data[i]
> 

Why is this?  For a shared object, the relative position of different 
parts of the object are not going to be moving around, are they?

I could see a possiblilty of problems with dynamically generated Class 
objects (from the interpreter).

.
.
.
> Clearly, ceasing to scan shared objects conservatively is a big
> advance for gcj, but I'd prefer it not to be accompanied by
> regressions in code quality.
> 
I agree with that.  I just need a little help understanding the issue.

Thanks,
David Daney



More information about the Java mailing list