Can we use Eclipse tap into JVM to publish information?

M

Mahim

Hi there,

I have been working on a visualization system that presents
information about any java application pictorially, as it runs. As of
now, we instrument the code of the target application to generate
events such as "class access", "method entry & exit", "current thread"
etc, however we want to :

1. Leave the target code alone and get the information directly from
the JVM.
2. Develop the system into an Eclipse plugin.

Is there a way in which we can tap into the JVM within Eclipse
and get the required information. Any suggestions, ideas and
recommendations are welcome.

Thanks,
Mahim.
 
R

Robert Olofsson

Mahim ([email protected]) wrote:
: 1. Leave the target code alone and get the information directly from
: the JVM.
: 2. Develop the system into an Eclipse plugin.

: Is there a way in which we can tap into the JVM within Eclipse
: and get the required information. Any suggestions, ideas and
: recommendations are welcome.

There are a few profilers that you may want to look at. Here are a few
open ones that can be a starting point perhaps:

Eclipse profiler plugin:
http://sourceforge.net/projects/eclipsecolorer/

jmechanic for eclipse:
http://jmechanic.sourceforge.net/

My own profiler not for eclipse, but may have its uses, jmp:
http://www.khelekore.org/jmp/

Many profilers for java use the jvmpi (C-)interface to get the
information needed, but there are also a few that change the bytecode
upon class loading...

/robo
 
R

Rory Graves

I have been doing something similar - have a look at the Java Platform
Debugging Archtecture (JPDA) otherwise known as Java Debuggin Interface
(JDI) . This is actually supplied as part of the new runtimes (>1.3 I
believe). It allows you to hook into the JVM and get callbacks on all
of these things. It even comes with an example that displays all of the
method entries/exits and variable assignments.

See: http://java.sun.com/products/jpda/

Hope this helps,

Cheers

Rory
 
M

Mahim

Thanks Rory, I went over the documentations for jpda and found it very
interesting. I know I have to delve further into it. Thanks a lot for
providing a direction.

Mahim.
 
M

Mahim

Thanks Robo, I would certainly look at the resources you have pointed
out. However, I was more interested in programming it myself, as there
are certain aspects of the project that I need to consider. If I could
have had a look at the source code of any of the profiling tools that
you have mentioned, it would have been great.

Thanks again,
Mahim.
 
R

Robert Olofsson

Mahim ([email protected]) wrote:
: If I could
: have had a look at the source code of any of the profiling tools that
: you have mentioned, it would have been great.

: (e-mail address removed) (Robert Olofsson) wrote in message : > http://sourceforge.net/projects/eclipsecolorer/
.....
: > http://jmechanic.sourceforge.net/
.....
: > http://www.khelekore.org/jmp/

All of the mentioned resources point to open source and/or free software.
For example the source for eclipsecolorer can be found in
the CVS for it, browsable at:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/eclipsecolorer/

have fun
/robo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top