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 <xu.re...@gmail.com> 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 <xu.re...@gmail.com> 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:

1. add build scrip for native code, "ant compile" will compile both java and 
native.

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]

--
Best Regards,
Regis.

Reply via email to