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

Nicolas Geoffray nicolas.geoffray at gmail.com
Fri Oct 28 04:19:20 PDT 2011


On Thu, Oct 27, 2011 at 11:39 PM, Will Dietz <wdietz2 at illinois.edu> wrote:

> 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


Of course we do: whatever is used in Java code as a Java object must be
GC-allocated.


> (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).
>

What do you mean they come from the JVM? They have an internal JVM
representation that is not GC-allocated.


>
> >>
> >> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20111028/7191abe3/attachment.html>


More information about the vmkit-commits mailing list