Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 10553 invoked from network); 14 Dec 2009 18:32:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Dec 2009 18:32:43 -0000 Received: (qmail 81530 invoked by uid 500); 14 Dec 2009 18:32:42 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 81451 invoked by uid 500); 14 Dec 2009 18:32:42 -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 81440 invoked by uid 99); 14 Dec 2009 18:32:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 18:32:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rogers.email@gmail.com designates 209.85.218.210 as permitted sender) Received: from [209.85.218.210] (HELO mail-bw0-f210.google.com) (209.85.218.210) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 18:32:33 +0000 Received: by bwz2 with SMTP id 2so2382111bwz.20 for ; Mon, 14 Dec 2009 10:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=oP2ZBwMoxMdmTHePhQGw9Tukeq1JIctsjcjpoYM4qWI=; b=dkEwhom7XZAO4rYHhqLbKBpJmxR7USWgAruz6JQps4SG8QvVlgCtXEJj76Bi3ayy18 oxVcjSHPTdR0llooZIYJSWI0nT3olmxX/88BWSq7E6G7sSVbLFwBiAARUJJlO1SBEFd/ ZUAWDEHGfkuFKvCDvBky7aUxD1xSm3Ddt04e4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=swBukEBseoMAj+SM5WcL41LJ2HVT15KVlIkIQFK/VGuTgmksUM5BN8V++I2HHpJNjM Ehki4HeVou47fOJqher1Bo6J9bE8V1lqqAMXqS5ZE/x+ve3pp+Egno5zOREQc7XFLe/W WcV8Kv345uP2wxQ2pFpPPk5t7/y0dPp61NEf4= MIME-Version: 1.0 Sender: rogers.email@gmail.com Received: by 10.204.10.13 with SMTP id n13mr3019125bkn.60.1260815533036; Mon, 14 Dec 2009 10:32:13 -0800 (PST) In-Reply-To: <5be4369f0912141014i24cf665ene342e44ce59b8efd@mail.gmail.com> References: <008601ca7cbc$0877df50$19679df0$@edu.cn> <87tyvtzdg9.fsf@gmail.com> <5be4369f0912141014i24cf665ene342e44ce59b8efd@mail.gmail.com> Date: Mon, 14 Dec 2009 10:32:12 -0800 X-Google-Sender-Auth: a3830c9d22f922b4 Message-ID: Subject: Re: How to debug in JET code generation? From: Ian Rogers To: dev@harmony.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Great news on another DRLVM port! Having a common test suite of VM unit tests would be useful for MRP [1], is there/could we create one under Harmony? I'm thinking of tests like all the integer/long divide corner cases and floating point remainder. I'd love to know a test case where Intel's partial remainder actually needs to go around more than once to produce the correct result. Regards, Ian [1] http://mrp.codehaus.org/ 2009/12/14 Christopher Sabol : > For what's its worth, on MIPS it did some hacking to validate the basic A= LU > operations before moving on to get the standard classes to initialize. > > If you look up the MIPS patch that Charles sent out, I believe it still > contains my "SIMPLE_START" define hack.=A0 That define basically causes t= he > DRLVM class initialization logic to not run a bunch of the standard > initialization logic.=A0=A0 I haven't gotten around to pulling it out yet= ... > > Anyhow, I've also attached the simple kernel.jar and class files that > basically do a number of unit tests in the java.lang.Object() constructor= . > When combined with SIMPLE_START, you can validate the generated assembly = and > output without having to have everything working.=A0 There are a number o= f > static native methods that the classes use to print output information, y= ou > can also get the implementation for those from the MIPS patch as well. > > Other than that I was using gdb a bunch and had the compile tracing turne= d > on to validate the assembly.=A0 I was generally running drlvm with the > following command line: > > java -Xem:jet -verbose -Xtrace:vm.core.init -Xtrace:init -Xtrace:em > -Xtrace:invoke -Xtrace:compile -Xtrace:harmonyvm -Xtrace:class > -Xtrace:natives -Xdumpstubs -XX:jit.JET.arg.log=3Dct,sum,cg,layout,code > -Xtrace:jitrino -Xtrace:vm.stack -Xtrace:exn -Xtrace:vm.helpers -jar dumm= y > > Assuming you are running big endian, you may want to pick up the ENDIAN > changes from the MIPS patch, since those will be needed and are a pain to > find. > > -Chris > > On Mon, Dec 14, 2009 at 9:13 AM, Egor Pasko wrote: >> >> On the 0x687 day of Apache Harmony pillow wrote: >> > Hi all: >> > >> > We are new in Harmony porting work. >> > >> > Now we want to port harmony DRLVM's JET to Sparc. We have implemented >> > encoder and Lil compiler for this >> >> wow, that's cool! what a surprise! >> >> > platform and go to code generation phase. >> > >> > We want some advice that how to debug here easily. >> >> GDB/DDD debugger should work fine on linux. Do you have some specific >> problems to list here? >> >> > If we want to run a HelloWorld program out, is it necessary to >> > pass all library classes compilation with JET first? >> >> Yes, absolutely. Hello World is written mostly in java, you will need >> to compile a fair bunch of methods to run HelloWorld. >> >> -- >> Egor Pasko >> > >