Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » ProbeKit filtering issue and design concern
ProbeKit filtering issue and design concern [message #80005] Mon, 07 August 2006 19:12 Go to next message
Eclipse UserFriend
Originally posted by: mjayanthi.gmail.com

Hi

I am trying to use the probekit to instrument part of my java application
and am running into an issue related to the target filter in the probe.
My application has 10 packages say for example pkg1, pkg2 ..etc . I want to
do System.out on the method exit. Here is what my target filter looks

pkg1 classABC methodFoo (Ljava/lang/Object)O
pkg2* * * * exclude
pkg3* * * * exclude
.....
.....

pkg10* * * * exclude


when run the application, the System.out is being executed for all the
packages currently used by the java application.

Note:
The documentation says that by default everything is included and we
need to specify the packages we are not interested with exclude.

My opinion is that since probes are meant to be used as custom profilers,
the default may have to be exclude so that users can include whichever
packages/classes/methods they want to instrument.

However, if that is the design, can some point me to a solution on how to
just instrument just one method in one class in a specific package.

Thanks in advance
Murthy
Re: ProbeKit filtering issue and design concern [message #80261 is a reply to message #80005] Wed, 09 August 2006 14:20 Go to previous message
Eclipse UserFriend
Originally posted by: nmehrega.ca.ibm.com

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

Hi Murthy,

It's easy to exclude everything and include only the specific
classes/methods you're interested in. For example, the following filter
set will include only "methodA" of "MyClass"

Type Package Class Method
Signature
INCLUDE * MyClass methodA *
EXCLUDE * * * *

The first filter includes only "methodA" of "MyClass" and the second
filter excludes everything.

Note that if you're using dynamic instrumentation you also have to take
into account the filters that are set in your profile launch
configuration. In fact, with dynamic instrumentation, you shouldn't even
need to use the target entry of your probe. Click on the profile button
-> select "Profile..." -> Select your launch configuration -> Click on the
'Monitor' tab -> Double click on 'Java Profiling' -> Set your filters
here. For more information about probekit filterting, please refer to
sections 2.0 and 3.2 of this document:
http://www.eclipse.org/tptp/platform/documents/probekit/prob ekit.html.

>My opinion is that since probes are meant to be used as custom profilers,
>the default may have to be exclude so that users can include whichever
>packages/classes/methods they want to instrument.

Typically users don't modify their filters when they first instrument
their application. If we exclude everything by default, users will be
confused when their probe doesn't instrument anything. As I mention
above, it's really simple to specify a filter set that will excludes
everything but the classes/methods you're interested in.

Navid Mehregani
--=_alternative 004ED5CD852571C5_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Murthy,</font>
<br>
<br><font size=2 face="sans-serif">It's easy to exclude everything and
include only the specific classes/methods you're interested in. &nbsp;For
example, the following filter set will include only &quot;methodA&quot;
of &quot;MyClass&quot;</font>
<br>
<br><font size=2 face="sans-serif">Type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Package &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Class &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Method &nbsp; &nbsp;
&nbsp;Signature</font>
<br><font size=2 face="sans-serif">INCLUDE &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyClass &nbsp; &nbsp; &nbsp;methodA
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*</font>
<br><font size=2 face="sans-serif">EXCLUDE &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *</font>
<br>
<br><font size=2 face="sans-serif">The first filter includes only &quot;methodA&quot;
of &quot;MyClass&quot; and the second filter excludes everything.</font>
<br>
<br><font size=2 face="sans-serif">Note that if you're using dynamic instrumentation
you also have to take into account the filters that are set in your profile
launch configuration. &nbsp;In fact, with dynamic instrumentation, you
shouldn't even need to use the target entry of your probe. &nbsp;Click
on the profile button -&gt; select &quot;Profile...&quot; -&gt; Select
your launch configuration -&gt; Click on the 'Monitor' tab -&gt; Double
click on 'Java Profiling' -&gt; Set your filters here. &nbsp;For more information
about probekit filterting, please refer to sections 2.0 and 3.2 of this
document: http://www.eclipse.org/tptp/platform/documents/probekit/prob ekit.html.</font>
<br>
<br><tt><font size=2>&gt;My opinion is that since probes are meant to be
used as custom profilers,<br>
&gt;the default may have to be exclude so that users can include whichever<br>
&gt;packages/classes/methods they want to instrument.</font></tt>
<br>
<br><font size=2 face="sans-serif">Typically users don't modify their filters
when they first instrument their application. &nbsp;If we exclude everything
by default, users will be confused when their probe doesn't instrument
anything. &nbsp;As I mention above, it's really simple to specify a filter
set that will excludes everything but the classes/methods you're interested
in.</font>
<br>
<br><font size=2 face="sans-serif">Navid Mehregani</font>
--=_alternative 004ED5CD852571C5_=--
Previous Topic:open perspective problem in tptp junit plguin test
Next Topic:Eclipse 3.2 and Fedora Core 5
Goto Forum:
  


Current Time: Fri Apr 26 03:50:45 GMT 2024

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

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

Back to the top