Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 47916 invoked from network); 28 Aug 2006 04:39:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 04:39:04 -0000 Received: (qmail 94128 invoked by uid 500); 28 Aug 2006 04:39:03 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 93421 invoked by uid 500); 28 Aug 2006 04:39:01 -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 93410 invoked by uid 99); 28 Aug 2006 04:39:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 21:39:01 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of weldonwjw@gmail.com designates 66.249.82.225 as permitted sender) Received: from [66.249.82.225] (HELO wx-out-0506.google.com) (66.249.82.225) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Aug 2006 21:38:59 -0700 Received: by wx-out-0506.google.com with SMTP id s13so1519947wxc for ; Sun, 27 Aug 2006 21:38:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ls15XSqauqtFzSfWerfri8DQsJruGOFA+I1/rnVuEtLLYZVk7s1RzkIBvnbh5CC92LDQno9T/CXaHifo6M5E7rWCk0IOUElbVSLXOhFu9V3NWoofRRv8TYvHhQYpgpDhEitIMWklfPE7Jm6TBXb/LGzTiczpVkIeVNBRSeUTJ80= Received: by 10.90.94.2 with SMTP id r2mr861084agb; Sun, 27 Aug 2006 21:38:38 -0700 (PDT) Received: by 10.90.82.2 with HTTP; Sun, 27 Aug 2006 21:38:37 -0700 (PDT) Message-ID: <4dd1f3f00608272138o10579118l753f05075148ef4@mail.gmail.com> Date: Sun, 27 Aug 2006 21:38:37 -0700 From: "Weldon Washburn" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] how does drlvm insert the safe point into a method In-Reply-To: <003001c6ca4c$bb833020$1a438c0a@actfanbin> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <003001c6ca4c$bb833020$1a438c0a@actfanbin> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Fan, I think you are asking about safe instruction pointer addresses in JITed code where the JIT is able to enumerate all live references. If this is the case, it turns out there are lots of subtle interactions between all the pieces of the system. In otherwords, I can't do justice to the topic in an email. But I will point you in the right direction. The JIT can insert polling code at points where it knows it can find all live references on a thread's stack. When the GC wants a thread to suspend and report its live references, it can set a flag in the thread-local context. When the JITed code sees the flag set, it will suspend the thread and report the live references. As far as I know the DRLVM JIT you are looking at does not quite do this yet. An incomplete but useful for bringup approach is to let the targetted thread continue executing until it tries to allocate an object. Assuming there is no space available, the thread is vectored into the garbage collector itself. By design, object allocation sites are places where the JIT can enumerate all live references on the stack. There are other schemes, such as suspending and resuming the targetted thread until the JIT reports it can enumerate. I won't bore you with the details here. Let me know if this helps. On 8/27/06, Fan Bin wrote: > Hi, I have a question about jit compiler in drlvm. I want to suspend the thread manually on a particular point. I know that the thread can only be suspended at safe point. I guess the safe point is inserted by jit compiler when it compile the method, but I can't prove it from the source code. So my question is whether it's true that it is the jit compiler which insert the safe point. If it is true, how does it do this? > Thank you for your help. > -- Weldon Washburn Intel Middleware Products Division --------------------------------------------------------------------- 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