[vmkit-commits] [PATCH] Update OpenJDK's classpath reflect--fix field layout and class mapping

Will Dietz wdietz2 at illinois.edu
Thu Oct 27 14:39:57 PDT 2011


On Thu, Oct 27, 2011 at 4:08 PM, Nicolas Geoffray
<nicolas.geoffray at gmail.com> wrote:
>
> What do you mean? Java objects are always GC-allocated. VMKit internal
> structures like j3::JavaMethod or j3::JavaField are malloced.

Okay, it would appear I still don't understand.  I thought you were
saying we didn't GC-allocate instances of "java.lang.Class",
"java.lang.ref.Field", etc (which kinda made sense since they all come
from the JVM and I don't think you can do much with them besides pass
around a pointer/call methods on them).

>>
>> However the field layout is wrong, and the protection domain is wrong...
>>
>> I'll get back to you :).
>>

Patch for this submitted in different thread, should be
straightforward (just mapped over the field layout from javap) but
splitting that from this discussion.

>
> OK. Note that I understand the problem and have a few ideas we could
> discuss. But please do as you think would be best, and we can then talk :)
> Nicolas
>

Well, if you have the time I would very much appreciate any ideas you
have.  As you said you "understand the problem" hehe (and you might
notice I'm still very much learning how this all works!) so I'm more
than happy to, uh, let you take the lead on this :).  Although I do
humbly ask that you explain briefly if you don't mind too terribly :).

Would something as simple as adding extra fields to JavaObjectClass
work? java.lang.Class *is* final and not cloneable, after all...

~Will



More information about the vmkit-commits mailing list