harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [DRLVM][enumeration and helper inlining] magic Address fields should not be enumerated
Date Thu, 25 Jan 2007 09:14:08 GMT
On 1/25/07, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>
> Hi,
>
> The current root set enumeration code has no special treatment with
> magic Address fields. They are taken as normal object reference
> fields. This is incorrect since their values are memory addresses that
> are not necessarily pointing to objects. Actually we probably need to
> keep the contract the Address field should never contain an object
> reference, so to skip them in enumeration doesn't miss any live
> objects. (They can contain an address that happens to be an object
> reference, but this object reference is enumerable from other roots or
> object fields.)
>
> Do you agree with this contract and should we modify the root set
> enumeration code to skip Address fields?
>
> Thanks,
> xiaofeng
>

Xiao-Feng,
JIT does not report objects with type of Address today, because JIT knows
them like UnmanagedPointers but not like Objects.
Address/Offset/Reference and other magics types could be enumerated only if

1) We have a field of magic type.
2) VM reports it as part of protected JNI arguments.

When I wrote helpers with magics I cared not to use any of the cases above.
In the case when I have to save an address to the field I saved its 'int'
representation.

But If we want to enable fast-path helpers on EM64T we have to support at
least case 1)
I see only one solution here: GC must care about magic types and sizes.



-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message