Why is fork1() exported from hotspot?

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Wed Oct 21 08:57:34 UTC 2015


Hi,

the comment was added in 2011 by 
"6588413: Use -fvisibility=hidden for gcc compiles"
http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/d70fe6ab4436
while the export & function already existed.

Unfortunately, this change doesn't unveil who is using the symbol.

Best regards,
  Goetz.

> -----Original Message-----
> From: hotspot-runtime-dev [mailto:hotspot-runtime-dev-
> bounces at openjdk.java.net] On Behalf Of Christian Thalinger
> Sent: Mittwoch, 21. Oktober 2015 01:56
> To: Thomas Stüfe
> Cc: hotspot-runtime-dev at openjdk.java.net
> Subject: Re: Why is fork1() exported from hotspot?
> 
> 
> > On Oct 19, 2015, at 9:14 PM, Thomas Stüfe <thomas.stuefe at gmail.com>
> wrote:
> >
> > Hi all,
> >
> > on Linux we define and export "fork1()" - a stub for fork() - and "fork1"
> > also appears in linker mapfiles for bsd and AIX. The latter, I am sure, is
> > just a copy-paste-effect.
> >
> > Why do we need to define and export fork1() for non-solaris platforms?
> We
> > only ever use it on Solaris.
> >
> > The comment in os_linux.cpp is not really enlightening:
> > "// Something to do with the numa-aware allocator needs these symbols”
> 
> Can you see what changeset added this comment or was it before Mercurial?
> 
> >
> > Does anyone know why this is needed?
> >
> > Regards, Thomas



More information about the hotspot-runtime-dev mailing list