Why is fork1() exported from hotspot? (original) (raw)

Thomas Stüfe thomas.stuefe at gmail.com
Wed Oct 21 09:52:24 UTC 2015


Hi,

thanks for looking this up!

I think the code just shuffled around the pre-existing fork1() definition and added an JNIEXPORT.

But in the older version, there is a comment about green threads in the JDK:

-/** - * NOTE: the following code is to keep the green threads code - * in the libjava.so happy. Once the green threads is removed, - * these code will no longer be needed. - */ -.... -int -fork1() { - return fork(); -}

I do not think JDK uses green threads anymore.

Kind Regards, Thomas

On Wed, Oct 21, 2015 at 10:57 AM, Lindenmaier, Goetz < goetz.lindenmaier at sap.com> wrote:

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 oslinux.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