This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Alpha vs. new ABI

Three comments:

1) I don't have measurements, but my intuition is that extra padding will
hurt performance measurably.  I suspect small arrays are important, and the
padding affects both cache utilization, and the amount of work the GC needs
to do with a given heap size.

2) The offsets change with my hash synchronization patch.  A pointer field
disappears from the array header (and from every other object).

3) I don't think I understand the reason for the alignment requirement here.
But I suspect that "maximal alignment" is going to eventually be 16 bytes on
a number of platforms.  (I think it already is for the Intel Pentium III+
SSE instructions and for Itanium long doubles.)  But this doesn't apply to
Java types.


> -----Original Message-----
> From: Tom Tromey []
> Sent: Tuesday, January 30, 2001 2:25 PM
> To: Jeff Sturm
> Cc: Per Bothner;
> Subject: Re: Alpha vs. new ABI
> Jeff> Isn't that the reason gcj now enforces a minimum of ptr
> Jeff> alignment on the data member of arrays?  I know Alex made that
> Jeff> change for the new ABI, but I don't remember exactly why.
> I didn't realize a change had been made here recently.  Alex, what
> gives?
> >> In the runtime we could implement this by putting
> >> __attribute__((aligned (something))) on the `data' field.
> >> `something' would be chosen to be maximal alignment for 
> the platform.
> >> Maybe just `8' would suffice for now.
> Jeff> That'll waste 4 bytes on x86.
> Interesting -- I didn't realize that doubles only had to be aligned on
> a 4 byte boundary there.
> Last time this came up people seemed indifferent to the space wasted
> by forcing maximal alignment for every array.  Maybe another 4 bytes
> doesn't matter.
> Of course if it is easy I'd prefer to find a solution that does the
> right thing on each platform.  I don't know if you can use
> `__alignof__' inside an attribute though.
> Jeff> Whatever the case, the alignment specified in array.h should
> Jeff> _exactly_ match the behavior in the frontend.  Right now it
> Jeff> doesn't.
> Definitely.  And I think we need to fix this before gcc 3.0, since it
> is the only thing keeping the alpha port from working.  Alex said
> today that he'd look into it.
> Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]