--- a/hotspot/src/os/aix/vm/os_aix.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -971,34 +971,32 @@
guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???");
// calculate stack size if it's not specified by caller
- if (os::Aix::supports_variable_stack_size()) {
- if (stack_size == 0) {
- stack_size = os::Aix::default_stack_size(thr_type);
-
- switch (thr_type) {
- case os::java_thread:
- // Java threads use ThreadStackSize whose default value can be changed with the flag -Xss.
- assert(JavaThread::stack_size_at_create() > 0, "this should be set");
- stack_size = JavaThread::stack_size_at_create();
+ if (stack_size == 0) {
+ stack_size = os::Aix::default_stack_size(thr_type);
+
+ switch (thr_type) {
+ case os::java_thread:
+ // Java threads use ThreadStackSize whose default value can be changed with the flag -Xss.
+ assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+ stack_size = JavaThread::stack_size_at_create();
+ break;
+ case os::compiler_thread:
+ if (CompilerThreadStackSize > 0) {
+ stack_size = (size_t)(CompilerThreadStackSize * K);
break;
- case os::compiler_thread:
- if (CompilerThreadStackSize > 0) {
- stack_size = (size_t)(CompilerThreadStackSize * K);
- break;
- } // else fall through:
- // use VMThreadStackSize if CompilerThreadStackSize is not defined
- case os::vm_thread:
- case os::pgc_thread:
- case os::cgc_thread:
- case os::watcher_thread:
- if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
- break;
- }
+ } // else fall through:
+ // use VMThreadStackSize if CompilerThreadStackSize is not defined
+ case os::vm_thread:
+ case os::pgc_thread:
+ case os::cgc_thread:
+ case os::watcher_thread:
+ if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+ break;
}
-
- stack_size = MAX2(stack_size, os::Aix::min_stack_allowed);
- pthread_attr_setstacksize(&attr, stack_size);
- } //else let thread_create() pick the default value (96 K on AIX)
+ }
+
+ stack_size = MAX2(stack_size, os::Aix::min_stack_allowed);
+ pthread_attr_setstacksize(&attr, stack_size);
pthread_t tid;
int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread);
--- a/hotspot/src/os/aix/vm/os_aix.hpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.hpp Wed Aug 05 05:28:04 2015 +0200
@@ -131,8 +131,6 @@
static void initialize_libo4();
static void initialize_libperfstat();
- static bool supports_variable_stack_size();
-
public:
static void init_thread_fpu_state();
static pthread_t main_thread(void) { return _main_thread; }
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -739,40 +739,35 @@
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- // stack size
- if (os::Bsd::supports_variable_stack_size()) {
- // calculate stack size if it's not specified by caller
- if (stack_size == 0) {
- stack_size = os::Bsd::default_stack_size(thr_type);
-
- switch (thr_type) {
- case os::java_thread:
- // Java threads use ThreadStackSize which default value can be
- // changed with the flag -Xss
- assert(JavaThread::stack_size_at_create() > 0, "this should be set");
- stack_size = JavaThread::stack_size_at_create();
+ // calculate stack size if it's not specified by caller
+ if (stack_size == 0) {
+ stack_size = os::Bsd::default_stack_size(thr_type);
+
+ switch (thr_type) {
+ case os::java_thread:
+ // Java threads use ThreadStackSize which default value can be
+ // changed with the flag -Xss
+ assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+ stack_size = JavaThread::stack_size_at_create();
+ break;
+ case os::compiler_thread:
+ if (CompilerThreadStackSize > 0) {
+ stack_size = (size_t)(CompilerThreadStackSize * K);
break;
- case os::compiler_thread:
- if (CompilerThreadStackSize > 0) {
- stack_size = (size_t)(CompilerThreadStackSize * K);
- break;
- } // else fall through:
- // use VMThreadStackSize if CompilerThreadStackSize is not defined
- case os::vm_thread:
- case os::pgc_thread:
- case os::cgc_thread:
- case os::watcher_thread:
- if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
- break;
- }
+ } // else fall through:
+ // use VMThreadStackSize if CompilerThreadStackSize is not defined
+ case os::vm_thread:
+ case os::pgc_thread:
+ case os::cgc_thread:
+ case os::watcher_thread:
+ if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+ break;
}
-
- stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed);
- pthread_attr_setstacksize(&attr, stack_size);
- } else {
- // let pthread_create() pick the default value.
}
+ stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed);
+ pthread_attr_setstacksize(&attr, stack_size);
+
ThreadState state;
{
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. 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
@@ -75,8 +75,6 @@
static julong physical_memory() { return _physical_memory; }
static void initialize_system_info();
- static bool supports_variable_stack_size();
-
static void rebuild_cpu_to_node_map();
static GrowableArray<int>* cpu_to_node() { return _cpu_to_node; }
--- a/hotspot/src/os/linux/vm/os_linux.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -711,38 +711,34 @@
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// stack size
- if (os::Linux::supports_variable_stack_size()) {
- // calculate stack size if it's not specified by caller
- if (stack_size == 0) {
- stack_size = os::Linux::default_stack_size(thr_type);
-
- switch (thr_type) {
- case os::java_thread:
- // Java threads use ThreadStackSize which default value can be
- // changed with the flag -Xss
- assert(JavaThread::stack_size_at_create() > 0, "this should be set");
- stack_size = JavaThread::stack_size_at_create();
+ // calculate stack size if it's not specified by caller
+ if (stack_size == 0) {
+ stack_size = os::Linux::default_stack_size(thr_type);
+
+ switch (thr_type) {
+ case os::java_thread:
+ // Java threads use ThreadStackSize which default value can be
+ // changed with the flag -Xss
+ assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+ stack_size = JavaThread::stack_size_at_create();
+ break;
+ case os::compiler_thread:
+ if (CompilerThreadStackSize > 0) {
+ stack_size = (size_t)(CompilerThreadStackSize * K);
break;
- case os::compiler_thread:
- if (CompilerThreadStackSize > 0) {
- stack_size = (size_t)(CompilerThreadStackSize * K);
- break;
- } // else fall through:
- // use VMThreadStackSize if CompilerThreadStackSize is not defined
- case os::vm_thread:
- case os::pgc_thread:
- case os::cgc_thread:
- case os::watcher_thread:
- if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
- break;
- }
+ } // else fall through:
+ // use VMThreadStackSize if CompilerThreadStackSize is not defined
+ case os::vm_thread:
+ case os::pgc_thread:
+ case os::cgc_thread:
+ case os::watcher_thread:
+ if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+ break;
}
-
- stack_size = MAX2(stack_size, os::Linux::min_stack_allowed);
- pthread_attr_setstacksize(&attr, stack_size);
- } else {
- // let pthread_create() pick the default value.
- }
+ }
+
+ stack_size = MAX2(stack_size, os::Linux::min_stack_allowed);
+ pthread_attr_setstacksize(&attr, stack_size);
// glibc guard page
pthread_attr_setguardsize(&attr, os::Linux::default_guard_size(thr_type));
--- a/hotspot/src/os/linux/vm/os_linux.hpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.hpp Wed Aug 05 05:28:04 2015 +0200
@@ -83,8 +83,6 @@
static void set_glibc_version(const char *s) { _glibc_version = s; }
static void set_libpthread_version(const char *s) { _libpthread_version = s; }
- static bool supports_variable_stack_size();
-
static void rebuild_cpu_to_node_map();
static GrowableArray<int>* cpu_to_node() { return _cpu_to_node; }
--- a/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -489,10 +489,6 @@
size_t os::Aix::min_stack_allowed = 128*K;
-// Aix is always in floating stack mode. The stack size for a new
-// thread can be set via pthread_attr_setstacksize().
-bool os::Aix::supports_variable_stack_size() { return true; }
-
// return default stack size for thr_type
size_t os::Aix::default_stack_size(os::ThreadType thr_type) {
// default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. 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
@@ -780,9 +780,6 @@
#ifdef AMD64
size_t os::Bsd::min_stack_allowed = 64 * K;
-
-// amd64: pthread on amd64 is always in floating stack mode
-bool os::Bsd::supports_variable_stack_size() { return true; }
#else
size_t os::Bsd::min_stack_allowed = (48 DEBUG_ONLY(+4))*K;
@@ -790,7 +787,6 @@
#define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
#endif
-bool os::Bsd::supports_variable_stack_size() { return true; }
#endif // AMD64
// return default stack size for thr_type
--- a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -290,10 +290,6 @@
size_t os::Bsd::min_stack_allowed = 64 * K;
-bool os::Bsd::supports_variable_stack_size() {
- return true;
-}
-
size_t os::Bsd::default_stack_size(os::ThreadType thr_type) {
#ifdef _LP64
size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
--- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -496,9 +496,6 @@
size_t os::Linux::min_stack_allowed = 64 * K;
-// aarch64: pthread on aarch64 is always in floating stack mode
-bool os::Linux::supports_variable_stack_size() { return true; }
-
// return default stack size for thr_type
size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
// default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -467,8 +467,6 @@
size_t os::Linux::min_stack_allowed = 128*K;
-bool os::Linux::supports_variable_stack_size() { return true; }
-
// return default stack size for thr_type
size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
// default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. 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
@@ -733,9 +733,6 @@
size_t os::Linux::min_stack_allowed = 128 * K;
-// pthread on Ubuntu is always in floating stack mode
-bool os::Linux::supports_variable_stack_size() { return true; }
-
// return default stack size for thr_type
size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
// default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -623,11 +623,6 @@
size_t os::Linux::min_stack_allowed = (48 DEBUG_ONLY(+4))*K;
#endif // AMD64
-// Test if pthread library can support variable thread stack size.
-bool os::Linux::supports_variable_stack_size() {
- return true;
-}
-
// return default stack size for thr_type
size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
// default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -305,10 +305,6 @@
size_t os::Linux::min_stack_allowed = 64 * K;
-bool os::Linux::supports_variable_stack_size() {
- return true;
-}
-
size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
#ifdef _LP64
size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
--- a/hotspot/src/share/vm/classfile/imageDecompressor.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/share/vm/classfile/imageDecompressor.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -22,8 +22,8 @@
*
*/
+#include "precompiled.hpp"
#include "runtime/thread.inline.hpp"
-#include "precompiled.hpp"
#include "classfile/imageDecompressor.hpp"
#include "runtime/thread.hpp"
#include "utilities/bytes.hpp"
--- a/hotspot/src/share/vm/classfile/imageDecompressor.hpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/share/vm/classfile/imageDecompressor.hpp Wed Aug 05 05:28:04 2015 +0200
@@ -26,7 +26,6 @@
#define SHARE_VM_CLASSFILE_IMAGEDECOMPRESSOR_HPP
#include "runtime/thread.inline.hpp"
-#include "precompiled.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/imageFile.hpp"
#include "classfile/symbolTable.hpp"
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp Wed Aug 05 05:28:04 2015 +0200
@@ -1303,7 +1303,7 @@
if (handler_index < 0) {
if (PrintSignatureHandlers && (handler != Interpreter::slow_signature_handler())) {
tty->cr();
- tty->print_cr("argument handler #%d at "PTR_FORMAT" for fingerprint " UINT64_FORMAT,
+ tty->print_cr("argument handler #%d at " PTR_FORMAT " for fingerprint " UINT64_FORMAT,
_handlers->length(),
handler,
fingerprint);
@@ -1313,7 +1313,7 @@
} else {
if (PrintSignatureHandlers) {
tty->cr();
- tty->print_cr("duplicate argument handler #%d for fingerprint " UINT64_FORMAT "(old: "PTR_FORMAT", new : "PTR_FORMAT")",
+ tty->print_cr("duplicate argument handler #%d for fingerprint " UINT64_FORMAT "(old: " PTR_FORMAT ", new : " PTR_FORMAT ")",
_handlers->length(),
fingerprint,
_handlers->at(handler_index),
--- a/hotspot/src/share/vm/runtime/globals.hpp Fri Jul 31 10:33:02 2015 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Aug 05 05:28:04 2015 +0200
@@ -3913,7 +3913,7 @@
product(bool, PerfDisableSharedMem, false, \
"Store performance data in standard memory") \
\
- product(intx, PerfDataMemorySize, 32*K, \
+ product(intx, PerfDataMemorySize, 64*K, \
"Size of performance data memory region. Will be rounded " \
"up to a multiple of the native os page size.") \
\