[RFR]: 8186578: Zero fails to build on linux-sparc due to sparc-specific code

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Wed Aug 23 12:23:48 UTC 2017


Hi!

Currently, it's not possible to build Zero on linux-sparc as there are two
instances in the code where sparc-specific code being included or linked
against which is not available in the Zero build builds.

The first instance is in src/share/vm/compiler/oopMap.cpp:

  #ifdef SPARC
  #include "vmreg_sparc.inline.hpp"
  #endif

As it turns out, the header is not actually required in oooMap.cpp for
native builds. None of the symbols defined in there are used in oooMap.cpp
and my test builds showed that both on linux-sparc (native) as well
as solaris-sparc the header doesn't seem to be necessary. However, while
I was able to build on linux-sparc without any problems, I was unable
to build on solaris-sparc - with or without the header removed. So, this
should be reviewed by a OpenJDK Solaris developer just to be sure.

The second instance is in src/share/vm/gc/shared/memset_with_concurrent_readers.hpp:

#ifdef SPARC

// SPARC requires special handling.  See SPARC-specific definition.

#else
// All others just use memset.

inline void memset_with_concurrent_readers(void* to, int value, size_t size) {
   ::memset(to, value, size);
}

#endif // End of target dispatch.

The definition here comes from ./src/cpu/sparc/vm/memset_with_concurrent_readers_sparc.cpp
when compiling on sparc. However, when building Zero, this particular source
is not built and hence memset_with_concurrent_readers is not available when
building Zero on sparc. In this case, I just decided not to use the
sparc version when ZERO is defined.

Webrev for the suggested changes in [1].

Adrian

> [1] http://cr.openjdk.java.net/~glaubitz/8186578/webrev.00/

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


More information about the hotspot-dev mailing list