Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 71721 invoked from network); 21 Sep 2005 17:04:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2005 17:04:20 -0000 Received: (qmail 64823 invoked by uid 500); 21 Sep 2005 17:04:12 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 64667 invoked by uid 500); 21 Sep 2005 17:04:11 -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 64654 invoked by uid 99); 21 Sep 2005 17:04:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2005 10:04:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.34.34.7] (HELO mail-1.colo.sourcelabs.com) (64.34.34.7) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2005 10:04:19 -0700 Received: from [192.168.0.115] (dsl081-182-155.sea1.dsl.speakeasy.net [::ffff:64.81.182.155]) (AUTH: LOGIN willpugh, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by mail-1.colo.sourcelabs.com with esmtp; Wed, 21 Sep 2005 10:03:47 -0700 id 000000000014002A.0000000043319273.0000024F Message-ID: <4331924C.5080701@sourcelabs.com> Date: Wed, 21 Sep 2005 10:03:08 -0700 From: will pugh User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [arch] Interpreter vs. JIT for Harmony VM References: <7cbeaf9e050921021216b4e6a2@mail.gmail.com> <43317C6B.8080100@sourcelabs.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Short answer is "yes", but there are a few issues you need to take into account. You need to deal with: 1) Changed classes/jars. Need to be able to detect when you have a new copy of a jar or a classfile 2) Instrumented code. If you are in a situation where code is getting instrumented (JVMTI, Apps using BCEL, etc) you need to make sure not to cache the intrsumented code if it is at all dependent on runtime parameters or environmental parameters 3) Custom Classloaders. Hard to know what they will load and from where. 4) Security concerns. Can someone get at the JITed code on disk? (In general this is probably not too big a deal, since given disk access someone could hack any of your images. You just want to make sure people recognize distributing cached images is not really as safe as distributing Java) If you're just looking to make startup fast, you can cache purely on a per class level where you simply ignore the first three problems and just cache classname, MD5 hash and native code. Then as a class is being loaded verify the MD5 hash and pull the image from disk is that you need to make sure to have no optimizations that take into account anything else or have some kind of dependency tree for them. E.g. If class A uses class B, and we inline a number of the methods where classA calls into classB, then cache these to disk. Then if class B changes, class A needs to know that it needs to be rebuilt as well (although this may not be too hard since you probably need to cache that info as well. . .). If you want to cache to allow long running optimizations to be preserved it's a bit trickier because you need to deal with issues 1-3 above. --Will Michael Haupt wrote: >Hi, > >On 9/21/05, will pugh wrote: > > >> 2) The FastJIT needs to be Fast! Otherwise, you run the risk of >>people not wanting to use it for IDEs and Apps because the startup time >>is too slow. >> >> > >couldn't startup time be increased by caching native code versions of >methods somewhere on the hard disk and loading instead of compiling >them every time the VM is started up? > >Sorry for being off-topic, > >Michael > >