Mercurial > hg > release > icedtea6-1.5
changeset 573:a35860d13c18
* patches/icedtea-ports.patch: Added alpha, arm, ia64, mips, s390 and
s390x architectures.
* ports/jdk/src/solaris/bin/alpha/jvm.cfg,
ports/jdk/src/solaris/bin/arm/jvm.cfg,
ports/jdk/src/solaris/bin/ergo_alpha.c,
ports/jdk/src/solaris/bin/ergo_arm.c,
ports/jdk/src/solaris/bin/ergo_ia64.c,
ports/jdk/src/solaris/bin/ergo_mips.c,
ports/jdk/src/solaris/bin/ergo_s390.c,
ports/jdk/src/solaris/bin/mips/jvm.cfg,
ports/jdk/src/solaris/bin/s390/jvm.cfg,
ports/jdk/src/solaris/bin/s390x/jvm.cfg: New file.
author | Christian Thalinger <twisti@complang.tuwien.ac.at> |
---|---|
date | Wed, 23 Jan 2008 14:53:36 +0100 |
parents | 13c94ebd6af1 |
children | 194647c5b89a |
files | patches/icedtea-ports.patch ports/jdk/src/solaris/bin/alpha/jvm.cfg ports/jdk/src/solaris/bin/arm/jvm.cfg ports/jdk/src/solaris/bin/ergo_alpha.c ports/jdk/src/solaris/bin/ergo_arm.c ports/jdk/src/solaris/bin/ergo_ia64.c ports/jdk/src/solaris/bin/ergo_mips.c ports/jdk/src/solaris/bin/ergo_s390.c ports/jdk/src/solaris/bin/mips/jvm.cfg ports/jdk/src/solaris/bin/s390/jvm.cfg ports/jdk/src/solaris/bin/s390x/jvm.cfg |
diffstat | 11 files changed, 630 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/patches/icedtea-ports.patch Fri Jan 18 12:03:16 2008 -0500 +++ b/patches/icedtea-ports.patch Wed Jan 23 14:53:36 2008 +0100 @@ -362,15 +362,33 @@ JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm JAVALIB = -ljava $(JVMLIB) -diff -ru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2007-11-08 11:34:54.000000000 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2007-11-08 11:36:15.000000000 +0000 -@@ -74,13 +74,13 @@ - # sparc or sparcv9 - REQUIRED_CC_VER = 4.0 - REQUIRED_GCC_VER = 4.0.* +diff -r 37a05a11f281 make/common/shared/Compiler-gcc.gmk +--- a/jdk/make/common/shared/Compiler-gcc.gmk Sat Dec 01 00:00:00 2007 +0000 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Wed Jan 23 14:02:23 2008 +0100 +@@ -70,28 +70,51 @@ ifeq ($(PLATFORM), linux) + else + CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) + endif +- ifneq ("$(findstring sparc,$(ARCH))", "") +- # sparc or sparcv9 +- REQUIRED_CC_VER = 4.0 +- REQUIRED_GCC_VER = 4.0.* - else - ifeq ($(ARCH_DATA_MODEL), 32) ++ ifeq ($(ARCH), alpha) ++ # alpha ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), amd64) ++ # amd64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), arm) ++ # arm ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* + endif + ifeq ($(ARCH), i586) # i586 @@ -378,19 +396,35 @@ REQUIRED_GCC_VER = 3.2.1* REQUIRED_GCC_VER_INT = 3.2.1-7a - else -+ endif - ifeq ($(ARCH), amd64) - # amd64 - REQUIRED_CC_VER = 3.2 -@@ -91,7 +91,10 @@ +- ifeq ($(ARCH), amd64) +- # amd64 +- REQUIRED_CC_VER = 3.2 +- REQUIRED_GCC_VER = 3.2.* + endif + ifeq ($(ARCH), ia64) + # ia64 REQUIRED_CC_VER = 3.2 REQUIRED_GCC_VER = 2.9[56789].* endif -- endif ++ ifeq ($(ARCH), mips) ++ # mips ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* + endif + ifneq ("$(findstring ppc,$(ARCH))", "") + # ppc or ppc64 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring s390,$(ARCH))", "") ++ # s390 or s390x ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring sparc,$(ARCH))", "") ++ # sparc or sparcv9 ++ REQUIRED_CC_VER = 4.0 ++ REQUIRED_GCC_VER = 4.0.* endif # Option used to create a shared library SHARED_LIBRARY_FLAG = -shared -mimpure-text @@ -544,13 +578,37 @@ $(install-import-file) $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \ -diff -ru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2007-11-08 11:34:54.000000000 +0000 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2007-11-08 11:36:15.000000000 +0000 -@@ -71,6 +71,14 @@ - CPPFLAGS += -DX_ARCH=X_AMD64 - endif # ARCH amd64 +diff -r 37a05a11f281 make/javax/sound/SoundDefs.gmk +--- a/jdk/make/javax/sound/SoundDefs.gmk Sat Dec 01 00:00:00 2007 +0000 ++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk Wed Jan 23 14:39:17 2008 +0100 +@@ -55,9 +55,45 @@ ifeq ($(PLATFORM), solaris) + + endif # PLATFORM solaris ++ifeq ($(ARCH), alpha) ++ CPPFLAGS += -DX_ARCH=X_ALPHA ++endif # ARCH alpha ++ ++ifeq ($(ARCH), amd64) ++ CPPFLAGS += -DX_ARCH=X_AMD64 ++endif # ARCH amd64 ++ ++ifeq ($(ARCH), arm) ++ CPPFLAGS += -DX_ARCH=X_ARM ++endif # ARCH arm ++ + ifeq ($(ARCH), i586) + CPPFLAGS += -DX_ARCH=X_I586 + endif # ARCH i586 ++ ++ifeq ($(ARCH), ia64) ++ CPPFLAGS += -DX_ARCH=X_IA64 ++endif # ARCH ia64 ++ ++ifeq ($(ARCH), mips) ++ CPPFLAGS += -DX_ARCH=X_MIPS ++endif # ARCH mips ++ +ifeq ($(ARCH), ppc) + CPPFLAGS += -DX_ARCH=X_PPC +endif # ARCH ppc @@ -559,18 +617,51 @@ + CPPFLAGS += -DX_ARCH=X_PPC64 +endif # ARCH ppc64 + ++ifeq ($(ARCH), s390) ++ CPPFLAGS += -DX_ARCH=X_S390 ++endif # ARCH s390 ++ ++ifeq ($(ARCH), s390x) ++ CPPFLAGS += -DX_ARCH=X_S390X ++endif # ARCH s390x + + ifeq ($(ARCH), sparc) + CPPFLAGS += -DX_ARCH=X_SPARC +@@ -66,10 +102,6 @@ ifeq ($(ARCH), sparcv9) + ifeq ($(ARCH), sparcv9) + CPPFLAGS += -DX_ARCH=X_SPARCV9 + endif # ARCH sparcv9 +- +-ifeq ($(ARCH), amd64) +- CPPFLAGS += -DX_ARCH=X_AMD64 +-endif # ARCH amd64 + # files needed for MIDI i/o - MIDIFILES_c = \ -diff -ru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2007-11-08 11:34:54.000000000 +0000 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2007-11-08 11:36:15.000000000 +0000 -@@ -38,6 +38,8 @@ - #define X_SPARCV9 3 - #define X_IA64 4 - #define X_AMD64 5 -+#define X_PPC 6 -+#define X_PPC64 7 +diff -r 37a05a11f281 src/share/native/com/sun/media/sound/SoundDefs.h +--- a/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Sat Dec 01 00:00:00 2007 +0000 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h Wed Jan 23 14:39:17 2008 +0100 +@@ -33,11 +33,18 @@ + #define X_LINUX 3 + + // types for X_ARCH +-#define X_I586 1 +-#define X_SPARC 2 +-#define X_SPARCV9 3 +-#define X_IA64 4 +-#define X_AMD64 5 ++#define X_ALPHA 1 ++#define X_AMD64 2 ++#define X_ARM 3 ++#define X_I586 4 ++#define X_IA64 5 ++#define X_MIPS 6 ++#define X_PPC 7 ++#define X_PPC64 8 ++#define X_S390 9 ++#define X_S390X 10 ++#define X_SPARC 11 ++#define X_SPARCV9 12 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/alpha/jvm.cfg Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,44 @@ +# +# @(#)jvm.cfg 1.7 07/05/05 +# +# +# Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-hotspot ERROR +-classic WARN +-server IGNORE +-native ERROR +-green ERROR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/arm/jvm.cfg Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,44 @@ +# +# @(#)jvm.cfg 1.7 07/05/05 +# +# +# Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-hotspot ERROR +-classic WARN +-server IGNORE +-native ERROR +-green ERROR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/ergo_alpha.c Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +#include "ergo.h" + + +/* Methods for solaris-sparc and linux-sparc: these are easy. */ + +/* Ask the OS how many processors there are. */ +static unsigned long +physical_processors(void) { + const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + + JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors); + return sys_processors; +} + +/* The sparc version of the "server-class" predicate. */ +jboolean +ServerClassMachineImpl(void) { + jboolean result = JNI_FALSE; + /* How big is a server class machine? */ + const unsigned long server_processors = 2UL; + const uint64_t server_memory = 2UL * GB; + const uint64_t actual_memory = physical_memory(); + + /* Is this a server class machine? */ + if (actual_memory >= server_memory) { + const unsigned long actual_processors = physical_processors(); + if (actual_processors >= server_processors) { + result = JNI_TRUE; + } + } + JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/ergo_arm.c Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +#include "ergo.h" + + +/* Methods for solaris-sparc and linux-sparc: these are easy. */ + +/* Ask the OS how many processors there are. */ +static unsigned long +physical_processors(void) { + const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + + JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors); + return sys_processors; +} + +/* The sparc version of the "server-class" predicate. */ +jboolean +ServerClassMachineImpl(void) { + jboolean result = JNI_FALSE; + /* How big is a server class machine? */ + const unsigned long server_processors = 2UL; + const uint64_t server_memory = 2UL * GB; + const uint64_t actual_memory = physical_memory(); + + /* Is this a server class machine? */ + if (actual_memory >= server_memory) { + const unsigned long actual_processors = physical_processors(); + if (actual_processors >= server_processors) { + result = JNI_TRUE; + } + } + JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/ergo_ia64.c Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +#include "ergo.h" + + +/* Methods for solaris-sparc and linux-sparc: these are easy. */ + +/* Ask the OS how many processors there are. */ +static unsigned long +physical_processors(void) { + const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + + JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors); + return sys_processors; +} + +/* The sparc version of the "server-class" predicate. */ +jboolean +ServerClassMachineImpl(void) { + jboolean result = JNI_FALSE; + /* How big is a server class machine? */ + const unsigned long server_processors = 2UL; + const uint64_t server_memory = 2UL * GB; + const uint64_t actual_memory = physical_memory(); + + /* Is this a server class machine? */ + if (actual_memory >= server_memory) { + const unsigned long actual_processors = physical_processors(); + if (actual_processors >= server_processors) { + result = JNI_TRUE; + } + } + JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/ergo_mips.c Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +#include "ergo.h" + + +/* Methods for solaris-sparc and linux-sparc: these are easy. */ + +/* Ask the OS how many processors there are. */ +static unsigned long +physical_processors(void) { + const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + + JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors); + return sys_processors; +} + +/* The sparc version of the "server-class" predicate. */ +jboolean +ServerClassMachineImpl(void) { + jboolean result = JNI_FALSE; + /* How big is a server class machine? */ + const unsigned long server_processors = 2UL; + const uint64_t server_memory = 2UL * GB; + const uint64_t actual_memory = physical_memory(); + + /* Is this a server class machine? */ + if (actual_memory >= server_memory) { + const unsigned long actual_processors = physical_processors(); + if (actual_processors >= server_processors) { + result = JNI_TRUE; + } + } + JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/ergo_s390.c Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,58 @@ +/* + * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +#include "ergo.h" + + +/* Methods for solaris-sparc and linux-sparc: these are easy. */ + +/* Ask the OS how many processors there are. */ +static unsigned long +physical_processors(void) { + const unsigned long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + + JLI_TraceLauncher("sysconf(_SC_NPROCESSORS_CONF): %lu\n", sys_processors); + return sys_processors; +} + +/* The sparc version of the "server-class" predicate. */ +jboolean +ServerClassMachineImpl(void) { + jboolean result = JNI_FALSE; + /* How big is a server class machine? */ + const unsigned long server_processors = 2UL; + const uint64_t server_memory = 2UL * GB; + const uint64_t actual_memory = physical_memory(); + + /* Is this a server class machine? */ + if (actual_memory >= server_memory) { + const unsigned long actual_processors = physical_processors(); + if (actual_processors >= server_processors) { + result = JNI_TRUE; + } + } + JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); + return result; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/mips/jvm.cfg Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,44 @@ +# +# @(#)jvm.cfg 1.7 07/05/05 +# +# +# Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-hotspot ERROR +-classic WARN +-server IGNORE +-native ERROR +-green ERROR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/s390/jvm.cfg Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,44 @@ +# +# @(#)jvm.cfg 1.7 07/05/05 +# +# +# Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-hotspot ERROR +-classic WARN +-server IGNORE +-native ERROR +-green ERROR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/jdk/src/solaris/bin/s390x/jvm.cfg Wed Jan 23 14:53:36 2008 +0100 @@ -0,0 +1,44 @@ +# +# @(#)jvm.cfg 1.7 07/05/05 +# +# +# Copyright 2002-2003 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-hotspot ERROR +-classic WARN +-server IGNORE +-native ERROR +-green ERROR