harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: [drlvm] Jitrino.OPT performs incorrect GC enumeration in nested loop with array accesses
Date Mon, 09 Oct 2006 11:23:19 GMT
Mikhail Fursov wrote:
> On 10/7/06, Weldon Washburn <weldonwjw@gmail.com> wrote:
>> #3 might have originally been put in the JIT/GC interface because the JIT
>> developers liked it.  I can't think of a reason why a GC would prefer
>> this
>> interface over #2 above.
> If it could be  JIT developers decision we would like not to distinguish
> between bases and mptrs at all.:) I mean to keep only
> 'enumerate(base_or_mptr)' method
> I'm not sure the code JIT generates will be much better in this case, but
> JIT internals will become simpler.

Sorry, as I am already lost in #2, #3 and other denotations, my comment
may turn out to be irrelevant, but I think it is worth noting, that

JIT enumeration interface is actually passed through VM like JIT<->VM<->GC:

JIT calls VM funtion vm_enumerate_root_interior_pointer_with_base(slot,base,...)

183 void vm_enumerate_root_interior_pointer_with_base(void **slot_root, void **slot_base,
Boolean is_pinned)
184 {
185     int offset = (int)(POINTER_SIZE_INT)(*((Byte**)slot_root)-*((Byte**)slot_base));
186     gc_add_root_set_entry_interior_pointer(slot_root, offset, is_pinned);
187 }

And VM in turn calls GC function gc_add_root_set_entry_interior_pointer(slot,offset,...)

IMHO, the best solution would be to use (slot,offset) everywhere,
and pre-compute and cache offsets before enumerating the base pointer.
Or even enumerate base pointer *after* all interior pointers that depend on it.

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message