Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » How to get "throw" or "catch" event
How to get "throw" or "catch" event [message #138938] Mon, 08 December 2008 05:29 Go to next message
Patrick Ouyang is currently offline Patrick Ouyang
Messages: 10
Registered: July 2009
Junior Member
Hi,
I have seen "throw" and "catch" events in the "TPTP data collection Event
Specification for the Java Profiler" document. So I wrote an example which
threw a custom exception and then caught it. Then I ran it with piAgent in
standalone mode and no filters applied, and got a "trace.trcxml " file.
But there were no "throw" or "catch" elements appeared in the file.

How to get them using piAgent? Does the based-JVMTI profiler,JPIAgent,
support the same?
Re: How to get "throw" or "catch" event [message #139045 is a reply to message #138938] Wed, 10 December 2008 11:37 Go to previous messageGo to next message
Jonathan West is currently offline Jonathan West
Messages: 49
Registered: July 2009
Member
Hi Patrick, the 'throw' and 'catch' exception events are not supported by
the present version of the JVMPI profiling agent, however, there is some
legacy code that suggests it might once have been supported, however, I
have no further details than this. The JVMTI profiling agent, OTOH, does
not generate any events for exceptions, and AFAIK has never supported this
feature.
Re: How to get "throw" or "catch" event [message #139067 is a reply to message #138938] Thu, 11 December 2008 03:35 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Patrick,

As far as I know, none of the TPTP profilers (JVMPI and JVMTI based)
currently support these events.

However, you may want to take a look at Probekit (look-it up in the TPTP
online help). Using Probekit, you can write a "catch probe" that fires
when an exception is caught.

Another option is to use Aspects Oriented Programming tools for catching
these events. I am quite sure that the Eclipse AspectJ plugin can help...

My 2 cents.

Regards,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Re: How to get "throw" or "catch" event [message #139210 is a reply to message #139067] Wed, 24 December 2008 04:56 Go to previous messageGo to next message
Patrick Ouyang is currently offline Patrick Ouyang
Messages: 10
Registered: July 2009
Junior Member
Thanks for your suggestions. It's helpful.
Re: How to get "throw" or "catch" event [message #139220 is a reply to message #139045] Wed, 24 December 2008 04:59 Go to previous message
Patrick Ouyang is currently offline Patrick Ouyang
Messages: 10
Registered: July 2009
Junior Member
I see. Thanks a lot.
Previous Topic:Could not find agent library when I import the platform.ac.win_ia32
Next Topic:ant workspace execution directory
Goto Forum:
  


Current Time: Sat Aug 23 07:27:19 EDT 2014

Powered by FUDForum. Page generated in 0.03763 seconds