summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-08-27 19:03:59 +0000
committerjoerg <joerg@pkgsrc.org>2015-08-27 19:03:59 +0000
commitb5ffa4edfc75b977fe5f1b80b8d2a71866b8e53c (patch)
treea9d3203593e3110e5182283dc9f3c4a0d3826418 /lang
parentf33a7505333672f7841c76fe45f334dc81c87928 (diff)
downloadpkgsrc-b5ffa4edfc75b977fe5f1b80b8d2a71866b8e53c.tar.gz
Scale down the metaspace reservation for compressed class pointers.
This allows the JVM to work properly in a 2GB VA limit. Bump revision.
Diffstat (limited to 'lang')
-rw-r--r--lang/openjdk8/Makefile3
-rw-r--r--lang/openjdk8/distinfo3
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_share_vm_runtime_arguments.cpp23
3 files changed, 27 insertions, 2 deletions
diff --git a/lang/openjdk8/Makefile b/lang/openjdk8/Makefile
index e43648fd97e..ce8ec447f2f 100644
--- a/lang/openjdk8/Makefile
+++ b/lang/openjdk8/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2015/08/09 17:29:52 ryoon Exp $
+# $NetBSD: Makefile,v 1.20 2015/08/27 19:03:59 joerg Exp $
DISTNAME= openjdk-1.8.51-20150806
PKGNAME= openjdk8-1.8.51
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_LOCAL:=openjdk7/}
EXTRACT_SUFX= .tar.xz
diff --git a/lang/openjdk8/distinfo b/lang/openjdk8/distinfo
index d981d5a5242..cb4bae2a6ed 100644
--- a/lang/openjdk8/distinfo
+++ b/lang/openjdk8/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.24 2015/08/09 17:29:52 ryoon Exp $
+$NetBSD: distinfo,v 1.25 2015/08/27 19:03:59 joerg Exp $
SHA1 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 7408f52d3bbe35c2b14bbd3215cbf60f1335d334
RMD160 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 24f1577b5fc86d137f070aedb4610c8c89e45815
@@ -84,6 +84,7 @@ SHA1 (patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp) = 589bf0707023b9f
SHA1 (patch-hotspot_src_share_vm_ci_ciTypeFlow.cpp) = 2d827ade6fcf0ba08fcd0390472cda17772bc0c5
SHA1 (patch-hotspot_src_share_vm_interpreter_interpreterRuntime.cpp) = d2eaaae414810ab460ced512fdfc07385d60f4b8
SHA1 (patch-hotspot_src_share_vm_opto_node.cpp) = aacb4e03f62f1a6f9b38de39a966c318b70b1293
+SHA1 (patch-hotspot_src_share_vm_runtime_arguments.cpp) = 80265396c62de95b0937d770c1dba0e8a53daa80
SHA1 (patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp) = f35b8c1a1841f1239aa25d58d0b8749bb7b29ad2
SHA1 (patch-hotspot_src_share_vm_utilities_hashtable.cpp) = 83b90d951ce3aa9e913a36d792ac7376fb3d8bc7
SHA1 (patch-jdk_make_CompileDemos.gmk) = 4d5e2e9b0e35e373e6246408c775c25094b6f1c7
diff --git a/lang/openjdk8/patches/patch-hotspot_src_share_vm_runtime_arguments.cpp b/lang/openjdk8/patches/patch-hotspot_src_share_vm_runtime_arguments.cpp
new file mode 100644
index 00000000000..128e1e1c6d8
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_share_vm_runtime_arguments.cpp
@@ -0,0 +1,23 @@
+$NetBSD: patch-hotspot_src_share_vm_runtime_arguments.cpp,v 1.1 2015/08/27 19:03:59 joerg Exp $
+
+On 64bit systems, the JVM by default reserves 1GB VA to mangle class
+pointers into a 32bit representation. When the available memory is less
+than 16GB, e.g. due to process limits, scale this down. Even unused
+pages waste system resources and the default limit can stop the JVM
+from starting with ulimit -v 2G.
+
+--- hotspot/src/share/vm/runtime/arguments.cpp.orig 2015-08-26 15:02:34.000000000 +0000
++++ hotspot/src/share/vm/runtime/arguments.cpp
+@@ -1808,6 +1808,12 @@ void Arguments::set_heap_size() {
+ FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max);
+ }
+
++ if (FLAG_IS_DEFAULT(CompressedClassSpaceSize)) {
++ julong reasonable_max = phys_mem / 16;
++ reasonable_max = MIN2(reasonable_max, (julong)CompressedClassSpaceSize);
++ FLAG_SET_ERGO(uintx, CompressedClassSpaceSize, (uintx)reasonable_max);
++ }
++
+ // If the minimum or initial heap_size have not been set or requested to be set
+ // ergonomically, set them accordingly.
+ if (InitialHeapSize == 0 || min_heap_size() == 0) {