RFR: 8080538 hprof does not work well with multiple agents on non-Solaris platforms
Staffan Larsen
staffan.larsen at oracle.com
Mon May 18 08:13:03 UTC 2015
This looks good, but given that hprof is going away [1] I’m not sure it’s worth the time to fix it. Anyway, I’m ok with the fix.
Thanks,
/Staffan
[1] https://bugs.openjdk.java.net/browse/JDK-8046661 <https://bugs.openjdk.java.net/browse/JDK-8046661>
> On 16 maj 2015, at 01:12, Jeremy Manson <jeremymanson at google.com> wrote:
>
> Looking for a sponsor...
>
> The issue: hprof finds its location by looking for the first library containing an Agent_OnLoad symbol. This may not be libhprof.so. There is workaround logic for this on Solaris, but not on other platforms.
>
> Note the comment in src/jdk.hprof.agent/unix/native/libhprof/hprof_md.c:296:
>
> /* Just using &Agent_OnLoad will get the first external symbol with
> * this name in the first .so, which may not be libhprof.so.
> * On Solaris we can actually ask for the address of our Agent_OnLoad.
> */
> addr = dlsym(RTLD_SELF, "Agent_OnLoad");
> /* Just in case the above didn't work (missing linker patch?). */
> if ( addr == NULL ) {
> addr = (void*)&Agent_OnLoad;
> }
>
> Instead of looking for Agent_OnLoad as a symbol, I suggest we just look for the symbol of the current method.
>
> Patch:
> http://cr.openjdk.java.net/~jmanson/8080538/webrev.00/ <http://cr.openjdk.java.net/~jmanson/8080538/webrev.00/>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8080538 <https://bugs.openjdk.java.net/browse/JDK-8080538>
>
> Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20150518/4f7ba391/attachment.html>
More information about the serviceability-dev
mailing list