Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 58891 invoked from network); 21 Sep 2006 00:31:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2006 00:31:01 -0000 Received: (qmail 54901 invoked by uid 500); 21 Sep 2006 00:30:58 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 54857 invoked by uid 500); 21 Sep 2006 00:30:58 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 54846 invoked by uid 99); 21 Sep 2006 00:30:58 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2006 17:30:58 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=robin.garner@anu.edu.au; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain anu.edu.au from 130.56.64.71 cause and error) Received: from [130.56.64.71] ([130.56.64.71:18255] helo=messaging1.anu.edu.au) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 7F/35-04092-C3DD1154 for ; Wed, 20 Sep 2006 17:30:54 -0700 Received: from [150.203.163.99] by messaging1.anu.edu.au (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTP id <0J5X00BD42RC2N10@messaging1.anu.edu.au> for harmony-dev@incubator.apache.org; Thu, 21 Sep 2006 10:30:48 +1000 (EST) Date: Thu, 21 Sep 2006 10:31:19 +1000 From: Robin Garner Subject: Re: [drlvm][jit] MMTk-style magics implementation in Jitrino.OPT compiler In-reply-to: <4dd1f3f00609200845i6a5f500cw48bc6d9df0c296c6@mail.gmail.com> To: harmony-dev@incubator.apache.org Message-id: <4511DD57.9060405@anu.edu.au> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT References: <4dd1f3f00609180856i5d5beb62wbee23aeb5789163d@mail.gmail.com> <4dd1f3f00609200845i6a5f500cw48bc6d9df0c296c6@mail.gmail.com> User-Agent: Thunderbird 1.5.0.5 (X11/20060728) X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Weldon Washburn wrote: > On 9/20/06, Mikhail Fursov wrote: >> >> I put the update into JIRA. This update still has a lot of bugs, but is >> significantly more stable then the initial one. >> My plan is to work on lock prefix support in Jitrino.OPT CG tomorrow, so >> if >> somebody is interested to enhance the current implementation there >> will no >> conflicts in our work. >> >> + There are several issues to discuss that are not clear to me: >> >> 1) Do we allow to save magic class into object fields? If yes, GC must be >> aware about magics and do not enumerate magic fields. > > > Actually, the GC issues are taken care of at a higher level. The developer > who is using vmmagics must extend the "Uninterruptible" class. That's not actually strictly true, there's also the UninterruptiblePragma exception. More generally, the burden is on the programmer to ensure that objects that you hold an Address of don't move while you hold the reference, and these pragmas are one method of doing that. You could also use locks etc (in theory at least). > Another > issue is that storing an unboxed object from vmmagic into an arbitrary > object field has to be thought through very carefully by the developer. Or > else there will be stale pointers running around that will cause hard > crashes. In any case it is not a JIT responsibility. If the developer > puts > an object of type vmmagic Address in the heap then later retrieves a stale > pointer, disaster will hit. I know because I have done this accidentally. Magic loads and stores also don't trigger read/write barriers, so the programmer needs to manually insert barriers if they would have been called. > 4) Why do we need all of these types: Word, Offset, Extent if they are all >> just platform dependent unsigned integers? I understand that code of >> garbage >> collectors already uses these types and we must support them all, but >> what >> was the initial reason to introduce all of them? > > > I thought the same thing when I first started working on MMTk port. Now I > see there is benefit in the different types because it makes the code > easier > to read and also allows java type system to catch dumb errors that > otherwise > would be left to debugging stage. Once upon a time, magic fields were all just ints, and the present variety evolved over time, precisely for this reason. An ObjectReference may seem mysterious to the casual observer (why don't we just use Object ?). This is present so that MMTk can support languages other than Java (Haskell was my original target, and we have done C#), and also so because the object model of the VM that executes MMTk code may not necessarily be the same as the system that MMTk is managing. So an ObjectReference is the 'moral equivalent' of an object. > Thats all for today. Will provide an update in a day or two. >> >> >> >> On 9/18/06, Weldon Washburn wrote: >> > >> > On 9/18/06, Mikhail Fursov wrote: >> > > >> > > All, >> > > I'm working on the implementation of MMTk's >> > > "org.vmmagic.unboxed" >> > > package functionality in Jitrino.OPT compiler. >> > > If you are interested to participate in the development, I propose to >> > > discuss all details in this mail thread. >> > > >> > > The current state: >> > > Part of the functionality of vmmagic package is done in the >> magic1.patch >> > . >> > > See JIRA 1489 (http://issues.apache.org/jira/browse/HARMONY-1489) >> > > >> > > Tasks that are not finished: >> > > 1) Support of unsigned types. >> > > 2) Support of atomic prepare/attempt operations >> > > 3) Testing suit for vmmagic package. >> > > 4) EM64T support >> > > >> > > >> > > I hope items 1) and 2) will be finished in a week or even sooner if >> > > someone >> > > helps. After it's done the item 4) won't be a problem. >> > > I think that the problem (at least for me) is item 3): we need a test >> > > suite >> > > for vmmagic package. I saw several tests in Weldon's >> drlvm/trunk/vm/MMTk >> > > folder, but this is not sufficient to cover the whole vmmagic >> package. >> > > Does >> > > anyone know/can_write a reliability test suite for vmmagic we can use >> in >> > > Harmony? >> > >> > >> > >> > A regression test for vmmagic exists. I have been trying to get it >> > donated >> > and posted to MMTk repository. Its been a couple of months and no >> > response. I will find out if it can be donated to Apache. >> > >> > -- >> > > Mikhail Fursov >> > > >> > > >> > >> > >> > -- >> > Weldon Washburn >> > Intel Middleware Products Division >> > >> > >> >> >> -- >> Mikhail Fursov >> >> > > --------------------------------------------------------------------- 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