--- old/src/hotspot/os/posix/os_posix.cpp 2020-05-01 02:25:38.015697422 -0700 +++ new/src/hotspot/os/posix/os_posix.cpp 2020-05-01 02:25:37.619689805 -0700 @@ -448,7 +448,7 @@ st->print("%d", sysconf(_SC_CHILD_MAX)); print_rlimit(st, ", THREADS", RLIMIT_THREADS); -#elif !defined(SOLARIS) +#else print_rlimit(st, ", NPROC", RLIMIT_NPROC); #endif @@ -466,12 +466,6 @@ print_rlimit(st, ", MEMLOCK", RLIMIT_MEMLOCK, true); #endif -#if defined(SOLARIS) - // maximum size of mapped address space of a process in bytes; - // if the limit is exceeded, mmap and brk fail - print_rlimit(st, ", VMEM", RLIMIT_VMEM, true); -#endif - // MacOS; The maximum size (in bytes) to which a process's resident set size may grow. #if defined(__APPLE__) print_rlimit(st, ", RSS", RLIMIT_RSS, true); @@ -1095,21 +1089,6 @@ #if defined(IA64) && !defined(AIX) { SIGSEGV, SEGV_PSTKOVF, "SEGV_PSTKOVF", "Paragraph stack overflow" }, #endif -#if defined(__sparc) && defined(SOLARIS) -// define Solaris Sparc M7 ADI SEGV signals -#if !defined(SEGV_ACCADI) -#define SEGV_ACCADI 3 -#endif - { SIGSEGV, SEGV_ACCADI, "SEGV_ACCADI", "ADI not enabled for mapped object." }, -#if !defined(SEGV_ACCDERR) -#define SEGV_ACCDERR 4 -#endif - { SIGSEGV, SEGV_ACCDERR, "SEGV_ACCDERR", "ADI disrupting exception." }, -#if !defined(SEGV_ACCPERR) -#define SEGV_ACCPERR 5 -#endif - { SIGSEGV, SEGV_ACCPERR, "SEGV_ACCPERR", "ADI precise exception." }, -#endif // defined(__sparc) && defined(SOLARIS) { SIGBUS, BUS_ADRALN, "BUS_ADRALN", "Invalid address alignment." }, { SIGBUS, BUS_ADRERR, "BUS_ADRERR", "Nonexistent physical address." }, { SIGBUS, BUS_OBJERR, "BUS_OBJERR", "Object-specific hardware error." }, @@ -1268,13 +1247,7 @@ bool os::signal_thread(Thread* thread, int sig, const char* reason) { OSThread* osthread = thread->osthread(); if (osthread) { -#if defined (SOLARIS) - // Note: we cannot use pthread_kill on Solaris - not because - // its missing, but because we do not have the pthread_t id. - int status = thr_kill(osthread->thread_id(), sig); -#else int status = pthread_kill(osthread->pthread_id(), sig); -#endif if (status == 0) { Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.", sig, p2i(thread), reason); @@ -1295,8 +1268,6 @@ return Bsd::ucontext_get_pc(ctx); #elif defined(LINUX) return Linux::ucontext_get_pc(ctx); -#elif defined(SOLARIS) - return Solaris::ucontext_get_pc(ctx); #else VMError::report_and_die("unimplemented ucontext_get_pc"); #endif @@ -1309,8 +1280,6 @@ Bsd::ucontext_set_pc(ctx, pc); #elif defined(LINUX) Linux::ucontext_set_pc(ctx, pc); -#elif defined(SOLARIS) - Solaris::ucontext_set_pc(ctx, pc); #else VMError::report_and_die("unimplemented ucontext_get_pc"); #endif @@ -1415,7 +1384,7 @@ // page size which again depends on the concrete system the VM is running // on. Space for libc guard pages is not included in this size. jint os::Posix::set_minimum_stack_sizes() { - size_t os_min_stack_allowed = SOLARIS_ONLY(thr_min_stack()) NOT_SOLARIS(PTHREAD_STACK_MIN); + size_t os_min_stack_allowed = PTHREAD_STACK_MIN; _java_thread_min_stack_allowed = _java_thread_min_stack_allowed + JavaThread::stack_guard_zone_size() + @@ -1625,11 +1594,9 @@ if ((status = pthread_mutexattr_settype(_mutexAttr, PTHREAD_MUTEX_NORMAL)) != 0) { fatal("pthread_mutexattr_settype: %s", os::strerror(status)); } - // Solaris has it's own PlatformMutex, distinct from the one for POSIX. - NOT_SOLARIS(os::PlatformMutex::init();) + os::PlatformMutex::init(); } -#ifndef SOLARIS sigset_t sigs; struct sigaction sigact[NSIG]; @@ -1645,7 +1612,6 @@ sigact[sig] = oldAct; sigaddset(&sigs, sig); } -#endif // Not all POSIX types and API's are available on all notionally "posix" // platforms. If we have build-time support then we will check for actual @@ -1730,7 +1696,6 @@ pthread_init_common(); -#ifndef SOLARIS int status; if (_pthread_condattr_setclock != NULL && _clock_gettime != NULL) { if ((status = _pthread_condattr_setclock(_condAttr, CLOCK_MONOTONIC)) != 0) { @@ -1745,12 +1710,9 @@ _use_clock_monotonic_condattr = true; } } -#endif // !SOLARIS - } void os::Posix::init_2(void) { -#ifndef SOLARIS log_info(os)("Use of CLOCK_MONOTONIC is%s supported", (_clock_gettime != NULL ? "" : " not")); log_info(os)("Use of pthread_condattr_setclock is%s supported", @@ -1758,7 +1720,6 @@ log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with %s", _use_clock_monotonic_condattr ? "CLOCK_MONOTONIC" : "the default clock"); sigemptyset(&sigs); -#endif // !SOLARIS } #else // !SUPPORTS_CLOCK_MONOTONIC @@ -1768,12 +1729,10 @@ } void os::Posix::init_2(void) { -#ifndef SOLARIS log_info(os)("Use of CLOCK_MONOTONIC is not supported"); log_info(os)("Use of pthread_condattr_setclock is not supported"); log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with the default clock"); sigemptyset(&sigs); -#endif // !SOLARIS } #endif // SUPPORTS_CLOCK_MONOTONIC @@ -1914,7 +1873,6 @@ // Shared pthread_mutex/cond based PlatformEvent implementation. // Not currently usable by Solaris. -#ifndef SOLARIS // PlatformEvent // @@ -2343,5 +2301,3 @@ return OS_OK; } } - -#endif // !SOLARIS