Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » how to transfer generated probeData best
how to transfer generated probeData best [message #95667] Thu, 12 April 2007 17:09 Go to next message
Thomas  ichstädt-Engelen is currently offline Thomas ichstädt-EngelenFriend
Messages: 50
Registered: July 2009
Member

Hi,

thanks to countless little pointers from you i managed to create a callgraph
and store it to Map that suites my needs at least.

Now i would like to work with this data in my plugin. First i thought that a
singleton will do the job but the Probkit launches a new JVM and so every
object generated in that context is lost after termination ... grmpf ...

Is the IOInterface the only possibility to send the data to the "surronding"
eclipse plugins (sorry if this question sounds naive to you).

Cheers,

Thomas E.-E.
Re: how to transfer generated probeData best [message #95845 is a reply to message #95667] Fri, 13 April 2007 20:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nmehrega.ca.ibm.com

This is a multipart message in MIME format.
--=_alternative 006E4708852572BC_=
Content-Type: text/plain; charset="US-ASCII"

I'm not sure if I fully understand your question, it would be helpful if
you explain exactly what your end goal is. Please see the following to
understand the high-level overview of how all this works:

It's not Probekit that launches another JVM instance. This is generally
done when you collect any profiling data. The JVM is launched by the
Agent Controller (or Integrated Agent Controller). The Agent Controller
has to run the Java application in profiling mode in order to collect
profiling data. In order for Probekit to *dynamically* instrument a Java
class, that Java class has to be launched by the Agent Controller,
Probekit then inserts its hooks dynamically to instrument the Java class.

You can also instrument a Java class *statically*, but this is only
practical for small Java applications. Once the Java class is statically
instrumented, the .class (or .jar) file(s) are modified on disk to include
all the instrumentation. Then you can launch your Java class normally
(instead of launching in profiling mode). To learn more about static
instrumentation, please see:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. hyades.probekit.doc.user/topics/c_pk_app_static.htm

Navid Mehregani
nmehrega@ca.ibm.com
--=_alternative 006E4708852572BC_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">I'm not sure if I fully understand your
question, it would be helpful if you explain exactly what your end goal
is. &nbsp;Please see the following to understand the high-level overview
of how all this works:</font>
<br>
<br><font size=2 face="sans-serif">It's not Probekit that launches another
JVM instance. &nbsp;This is generally done when you collect any profiling
data. &nbsp;The JVM is launched by the Agent Controller (or Integrated
Agent Controller). &nbsp;The Agent Controller has to run the Java application
in profiling mode in order to collect profiling data. &nbsp;In order for
Probekit to *dynamically* instrument a Java class, that Java class has
to be launched by the Agent Controller, Probekit then inserts its hooks
dynamically to instrument the Java class. &nbsp;</font>
<br>
<br><font size=2 face="sans-serif">You can also instrument a Java class
*statically*, but this is only practical for small Java applications. &nbsp;Once
the Java class is statically instrumented, the .class (or .jar) file(s)
are modified on disk to include all the instrumentation. &nbsp;Then you
can launch your Java class normally (instead of launching in profiling
mode). &nbsp;To learn more about static instrumentation, please see: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. hyades.probekit.doc.user/topics/c_pk_app_static.htm</font>
<br>
<br><font size=2 face="sans-serif">Navid Mehregani</font>
<br><font size=2 face="sans-serif">nmehrega@ca.ibm.com</font>
--=_alternative 006E4708852572BC_=--
Re: how to transfer generated probeData best [message #96037 is a reply to message #95845] Tue, 17 April 2007 08:44 Go to previous message
Thomas  ichstädt-Engelen is currently offline Thomas ichstädt-EngelenFriend
Messages: 50
Registered: July 2009
Member

This is a multi-part message in MIME format.

------=_NextPart_000_00A5_01C780DD.54F55340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Navid,

thanks for your reply and your high-level depiction.

My end goal is:

1. User works on some JUnit Tests and annotates it with methods which =
the user thinks will be called through this test (because these methods =
could be culprints to let it fail)
2. After saving (or something similar) my plugin initiates the creation =
of a dynamic callgraph silently (with no user interaction)
3. Callgraph is created and stored somewhere where the plugin can =
retrieve it
4. User opens a dialog to see dynamically called methods
5. Plugin uses the formerly stored callgraph to show content
6. Plugin verifies annotated methods and gives some advice to the user =
whether to change annotations (e.g. you said method x will by called by =
this JUnit test but the callgraph discovered that it is not called. This =
is a possible failure or your Annotation is too old)

Could this be achieved somehow?

Alternatively i tried to go for the traceModel. Traverse through the =
Objects and listing the invocations (invocated methods) gives me the =
callgraph, too. My Problem is: How to get access to the _non_ persistent =
traceModel through my plugin. Is it through PDContentProvider? I =
registered my Plugin as ProfileEventListener. On STOP_COLLECTING i =
stored the URI from TRCAgentProxy.getAgent() to get acces to it later =
on. But the i get a NullPointerException while restoring a ResourceSet =
from the URI.

Thomas E.-E.


"Navid_Mehregani" <nmehrega@ca.ibm.com> schrieb im Newsbeitrag =
news:evonog$qug$1@build.eclipse.org...

I'm not sure if I fully understand your question, it would be helpful =
if you explain exactly what your end goal is. Please see the following =
to understand the high-level overview of how all this works:=20

It's not Probekit that launches another JVM instance. This is =
generally done when you collect any profiling data. The JVM is launched =
by the Agent Controller (or Integrated Agent Controller). The Agent =
Controller has to run the Java application in profiling mode in order to =
collect profiling data. In order for Probekit to *dynamically* =
instrument a Java class, that Java class has to be launched by the Agent =
Controller, Probekit then inserts its hooks dynamically to instrument =
the Java class. =20

You can also instrument a Java class *statically*, but this is only =
practical for small Java applications. Once the Java class is =
statically instrumented, the .class (or .jar) file(s) are modified on =
disk to include all the instrumentation. Then you can launch your Java =
class normally (instead of launching in profiling mode). To learn more =
about static instrumentation, please see: =
http://help.eclipse.org/help32/index.jsp?topic=3D/org.eclips e.hyades.prob=
ekit.doc.user/topics/c_pk_app_static.htm=20

Navid Mehregani=20
nmehrega@ca.ibm.com
------=_NextPart_000_00A5_01C780DD.54F55340
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Navid,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks for your reply and your =
high-level=20
depiction.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My end goal is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1. User works on some JUnit Tests and =
annotates it=20
with methods which the user thinks will be called through this test =
(because=20
these methods could be culprints to let it fail)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. After saving (or something similar) =
my plugin=20
initiates the creation of a dynamic callgraph silently (with no user=20
interaction)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. Callgraph is created and stored =
somewhere where=20
the plugin can retrieve it</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4. User opens a dialog to see =
dynamically called=20
methods</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>5. Plugin uses the formerly stored =
callgraph to=20
show content</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>6. Plugin verifies annotated methods =
and gives some=20
advice to the user whether to change annotations (e.g. you said method x =
will by=20
called by this JUnit test but the callgraph discovered that it is not =
called.=20
This is a possible failure or your Annotation is too old)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could this be achieved =
somehow?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Alternatively i tried to go for the =
traceModel.=20
Traverse through the Objects and listing the invocations (invocated =
methods)=20
gives me the callgraph, too. My Problem is: How to get access to the =
_non_=20
persistent traceModel through my plugin. Is it through =
PDContentProvider? I=20
registered my Plugin as ProfileEventListener. On STOP_COLLECTING i&nbsp; =
stored=20
the URI from TRCAgentProxy.getAgent() to get acces to it later on. But =
the i get=20
a NullPointerException while restoring a ResourceSet from the =
URI.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thomas E.-E.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Navid_Mehregani" &lt;<A=20
href=3D"mailto:nmehrega@ca.ibm.com">nmehrega@ca.ibm.com</A>&gt; =
schrieb im=20
Newsbeitrag <A=20
=
href=3D"news:evonog$qug$1@build.eclipse.org">news:evonog$qug$1@build.ecli=
pse.org</A>...</DIV><BR><FONT=20
face=3Dsans-serif size=3D2>I'm not sure if I fully understand your =
question, it=20
would be helpful if you explain exactly what your end goal is. =
&nbsp;Please=20
see the following to understand the high-level overview of how all =
this=20
works:</FONT> <BR><BR><FONT face=3Dsans-serif size=3D2>It's not =
Probekit that=20
launches another JVM instance. &nbsp;This is generally done when you =
collect=20
any profiling data. &nbsp;The JVM is launched by the Agent Controller =
(or=20
Integrated Agent Controller). &nbsp;The Agent Controller has to run =
the Java=20
application in profiling mode in order to collect profiling data. =
&nbsp;In=20
order for Probekit to *dynamically* instrument a Java class, that Java =
class=20
has to be launched by the Agent Controller, Probekit then inserts its =
hooks=20
dynamically to instrument the Java class. &nbsp;</FONT> <BR><BR><FONT=20
face=3Dsans-serif size=3D2>You can also instrument a Java class =
*statically*, but=20
this is only practical for small Java applications. &nbsp;Once the =
Java class=20
is statically instrumented, the .class (or .jar) file(s) are modified =
on disk=20
to include all the instrumentation. &nbsp;Then you can launch your =
Java class=20
normally (instead of launching in profiling mode). &nbsp;To learn more =
about=20
static instrumentation, please see:=20
=
http://help.eclipse.org/help32/index.jsp?topic=3D/org.eclips e.hyades.prob=
ekit.doc.user/topics/c_pk_app_static.htm</FONT>=20
<BR><BR><FONT face=3Dsans-serif size=3D2>Navid Mehregani</FONT> =
<BR><FONT=20
face=3Dsans-serif =
size=3D2>nmehrega@ca.ibm.com</FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00A5_01C780DD.54F55340--
Previous Topic:Btm-Muse: what's the rationale for generating setter-methods for read-only properties?
Next Topic:Generating an executable test
Goto Forum:
  


Current Time: Fri Apr 19 01:17:12 GMT 2024

Powered by FUDForum. Page generated in 0.02106 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top