You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ivan Popov <iv...@gmail.com> on 2006/10/03 21:45:16 UTC

Re: Where to put the tools.... (was Re: [vote] HARMONY-1410 : JDWP agent for DRLVM)

Initially I considered putting JDWP agent to classlib as part of JPDA
module, so its build is adjusted to the classlib build structure. But
I agree that putting it to tools directory (or to jdktools as
discussed in separate thread) should be better solution. JDWP agent is
not an implementation of Java classes like classlib modules, it
provides debug service for JRE and thus logically it is closer to
tools, though it is not a "true" tool like javac, javap, rmic, etc.,
it's rather service.

I suggest creating JPDA module in tools (or jdktools) directory and
putting there the whole JDWP contribution that includes implementation
of JDWP agent, TCP/IP socket transport, and JDWP unit tests. Creating
JPDA module in tools for JDWP agent gives the following advantages:

--- this follows logical structure of JPDA architecture that includes
JDI, JDWP, JVMTI/DI/PI levels
--- initially it will include JDWP implementation as a minimal support
for debug service in Harmony JRE
--- one day we can add here JDI implementation (main JPDA component
currently provided by Eclipse JDT debugger) that is necessary in JDK
for enabling other Java debuggers
--- we can also add here implementation of profiling agent similar to
what is included in other JDKs
--- we can add here any other JPDA based tools and services which
provide extended functionality
--- tests for all JPDA components can share JPDA testing framework
currently provided with JDWP tests that facilitates running two JVM
instances (debugger/debuggee or profiler/profilee)

I think you can put JDWP contribution to tools/jpda as is, it is
proven to be built separately. AFAIK, currently there are no rules and
runtime structure for building tools, each tool is built separately. I
can then provide a patch for build.xml just to facilitate separate
build according to the new location of JPDA module. But I think we
need a discussion of how to include building tools into common build
and what should be supported by their build scripts. Anyway, I
volunteered for providing any support for quick integration of JDWP
agent into Harmony sources and resolving all problems.

Finally, I'd like to add several notes according to putting JDWP agent to tools:

--- Unlike to other tools whose binaries usually go to JDK binaries
directory, JDWP agent binary usually goes to JRE binaries directory.
This enables debugging application running on JRE even if you have no
JDK available, especially if you are debugging application remotely.

--- I'd like to see JDWP unit tests included into regular tests runs,
they often reveal problems with JVMTI and JNI support when JVM
implementation is changed. I'm not sure that unit tests are provided
with other tools and included into tests run, and this can be a
separate topic for discussion.

Thanks.
Ivan


On 9/28/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> Keeping the discussion out of the vote thread.
>
> Both this and javah aren't going into classlib anyway.  I was going
> to suggest we put them into /tools, bring the javac and keytool over,
> and I volunteer to do it.  Then add that to the federated build, and
> get into the jdk.
>
> geir
>
> On Sep 28, 2006, at 8:07 AM, Ivan Popov wrote:
>
> > Yes, build script for JDWP agent should be aligned with the current
> > classlib build structure. It should be easy, because it is generally
> > oriented to the classlib structure and requires just a few changes. I
> > can provide patch for this.
> >
> > I tried to build JDWP agent as a separate classlib component and it
> > was built successfully with some known problems mentioned in README.
> >
> > Thanks.
> > Ivan

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Where to put the tools.... (was Re: [vote] HARMONY-1410 : JDWP agent for DRLVM)

Posted by Ivan Popov <iv...@gmail.com>.
Yes, JDWP agent uses most of JVMTI functions, and testing JDWP level
indirectly checks JVMTI implementation. JDWP unit tests included into
JDWP contribution do not provide exhaustive testing, but they often
catch problems with basic JVMTI support related to debug
functionality.

However, there is a number of JVMTI functions not used in JDWP agent.
They are targeted for profiling support and will not be tested with
JDWP tests. But they can be tested with any Java profiler, for example
new JVMTI profiler in Eclipse TPTP project [1]. Their automation
testing framework can be used for testing JVMTI profiling support in
Harmony JRE.

Ivan.

[1] http://www.eclipse.org/tptp/

On 10/4/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
>
> Ivan Popov wrote:
> >
> > --- I'd like to see JDWP unit tests included into regular tests runs,
> > they often reveal problems with JVMTI and JNI support when JVM
> > implementation is changed. I'm not sure that unit tests are provided
> > with other tools and included into tests run, and this can be a
> > separate topic for discussion.
>
> Yah, I've been noting that in JVMTI commit messages - we need a suite of
> JVMTI tests, and I guess we can use the agent for it?
>
> geir
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Where to put the tools.... (was Re: [vote] HARMONY-1410 : JDWP agent for DRLVM)

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Ivan Popov wrote:
> 
> --- I'd like to see JDWP unit tests included into regular tests runs,
> they often reveal problems with JVMTI and JNI support when JVM
> implementation is changed. I'm not sure that unit tests are provided
> with other tools and included into tests run, and this can be a
> separate topic for discussion.

Yah, I've been noting that in JVMTI commit messages - we need a suite of 
JVMTI tests, and I guess we can use the agent for it?

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org