Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317444 - [AIX] Remove dependency on JAVA_PROFILER_HOME
Summary: [AIX] Remove dependency on JAVA_PROFILER_HOME
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC AIX Motif
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Mike Reid CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 09:57 EDT by Mike Reid CLA
Modified: 2016-05-05 10:58 EDT (History)
2 users (show)

See Also:


Attachments
First shot at a patch (11.75 KB, patch)
2010-06-24 10:03 EDT, Mike Reid CLA
no flags Details | Diff
Revised patch with small logic fixes (11.77 KB, patch)
2010-06-28 10:26 EDT, Mike Reid CLA
no flags Details | Diff
Another respin with incorporated comments (15.85 KB, patch)
2010-07-08 13:17 EDT, Mike Reid CLA
no flags Details | Diff
Patching containg all -agentpath changes for AIX, zOS and Solaris (34.07 KB, patch)
2010-07-23 17:05 EDT, Mike Reid CLA
no flags Details | Diff
Patch containing all -agentpath changes for AIX, zOS and Solaris (35.84 KB, patch)
2010-07-27 11:14 EDT, Mike Reid 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-06-21 09:57:36 EDT
This bug is to port the work of bug 241984 to AIX. This will allow the AIX platform to launch the Java profiler using the -agentpath switch; absolving the need to configure environment variables.
Comment 1 Mike Reid CLA 2010-06-24 10:03:17 EDT
Created attachment 172615 [details]
First shot at a patch

Attaching a first go at a patch which implements this. Minimally tested on AIX 5.3 64-bit.

Since AIX doesn't have anything equivalent to Linux's -rpath $ORIGIN specifier for its rpath equivalent (-blibpath), the AIX implementation needs to manually load libMartiniOSA to get at GetEnvironmentVar and CreateLibraryLoader entry points. Once these have been found the existing logic already works.

The only other addition is that the implementation of ILibraryLoader is augmented to build up the LIBPATH env var as needed and calls loadAndInit before dlopen to ensure the TPTP/Martini lib paths take precedence over system defaults.

Comments welcome.
Comment 2 Mike Reid CLA 2010-06-28 10:26:11 EDT
Created attachment 172909 [details]
Revised patch with small logic fixes

Fix a small logic error where the first call to GetEnvironment did not have enough memory, the LIBPATH environment is not updated.
Comment 3 Mike Reid CLA 2010-07-08 13:17:12 EDT
Created attachment 173794 [details]
Another respin with incorporated comments

Attaching another (hopefully final) patch. Two basic changes:

- Introduce HAVE_RPATH preprocessor macro
- Refactor BootstrapMartiniOSA to be used by Windows and AIX (and in the future any OSes that don't have -rpath $ORIGIN support)
Comment 4 Mike Reid CLA 2010-07-08 14:50:33 EDT
Patch checked into HEAD.
Comment 5 Mike Reid CLA 2010-07-23 17:05:53 EDT
Created attachment 175108 [details]
Patching containg all -agentpath changes for AIX, zOS and Solaris

Attaching a patch which contains all changes for the -agentpath support for platforms AIX, zOS and Solaris. 

This effectively obsoletes the patches attached to 317863, 319616 and 320260 (as well as 317444).

The purpose here is to provide an easier package to get 4.7.0 + agentpath rather than having to wade through a mess of CVS revisions.
Comment 6 Mike Reid CLA 2010-07-27 11:14:20 EDT
Created attachment 175325 [details]
Patch containing all -agentpath changes for AIX, zOS and Solaris

Attaching new version of the all-inclusive patch. The prior patch had some formatting issue preventing it from applying cleanly.
Comment 7 Mike Reid CLA 2010-07-27 11:55:36 EDT
Just a note on latest attachment #175235 [details] vs. the prior attachment #175108 [details]. There is no difference in code change between the two; the only difference is that #175235 was generated using Eclipse team sync, whereas #175108 was generated using 'cvs rdiff' command.

The build process had trouble with the format of #175108 hence the need for the version generated by Eclipse.
Comment 8 Kathy Chan CLA 2011-02-11 13:45:52 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 9 Mike Reid CLA 2011-04-04 10:54:38 EDT
Closing.