Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 14646 invoked from network); 12 Dec 2006 15:05:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2006 15:05:47 -0000 Received: (qmail 81650 invoked by uid 500); 12 Dec 2006 15:05:52 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 81614 invoked by uid 500); 12 Dec 2006 15:05:52 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 81605 invoked by uid 99); 12 Dec 2006 15:05:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 07:05:51 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: 209.85.132.241 is neither permitted nor denied by domain of mike.fursov@gmail.com) Received: from [209.85.132.241] (HELO an-out-0708.google.com) (209.85.132.241) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 07:05:41 -0800 Received: by an-out-0708.google.com with SMTP id b2so351552ana for ; Tue, 12 Dec 2006 07:05:20 -0800 (PST) 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:references; b=LXAbbniIDH/0SXvE/UygTflbKgBLXP+9C7H8jqvXfg22GoUd21+DVXvUj5e1M/QZbsyhUXWfeZWzv3i0Ur78r7RfvcqExvHUgLHlImxwWLJiUJpnmWZyWO05vPhcnWgulSZROhYwdnLT8i5asBbOH4c3JytzaDi9C8yRZtF3zcw= Received: by 10.78.157.8 with SMTP id f8mr4123168hue.1165935912734; Tue, 12 Dec 2006 07:05:12 -0800 (PST) Received: by 10.78.182.4 with HTTP; Tue, 12 Dec 2006 07:05:11 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2006 21:05:11 +0600 From: "Mikhail Fursov" To: dev@harmony.apache.org Subject: Re: [DRLVM][Helper inlining] GC write barrier inline? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_133535_901819.1165935911975" References: <9623c9a50611281757h3b8923d2o52e54adc857c073c@mail.gmail.com> <9623c9a50612060409s7e936f0dv1692502dc97cbe75@mail.gmail.com> <9623c9a50612061955j307e8aaem71d54898313aeada@mail.gmail.com> <9623c9a50612071626r3a160004x81592cb3fb70deed@mail.gmail.com> <9623c9a50612111845h1db91974v29772793f2075465@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_133535_901819.1165935911975 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Xiao Feng, I put the initial patch to HARMONY-2652. This patch runs all scenarios using gc_gen that I can run without helpers inlined. Let's wait H2500 is commited and I can update the patch with diff derived from svn update. On 12/12/06, Mikhail Fursov wrote: > > Xiao Feng, > I missed one very important line in gc_heap_slot_write_ref: > *p_slot = p_target; > > and now I understand why replacing the old call with WB helper you sent in > the initial message does not work. > I'm going to add store operation into the helper now and retest it. > > + I'm ok to discuss and clean up GC interface as you proposed after the > most simple version of WB is working. > > > On 12/12/06, Xiao-Feng Li < xiaofeng.li@gmail.com> wrote: > > > > Mikhail, the gc_heap_slot_write_ref is an old GC interface in ORP. > > The original idea for this interface is, any Java heap slot reference > > store should go through this GC function, including VM and Java > > application. So this function does the real reference store, the > > original store in JITted code will not be emitted. Hence the OPT write > > barrier has no problem. > > > > The problem with this interface is, it has no clear definition about > > whether a write barrier is needed or not. That's why I suggested to > > use a new interface gc_heap_slot_write_barrier for the helper inlining > > work. The code for it is the same as gc_heap_slot_write_ref for > > generational GC (without the check for needing barrier or not). Since > > the WB inlined helper is only invoked when generational GC is run, the > > check is redundant completely. > > > > I am not sure if I make it clear. > > > > Thanks, > > xiaofeng > > > > On 12/11/06, Mikhail Fursov wrote: > > > Xiao-Feng, > > > I'm slightly confused about current WB support in Jitrino.OPT, so I > > need an > > > advice. > > > > > > The problem: I think that write barriers in Jitrino OPT do not work. > > > > > > Example (see for lines marked with =>): > > > > > > > > > HIR with WB disabled: > > > > > > I1:defarg.ths -) t1:cls:java/net/URLClassLoader$4 > > > I2:tauisnonnull t1 -) t2:tau > > > I3:tauhastype t1,cls:java/net/URLClassLoader$4 -) t3:tau > > > I4:defarg -) t4:cls:java/net/URLClassLoader > > > I5:tauhastype t4,cls:java/net/URLClassLoader -) t5:tau > > > I6:defarg -) t6:cls:java/lang/String > > > I7:tauhastype t6,cls:java/lang/String -) t7:tau > > > I8:ldflda [t1.java/net/URLClassLoader$4::this$0] -) > > > t8:ref:cls:java/net/URLClassLoader > > > => I9:stind.unc:o t4 ((t2,t3,t5)) -) [t8] > > > I10:ldflda [t1.java/net/URLClassLoader$4::val$clsName] -) > > > t9:ref:cls:java/lang/String > > > => I11: stind.unc:str t6 ((t2,t3,t7)) -) [t9] > > > I12:tauunsafe() -) t10:tau > > > I13:call java/lang/Object::_init_(t1) ((t2,t10)) -) > > > > > > > > > The same HIR with WB enabled: > > > > > > Successors: L5 UNWIND > > > I1:defarg.ths -) t1:cls:java/net/URLClassLoader$4 > > > I2:tauisnonnull t1 -) t2:tau > > > I3:tauhastype t1,cls:java/net/URLClassLoader$4 -) t3:tau > > > I4:defarg -) t4:cls:java/net/URLClassLoader > > > I5:tauhastype t4,cls:java/net/URLClassLoader -) t5:tau > > > I6:defarg -) t6:cls:java/lang/String > > > I7:tauhastype t6,cls:java/lang/String -) t7:tau > > > I8:ldflda [t1.java/net/URLClassLoader$4::this$0] -) > > > t8:ref:cls:java/net/URLClassLoader > > > => I9:stref.wb.unc t4 ((t2,t3,t5)) -) [t8 t1] > > > I10:ldflda [t1.java/net/URLClassLoader$4::val$clsName] -) > > > t9:ref:cls:java/lang/String > > > => I11: stref.wb.unc t6 ((t2,t3,t7)) -) [t9 t1] > > > I12:tauunsafe() -) t10:tau > > > I13:call java/lang/Object::_init_(t1) ((t2,t10)) -) > > > > > > > > > > > > The LIR with WB disabled > > > > > > I1: t4:ref:cls:java/net/URLClassLoader (ID:s5(EFLGS):uint32) =ADD > > > > > t0:cls:java/net/URLClassLoader$4,t3(0:fo:java/net/URLClassLoader$4.this$0):intptr > > > > > > => I2: (AD:t6[t4]:object) =CopyPseudoInst/MOV > > > (AU:t1:cls:java/net/URLClassLoader) > > > I3: t8:ref:cls:java/lang/String (ID:s5(EFLGS):uint32) =ADD > > > > > t0:cls:java/net/URLClassLoader$4,t7(0:fo:java/net/URLClassLoader$4.val$clsName):intptr > > > > > > => I4: (AD:t9[t8]:string) =CopyPseudoInst/MOV > > > (AU:t2:cls:java/lang/String) > > > > > > > > > > > > > > > The same LIR with WB enabled > > > > > > I1: t4:ref:cls:java/net/URLClassLoader (ID:s5(EFLGS):uint32) =ADD > > > > > t0:cls:java/net/URLClassLoader$4,t3(0:fo:java/net/URLClassLoader$4.this$0):intptr > > > > > > > > => I2: CALL t6(0:h:WriteBarrier):ptr:intptr > > > > > (AU:t0:cls:java/net/URLClassLoader$4,t4:ref:cls:java/net/URLClassLoader,t1:cls:java/net/URLClassLoader) > > > > > > I3: t8:ref:cls:java/lang/String (ID:s5(EFLGS):uint32) =ADD > > > > > t0:cls:java/net/URLClassLoader$4,t7(0:fo:java/net/URLClassLoader$4.val$clsName):intptr > > > > > > => I4: CALL t9(0:h:WriteBarrier):ptr:intptr > > > > > (AU:t0:cls:java/net/URLClassLoader$4,t8:ref:cls:java/lang/String,t2:cls:java/lang/String) > > > > > > > > > > > > > > The question is what is in the CALL? I see only the method: > > > gc_heap_slot_write_ref and this method does not save anything into > > fields. > > > Does it mean that WB support in Jitrino.OPT is incomplete today? > > > > > > -- > > > Mikhail Fursov > > > > > > > > > > > > -- > Mikhail Fursov -- Mikhail Fursov ------=_Part_133535_901819.1165935911975--