Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 14324 invoked from network); 16 Aug 2009 08:20:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Aug 2009 08:20:12 -0000 Received: (qmail 2273 invoked by uid 500); 16 Aug 2009 08:20:18 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 2191 invoked by uid 500); 16 Aug 2009 08:20:18 -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 2180 invoked by uid 99); 16 Aug 2009 08:20:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 08:20:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daniel.gong.fudan@gmail.com designates 209.85.212.182 as permitted sender) Received: from [209.85.212.182] (HELO mail-vw0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 08:20:10 +0000 Received: by vws12 with SMTP id 12so2154238vws.24 for ; Sun, 16 Aug 2009 01:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=u9Rh7wySrwA0z3OW0y/9US7VZTohSpzjJpToPn+JeQo=; b=jGR5SIMxVOma5xTGAyJaAD8aCcFjr+pqPVkc6+X0AG3crFv6bWtyw10rnwVbv3izv7 +33agrqhbE3VLyeLgx9PS3j5S4an+vVj/Sz5RKFlwrtmfbefEH7SzAvCFvqmBp+UIrTk hSkeguAHfMs0vHSmaR3EwvxXXvI2Ftd3DLrEA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=bKKFhS0gmtq7EQmeJnU+oM1XJz6HnzhFBfJuZqI6WbN8wR/ao1Wqnw7ddg5bCqPaNi BV6ERTQddvRUl8E6m+BMNrOKfsY2zDz3ImT2/k3x7A76YxWSWAXo7BZBiecHoXR2jjdK SWAAb3ygUL8HrLTCDHZ/MvzgqqMPjGx8m4FQg= MIME-Version: 1.0 Received: by 10.220.13.131 with SMTP id c3mr3639404vca.33.1250410788835; Sun, 16 Aug 2009 01:19:48 -0700 (PDT) In-Reply-To: <4A83A458.8090902@gmail.com> References: <2cde31750908050031t45afd716wdaf3a6082c556816@mail.gmail.com> <4A793864.7030002@gmail.com> <2cde31750908050053p3e60943flca1f507f91e1f935@mail.gmail.com> <4A794571.5060500@gmail.com> <2cde31750908050149l88cf160h3bd4554b76c55996@mail.gmail.com> <4A7A4618.10007@gmail.com> <2cde31750908100501k1348ba44p47f9f88647d6e7a6@mail.gmail.com> <4A837C24.7020504@gmail.com> <2cde31750908122129x70d766a7od1747040debb4ab9@mail.gmail.com> <4A83A458.8090902@gmail.com> Date: Sun, 16 Aug 2009 16:19:48 +0800 Message-ID: <2cde31750908160119q7fc3380dtd86bab8bb1604d19@mail.gmail.com> Subject: Re: [GSOC] The code for smallest class set for customer application in now on JIRA From: Daniel Gong To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=001485e771f8e4505204713df209 X-Virus-Checked: Checked by ClamAV on apache.org --001485e771f8e4505204713df209 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Regis, On Thu, Aug 13, 2009 at 1:27 PM, Regis wrote: > Daniel Gong wrote: > >> I also encountered the Ubuntu "permission denied" problem... >> I think handling this kind of problem is the user's responsibility. >> > > But it'll break build script. When we are testing it, we are using it, it's > our responsibility to make it work. > > Simply adding > > > Since adding this is a small change, should I upload a new version to JIRA? Besides, I am wondering what else should I do for GSoC? -Daniel > after generating jre can make it work on Linux. > > > >> Thank you very much, Regis. >> >> -Daniel >> >> On Thu, Aug 13, 2009 at 10:36 AM, Regis wrote: >> >> Daniel Gong wrote: >>> >>> On Thu, Aug 6, 2009 at 10:55 AM, Regis wrote: >>>> >>>> Daniel Gong wrote: >>>> >>>>> Yes it is the problem of the build file, I have correct it and >>>>> upload >>>>> >>>>>> a >>>>>> new one:) >>>>>> To run it, you should modify the origin and target property in the >>>>>> build >>>>>> file to your origin jre path and the target min jre path. >>>>>> More, I have updated the description. Hope it will help you all and >>>>>> work >>>>>> well:) >>>>>> >>>>>> On Wed, Aug 5, 2009 at 4:40 PM, Regis wrote: >>>>>> >>>>>> Daniel Gong wrote: >>>>>> >>>>>> Sorry, that's my fault. It seems I have put the wrong version of ant >>>>>>> >>>>>>> build...I will correct it and upload it again. >>>>>>>> >>>>>>>> It seems not a problem of ant, when I removed takedef of "analyze" >>>>>>>> and >>>>>>>> >>>>>>>> "gen", ant compile work correct, but ant test-hello (which only >>>>>>> depends >>>>>>> on >>>>>>> compile), reported error again: >>>>>>> >>>>>>> C:\download\minijre\build.xml:56: Execute failed: >>>>>>> java.io.IOException: >>>>>>> Cannot run program "${target} >>>>>>> \bin\java": CreateProcess error=2, The system cannot find the file >>>>>>> specified >>>>>>> >>>>>>> And I found ${target} is never defined, do you mean ${target.dir} >>>>>>> here? >>>>>>> ${cns} ${origin} ${test} should also be ${cns.dir} ${origin.dir} >>>>>>> ${test.dir} >>>>>>> >>>>>>> After fixing these variables and copy Harmony JRE to "origin" dir, I >>>>>>> can >>>>>>> run "ant test-hello" successfully. The target directory should be >>>>>>> minijre, >>>>>>> the size of "lib" is reduced from 40.1MB to 10.4MB, looks great!! >>>>>>> >>>>>>> I'm waiting Daniel's description, so didn't try the agent yet :) >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Aug 5, 2009 at 3:44 PM, Regis wrote: >>>>>>> >>>>>>> Daniel Gong wrote: >>>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>>> I have my code attached in issue HARMONY-6291 on JIRA. I'd like to >>>>>>>>> >>>>>>>>>> call >>>>>>>>>> it >>>>>>>>>> MinJre Toolkit. >>>>>>>>>> >>>>>>>>>> Now the coding of MinJreToolkit is almost complete. It includes >>>>>>>>>> functional >>>>>>>>>> classes as well as command line tool and ant task implemented >>>>>>>>>> based >>>>>>>>>> on >>>>>>>>>> them. >>>>>>>>>> More, for dynamic tracing, a jvmti agent has been implemented. >>>>>>>>>> Both >>>>>>>>>> static >>>>>>>>>> analysis and dynamic tracing produce a type of result file called >>>>>>>>>> cns >>>>>>>>>> (Class >>>>>>>>>> Name Set) file, which has an associated data structure called >>>>>>>>>> ClassNameSet >>>>>>>>>> that can be created from a cns file, witten to a cns file and >>>>>>>>>> merged >>>>>>>>>> with >>>>>>>>>> a >>>>>>>>>> cns file. The cns file in the conf directory contains the required >>>>>>>>>> classes >>>>>>>>>> for different jre implementations. Now it only supports Harmony. >>>>>>>>>> >>>>>>>>>> The toolkit can be used in two steps. First, employ both static >>>>>>>>>> analyzer >>>>>>>>>> and >>>>>>>>>> dynamic tracer in the process of application development and test, >>>>>>>>>> and >>>>>>>>>> record necessary information in several cns files. Second, employ >>>>>>>>>> the >>>>>>>>>> jre >>>>>>>>>> generator to merge these cns files and generate a new jre from an >>>>>>>>>> original >>>>>>>>>> one. >>>>>>>>>> >>>>>>>>>> So far I have written a simple ant build file to handle the whole >>>>>>>>>> process >>>>>>>>>> including compile, test, pack & javadoc. The compiling of the >>>>>>>>>> agent >>>>>>>>>> is >>>>>>>>>> not >>>>>>>>>> in because I'm still learning ant usage. The test is also very >>>>>>>>>> simple, >>>>>>>>>> just >>>>>>>>>> a helloworld app:P >>>>>>>>>> >>>>>>>>>> I'll improve the toolkit by adding command line script, optimizing >>>>>>>>>> ant >>>>>>>>>> build, doing more test and improve the algorithm if a better >>>>>>>>>> strategy >>>>>>>>>> is >>>>>>>>>> found. >>>>>>>>>> >>>>>>>>>> Everyone please feel free to give me advice or report bugs to >>>>>>>>>> me~thx:) >>>>>>>>>> >>>>>>>>>> Daniel Gong >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Well done Daniel! >>>>>>>>>> >>>>>>>>>> I'm trying to build the tool. I downloaded minjretoolkit.tar.gz >>>>>>>>>> >>>>>>>>> from >>>>>>>>> HARMONY-6291, and extract it, then run "ant" or "ant compile", but >>>>>>>>> got >>>>>>>>> a >>>>>>>>> error: >>>>>>>>> >>>>>>>>> c:\download\minijre\build.xml:23: taskdef class >>>>>>>>> org.crazynut.harmony.minjre.anttask.AnalyzeDependenc >>>>>>>>> yTask cannot be found >>>>>>>>> >>>>>>>>> Did I miss anything? >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Best Regards, >>>>>>>>> Regis. >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> Best Regards, >>>>>>>> >>>>>>> Regis. >>>>>>> >>>>>>> >>>>>>> I tried the new one, the build script worked fine for me. Following >>>>>>> >>>>>> the >>>>> instructions on JIRA, I generated dynamic trace by agent and merged >>>>> with >>>>> static one successfully, seems you have finished the core part of this >>>>> tool, >>>>> well done!! >>>>> >>>>> While there are still places can be improved: >>>>> >>>>> Dear all, >>>> >>>> 1. add build scrip for native code, "ant compile" will compile both java >>>> and >>>> native. >>>> >>>> Done. >>>> >>>> 2. -agentlib:Agent=help print help info about how to use this agent. I >>>> you >>>> type java -agentlib:jdwp=help to see the example. The options of agent >>>> usually is name=value pattern, maybe something like: java >>>> -agentlib:Agent=tracefile=[filename] >>>> >>>> Done. Usage: java -agentlib:tracer=output=[filename] >>>> >>>> The zip file attached to HARMONY-6291 is the newest version of MinJre >>>> Toolkit. >>>> >>>> The ant build file can compile and test jvmti agent now. >>>> >>>> I have tested it under Windows XP SP3 & Ubuntu 9.04. >>>> >>>> The script directory is command line launcher for the analyzer and >>>> jregen, >>>> not implemented yet, but in my plan. >>>> >>>> Best Regards, >>>> >>>> Daniel Gong >>>> >>>> >>>> Hi Daniel, >>> >>> The new package on JIRA is good! I tried on Windows XP and Ubuntu 8.04.2, >>> all worked fine except when trying to run generated java, it complained >>> "Permission denied", after I added execution permission, it worked >>> smoothly. >>> >>> I think it's time to integrate Daniel's work to Harmony repository, so >>> Daniel can work with community easily and closely, and also anyone >>> interested on this could work on this. If no one object I'm going to >>> apply >>> HARMONY-6291 to [1]. >>> >>> >>> [1] >>> https://svn.apache.org/repos/asf/harmony/enhanced/tools/trunk/minijre >>> >>> -- >>> Best Regards, >>> Regis. >>> >>> >> > > -- > Best Regards, > Regis. > --001485e771f8e4505204713df209--