small webrev to avoid loading the hsail okra library twice

Deneau, Tom tom.deneau at amd.com
Fri Apr 11 18:18:21 UTC 2014


Doug --

After submitting this, I was wondering whether os::dll_load itself should check whether a library is already loaded (if a platform supports such a check), and if it is already loaded, just return the handle to that already loaded library?  Or are there legimitate cases where one would actually want to load a shared library more than once?

-- Tom

> -----Original Message-----
> From: Doug Simon [mailto:doug.simon at oracle.com]
> Sent: Friday, April 11, 2014 11:08 AM
> To: Deneau, Tom
> Cc: graal-dev at openjdk.java.net
> Subject: Re: small webrev to avoid loading the hsail okra library twice
> 
> I'll integrated this.
> 
> On Apr 10, 2014, at 11:11 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
> 
> > I posted a small webrev whose purpose is to avoid loading the hsail
> okra shared library twice.  It turns out that some features of the hsail
> simulator okra flavor (in particular, gdb symbols for the simulated
> HSAIL code and the hsail registers) do not work properly when the
> library is loaded twice.
> >
> > I didn't know if there was an os-independent way to check that a
> library was already loaded, so I wrapped I in #ifdef LINUX.  But for now
> this logic should only be required on linux anyway.
> >
> > http://cr.openjdk.java.net/~tdeneau/graal-webrevs/webrev-hsail-avoid-
> double-dll-load/
> >
> > -- Tom



More information about the graal-dev mailing list