Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332656 - Provide 'agentlet' extension mechanism
Summary: Provide 'agentlet' extension mechanism
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mike Reid CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 11:30 EST by Mike Reid CLA
Modified: 2016-05-05 11:19 EDT (History)
3 users (show)

See Also:


Attachments
Patch (11.65 KB, patch)
2010-12-15 11:33 EST, Mike Reid CLA
no flags Details | Diff
Build fix (876 bytes, patch)
2010-12-15 13:30 EST, Mike Reid CLA
no flags Details | Diff
Critical fix to original patch (904 bytes, patch)
2010-12-15 17:28 EST, Mike Reid CLA
no flags Details | Diff
Patch to windows ACCollector makefiles (4.72 KB, patch)
2010-12-22 15:09 EST, Mike Reid CLA
no flags Details | Diff
Patch for sending response (859 bytes, patch)
2010-12-29 13:43 EST, Joel Cayne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.