Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332656

Summary: Provide 'agentlet' extension mechanism
Product: z_Archived Reporter: Mike Reid <mikereid>
Component: TPTPAssignee: Mike Reid <mikereid>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P3 CC: jcayne, jgwest, pklicnik
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch
none
Build fix
none
Critical fix to original patch
none
Patch to windows ACCollector makefiles
none
Patch for sending response none

Description Mike Reid CLA 2010-12-15 11:30:17 EST
Introduce an extension mechanism whereby implementers can plug agents written using the java.lang.instrumentation interface to accept and respond to messages from a TPTP workbench. This allows a simple way for custom "agentlets" to extend the TPTP JVMTI profiler.
Comment 1 Mike Reid CLA 2010-12-15 11:33:59 EST
Created attachment 185240 [details]
Patch

Attached patch that implements this.
Comment 2 Mike Reid CLA 2010-12-15 11:46:08 EST
Requesting project lead approval for checkin.
Comment 3 Kathy Chan CLA 2010-12-15 11:48:32 EST
Mike indicated that Jonathan had reviewed this yesterday already.

As this extension point is only called when existing logic is exhausted in
handling the message, it should have no impact to existing JVMTI profiler code.
Approving for TPTP 4.7.2.

Mike, please check it in.
Comment 4 Mike Reid CLA 2010-12-15 11:51:41 EST
Patch checked into HEAD, resolving.
Comment 5 Mike Reid CLA 2010-12-15 13:30:42 EST
Created attachment 185252 [details]
Build fix

Attaching a secondary patch that updates the ACCollector Makefile with a small build fix; when building against Sun JVM's, it is not sufficient add $(JAVA_HOME)/include to the include path, a platform specific subdirectory needs to be added as well, e.g.:

 $(JAVA_HOME)/include/linux
 
Build patch has been checked into HEAD.
Comment 6 Mike Reid CLA 2010-12-15 17:27:10 EST
Re-opening. Unfortunately I overlooked handling the case where an unknown message is received and there is no agentlet advertising itself as a handler. Currently in that case the profiler will crash.
Comment 7 Mike Reid CLA 2010-12-15 17:28:36 EST
Created attachment 185276 [details]
Critical fix to original patch

I have attached an incremental patch which correctly handles this case.
Comment 8 Mike Reid CLA 2010-12-15 17:29:49 EST
Fix checked into HEAD.
Comment 9 Mike Reid CLA 2010-12-22 15:09:37 EST
Created attachment 185734 [details]
Patch to windows ACCollector makefiles

There is a build problem due to not having updated the ACCollector .mak files for Windows. Attached patch with the necessary changes.
Comment 10 Mike Reid CLA 2010-12-22 15:21:46 EST
Fix checked into head.
Comment 11 Joel Cayne CLA 2010-12-29 13:43:14 EST
Created attachment 185887 [details]
Patch for sending response
Comment 12 Paul Klicnik CLA 2010-12-29 13:46:42 EST
Patch looks good
Comment 13 Joel Cayne CLA 2010-12-29 13:59:48 EST
Patch for the response checked into HEAD.
Comment 14 Kathy Chan CLA 2011-02-11 13:45:50 EST
This defect had been resolved as FIXED for more than 1 month.  Please verify with the latest TPTP 4.7.2 driver.  If this defect is still left unverified by February 25, we'll close it on the originator's behalf.

TPTP 4.7.2 driver can be downloaded from:

http://www.eclipse.org/tptp/home/downloads/?ver=4.7.2
Comment 15 Mike Reid CLA 2011-04-04 11:07:23 EDT
Closing.