Pushed to jdk9 dev.

On Mon, May 18, 2015 at 1:13 AM, Staffan Larsen <staffan.lar...@oracle.com>
wrote:

> 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
>
>
> On 16 maj 2015, at 01:12, Jeremy Manson <jeremyman...@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/
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8080538
>
> Jeremy
>
>
>

Reply via email to