Date: Thu, 23 Jan 2014 23:34:07 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r340870 - in head/java: openjdk6 openjdk6-jre openjdk6/files openjdk6/files/icedtea/openjdk Message-ID: <201401232334.s0NNY70F086321@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Thu Jan 23 23:34:07 2014 New Revision: 340870 URL: http://svnweb.freebsd.org/changeset/ports/340870 QAT: https://qat.redports.org/buildarchive/r340870/ Log: - Update to b30. - Implement sigset(2) for libjsig. All supported FreeBSD releases have it. - Turn UseMembar back on by default until we find better solution. Deleted: head/java/openjdk6/files/icedtea/openjdk/ Modified: head/java/openjdk6-jre/Makefile head/java/openjdk6/Makefile head/java/openjdk6/Makefile.icedtea head/java/openjdk6/distinfo head/java/openjdk6/files/patch-set Modified: head/java/openjdk6-jre/Makefile ============================================================================== --- head/java/openjdk6-jre/Makefile Thu Jan 23 23:13:39 2014 (r340869) +++ head/java/openjdk6-jre/Makefile Thu Jan 23 23:34:07 2014 (r340870) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 7 +PORTREVISION= 0 CATEGORIES= java devel PKGNAMESUFFIX= -jre Modified: head/java/openjdk6/Makefile ============================================================================== --- head/java/openjdk6/Makefile Thu Jan 23 23:13:39 2014 (r340869) +++ head/java/openjdk6/Makefile Thu Jan 23 23:34:07 2014 (r340870) @@ -2,13 +2,13 @@ # $FreeBSD$ PORTNAME= openjdk6 -PORTVERSION= b28 -PORTREVISION?= 7 +PORTVERSION= b30 +PORTREVISION?= 0 PORTEPOCH= 1 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \ http://download.java.net/openjdk/jtreg/promoted/4.1/b05/:jtreg \ - https://java.net/projects/openjdk6/downloads/download/ \ + https://java.net/downloads/openjdk6/ \ LOCAL MASTER_SITE_SUBDIR= jkim DISTNAME= openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE} @@ -30,7 +30,7 @@ LIB_DEPENDS= libfreetype.so:${PORTSDIR}/ RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \ ${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu -OPENJDK_BUILDDATE= 04_oct_2013 +OPENJDK_BUILDDATE= 21_jan_2014 OPTIONS_DEFINE= ICEDTEA IPV6 POLICY SOUND TZUPDATE OPTIONS_DEFAULT=ICEDTEA IPV6 TZUPDATE @@ -51,6 +51,7 @@ TEST_DESC= Add support for running regre PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PKGINSTALL= ${WRKDIR}/pkg-install +USE_XZ= yes USES= compiler gmake iconv motif .include <bsd.port.options.mk> @@ -228,6 +229,12 @@ post-patch: @${REINPLACE_CMD} -e "s|%%CXX_LIBS%%|${CXX_LIBS}|" \ ${WRKSRC}/corba/make/common/Defs-bsd.gmk \ ${WRKSRC}/jdk/make/common/Defs-bsd.gmk +.if ${COMPILER_TYPE} == "clang" + @${REINPLACE_CMD} -e "s|-fno-omit-frame-pointer|-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer|" \ + ${WRKSRC}/corba/make/common/Defs-bsd.gmk \ + ${WRKSRC}/hotspot/make/bsd/makefiles/amd64.make \ + ${WRKSRC}/jdk/make/common/Defs-bsd.gmk +.endif @${REINPLACE_CMD} -e "s|%%ICONV_INC%%|${ICONV_INCLUDE}|" \ -e "s|%%ICONV_LIB%%|${ICONV_LIBS}|" \ ${WRKSRC}/Makefile ${WRKSRC}/jdk/make/java/instrument/Makefile \ Modified: head/java/openjdk6/Makefile.icedtea ============================================================================== --- head/java/openjdk6/Makefile.icedtea Thu Jan 23 23:13:39 2014 (r340869) +++ head/java/openjdk6/Makefile.icedtea Thu Jan 23 23:34:07 2014 (r340870) @@ -1,108 +1,6 @@ # $FreeBSD$ -_PATCHES= \ - openjdk/8017196-ensure_proxies_are_handled_appropriately.patch \ - openjdk/8011157-improve_corba_portability.patch \ - openjdk/8022940-enhance_corba_translations.patch \ - openjdk/8013503-improve_stream_factories.patch \ - openjdk/8012425-transform_transformfactory.patch \ - openjdk/8017298-better_xml_support.patch \ - openjdk/8014530-better_dsp.patch \ - openjdk/8021366-jaxp_test_fix-01.patch \ - openjdk/8021933-jaxp_test_fix-02.patch \ - openjdk/8022682-supporting_xom.patch \ - openjdk/8015978-incorrect_transformation.patch \ - openjdk/oj6-20-merge.patch \ - openjdk/8024914-swapped_usage.patch \ - openjdk/8017505-better_client_service.patch \ - openjdk/8015614-update_build.patch \ - openjdk/8016256-finalization_final.patch \ - openjdk/8023683-enhance_class_file_parsing.patch \ - openjdk/8023457-tracing_mutex.patch \ - openjdk/8020943-memory_leak.patch \ - openjdk/8023478-hs_crash.patch \ - openjdk/4075303-javap_update.patch \ - openjdk/6819246-javap_instruction_decoding.patch \ - openjdk/6715767-javap_crash.patch \ - openjdk/6841420-classfile_methods.patch \ - openjdk/6841419-classfile_iterator.patch \ - openjdk/4111861-static_fields.patch \ - openjdk/4884240-javap_additional_option.patch \ - openjdk/6852856-javap_subclasses.patch \ - openjdk/6867671-javap_whitespace.patch \ - openjdk/6868539-constant_pool_tags.patch \ - openjdk/4501661-disallow_mixing.patch \ - openjdk/6824493-experimental.patch \ - openjdk/6843013-missing_experimental.patch \ - openjdk/6902264-fix_indentation.patch \ - openjdk/8016675-robust_javadoc.patch \ - openjdk/8016653-ignoreable_characters.patch \ - openjdk/7196533-timezone_bottleneck.patch \ - openjdk/8006900-new_date_time.patch \ - openjdk/8008589-better_mbean_permission_validation.patch \ - openjdk/8011071-better_crypto_provider_handling.patch \ - openjdk/8011081-improve_jhat.patch \ - openjdk/8011157-improve_corba_portability-jdk.patch \ - openjdk/8012071-better_bean_building.patch \ - openjdk/8012147-improve_tool.patch \ - openjdk/8012277-improve_dataflavour.patch \ - openjdk/8013506-better_pack200.patch \ - openjdk/8013510-augment_image_writing.patch \ - openjdk/8013514-improve_cmap_stability.patch \ - openjdk/8013744-better_tabling.patch \ - openjdk/8014085-better_serialization.patch \ - openjdk/8014093-improve_image_parsing.patch \ - openjdk/8014102-improve_image_conversion.patch \ - openjdk/8014341-better_kerberos_service.patch \ - openjdk/8014534-better_profiling.patch \ - openjdk/8014987-augment_serialization.patch \ - openjdk/8015731-auth_improvements.patch \ - openjdk/8015743-address_internet_addresses.patch \ - openjdk/8016357-update_hs_diagnostic_class.patch \ - openjdk/8002070-remove_logger_stack_search.patch \ - openjdk/6708729-javap_makefile_update.patch \ - openjdk/8010118-caller_sensitive.patch \ - openjdk/oj6-19-fix_8010118_test_cases.patch \ - openjdk/8010727-empty_logger_name.patch \ - openjdk/8010939-logmanager_deadlock.patch \ - openjdk/8011990-logger_test_urls.patch \ - openjdk/8013380-logger_stack_walk_glassfish.patch \ - openjdk/8014745-logger_stack_walk_switch.patch \ - openjdk/8012243-serial_regression.patch \ - openjdk/8014718-remove_logging_suntoolkit.patch \ - openjdk/8011139-revise_checking_getenclosingclass.patch \ - openjdk/8017196-ensure_proxies_are_handled_appropriately-jdk.patch \ - openjdk/8017287-better_resource_disposal.patch \ - openjdk/8017291-cast_proxies_aside.patch \ - openjdk/7146431-java.security_files.patch \ - openjdk/8006882-jmockit.patch \ - openjdk/8000450-restrict_access.patch \ - openjdk/8019979-better_access_test.patch \ - openjdk/8004188-rename_java.security.patch \ - openjdk/8017566-backout_part_of_8000450.patch \ - openjdk/8017300-improve_interface_implementation.patch \ - openjdk/8019292-better_attribute_value_exceptions.patch \ - openjdk/8019617-better_view_of_objects.patch \ - openjdk/8012617-arrayindexoutofbounds_linebreakmeasurer.patch \ - openjdk/8020293-jvm_crash.patch \ - openjdk/8013739-better_ldap_resource_management.patch \ - openjdk/8014349-getdeclaredclass_fix.patch \ - openjdk/6954275-big_xml_signatures.patch \ - openjdk/8021290-signature_validation.patch \ - openjdk/8012453-runtime.exec.patch \ - openjdk/8015965-typo_in_property_name.patch \ - openjdk/8015144-performance_regression.patch \ - openjdk/8019969-inet6_test_case_fix.patch \ - openjdk/8019584-invalid_notification_fix.patch \ - openjdk/8021577-bean_serialization_fix.patch \ - openjdk/8021969-jnlp_load_failure.patch \ - openjdk/8021355-splashscreen_regression.patch \ - openjdk/8022661-writeobject_flush.patch \ - openjdk/8023964-ignore_test.patch \ - openjdk/8003992-embedded_nulls.patch \ - openjdk/8013827-createtempfile_hang.patch \ - openjdk/8025128-createtempfile_absolute_prefix.patch \ - openjdk/oj6-21-overrides.patch +_PATCHES= .if ${PORT_OPTIONS:MICEDTEA} _PATCHES+= \ Modified: head/java/openjdk6/distinfo ============================================================================== --- head/java/openjdk6/distinfo Thu Jan 23 23:13:39 2014 (r340869) +++ head/java/openjdk6/distinfo Thu Jan 23 23:34:07 2014 (r340870) @@ -1,6 +1,6 @@ SHA256 (apache-ant-1.9.3-bin.tar.bz2) = ca14a31b2b47edd069624520f64957ad502c0905421da5f46dd41229b8ba4cbf SIZE (apache-ant-1.9.3-bin.tar.bz2) = 4320310 -SHA256 (openjdk-6-src-b28-04_oct_2013.tar.gz) = ac4fceed060ad61dab938c41181455fb0910f58f6944f820f0637b0f0c64bf75 -SIZE (openjdk-6-src-b28-04_oct_2013.tar.gz) = 53599044 +SHA256 (openjdk-6-src-b30-21_jan_2014.tar.xz) = ebd9fdf39c8590cd620cb78c481ca233f5919f2819237b5d2b440666f1dd3475 +SIZE (openjdk-6-src-b30-21_jan_2014.tar.xz) = 33106516 SHA256 (jtreg-4.1-bin-b05_29_nov_2012.zip) = 9291eb4a14501232b35614e88686ff66ad8b69d0098dbd4322b28f97b672653d SIZE (jtreg-4.1-bin-b05_29_nov_2012.zip) = 5993382 Modified: head/java/openjdk6/files/patch-set ============================================================================== --- head/java/openjdk6/files/patch-set Thu Jan 23 23:13:39 2014 (r340869) +++ head/java/openjdk6/files/patch-set Thu Jan 23 23:34:07 2014 (r340870) @@ -579,23 +579,34 @@ HOSTCXX = $(CXX) HOSTCC = $(CC) endif ---- hotspot/src/cpu/x86/vm/globals_x86.hpp -+++ hotspot/src/cpu/x86/vm/globals_x86.hpp -@@ -70,11 +70,7 @@ - define_pd_global(bool, RewriteBytecodes, true); - define_pd_global(bool, RewriteFrequentPairs, true); +--- hotspot/src/os/bsd/vm/jsig.c ++++ hotspot/src/os/bsd/vm/jsig.c +@@ -140,9 +140,13 @@ + } --#ifdef _ALLBSD_SOURCE --define_pd_global(bool, UseMembar, true); --#else - define_pd_global(bool, UseMembar, false); --#endif + sa_handler_t sigset(int sig, sa_handler_t disp) { ++#ifdef __FreeBSD__ ++ return set_signal(sig, disp, true); ++#else + printf("sigset() is not supported by BSD"); + exit(0); +- } ++#endif ++} - // GC Ergo Flags - define_pd_global(intx, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread + static int call_os_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact) { --- hotspot/src/os/bsd/vm/jvm_bsd.cpp +++ hotspot/src/os/bsd/vm/jvm_bsd.cpp -@@ -110,71 +110,30 @@ +@@ -50,6 +50,7 @@ + case INTERRUPT_SIGNAL: + case SIGFPE: + case SIGILL: ++ case SIGBUS: + case SIGSEGV: + + /* The following signal is used by the VM to dump thread stacks unless +@@ -110,71 +111,29 @@ JVM_END /* @@ -617,9 +628,8 @@ - CLD, CHLD, CONT, TSTP, TTIN, TTOU, URG, XCPU, XFSZ, VTALRM, PROF, - WINCH, POLL, IO, PWR, SYS - -+ HUP, INT, TRAP, ABRT, EMT, BUS, SYS, PIPE, ALRM, TERM, URG, TSTP, -+ CONT, CHLD, TTIN, TTOU, IO, XCPU, XFSZ, VTALRM, PROF, WINCH, INFO, -+ USR2 ++ HUP, INT, TRAP, ABRT, EMT, SYS, PIPE, ALRM, TERM, URG, TSTP, CONT, ++ CHLD, TTIN, TTOU, IO, XCPU, XFSZ, VTALRM, PROF, WINCH, INFO, USR2 */ -struct siglabel { @@ -780,7 +790,31 @@ #if defined(__FreeBSD__) || defined(__NetBSD__) # include <elf.h> #endif -@@ -205,6 +217,28 @@ +@@ -162,8 +174,10 @@ + #endif + + int (*os::Bsd::_clock_gettime)(clockid_t, struct timespec *) = NULL; +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + int (*os::Bsd::_pthread_getcpuclockid)(pthread_t, clockid_t *) = NULL; ++#endif ++#ifndef _ALLBSD_SOURCE + Mutex* os::Bsd::_createThread_lock = NULL; + #endif + pthread_t os::Bsd::_main_thread; +@@ -171,7 +185,11 @@ + #ifndef _ALLBSD_SOURCE + bool os::Bsd::_is_floating_stack = false; + bool os::Bsd::_is_NPTL = false; ++#endif ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + bool os::Bsd::_supports_fast_thread_cpu_time = false; ++#endif ++#ifndef _ALLBSD_SOURCE + const char * os::Bsd::_glibc_version = NULL; + const char * os::Bsd::_libpthread_version = NULL; + #endif +@@ -205,6 +223,28 @@ julong os::Bsd::available_memory() { #ifdef _ALLBSD_SOURCE @@ -809,7 +843,7 @@ // XXXBSD: this is just a stopgap implementation return physical_memory() >> 2; #else -@@ -221,6 +255,17 @@ +@@ -221,6 +261,17 @@ } julong os::allocatable_physical_memory(julong size) { @@ -827,7 +861,7 @@ #ifdef _LP64 return size; #else -@@ -308,16 +353,22 @@ +@@ -308,16 +359,22 @@ #define COMPILER_VARIANT "client" #endif @@ -854,7 +888,7 @@ int rslt = syscall(SYS_gettid); if (rslt == -1) { // old kernel, no NPTL support -@@ -325,6 +376,7 @@ +@@ -325,6 +382,7 @@ } else { return (pid_t)rslt; } @@ -862,7 +896,7 @@ } // Most versions of bsd have a bug where the number of processors are -@@ -337,7 +389,35 @@ +@@ -337,7 +395,35 @@ "environment on Bsd when /proc filesystem is not mounted."; #endif @@ -899,7 +933,7 @@ void os::Bsd::initialize_system_info() { int mib[2]; size_t len; -@@ -452,7 +532,7 @@ +@@ -452,7 +538,7 @@ * 7: The default directories, normally /lib and /usr/lib. */ #ifndef DEFAULT_LIBPATH @@ -908,7 +942,7 @@ #endif #define EXTENSIONS_DIR "/lib/ext" -@@ -997,7 +1077,7 @@ +@@ -997,7 +1083,7 @@ return NULL; } @@ -917,7 +951,7 @@ #ifdef __APPLE__ // thread_id is mach thread on macos osthread->set_thread_id(::mach_thread_self()); -@@ -1009,6 +1089,7 @@ +@@ -1009,6 +1095,7 @@ // thread_id is kernel thread id (similar to Solaris LWP id) osthread->set_thread_id(os::Bsd::gettid()); @@ -925,7 +959,7 @@ if (UseNUMA) { int lgrp_id = os::numa_get_group_id(); if (lgrp_id != -1) { -@@ -1016,6 +1097,7 @@ +@@ -1016,6 +1103,7 @@ } } #endif @@ -933,7 +967,16 @@ // initialize signal mask for this thread os::Bsd::hotspot_sigmask(thread); -@@ -1194,7 +1276,7 @@ +@@ -1105,7 +1193,7 @@ + // let pthread_create() pick the default value. + } + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + // glibc guard page + pthread_attr_setguardsize(&attr, os::Bsd::default_guard_size(thr_type)); + #endif +@@ -1194,7 +1282,7 @@ } // Store pthread info into the OSThread @@ -942,7 +985,27 @@ #ifdef __APPLE__ osthread->set_thread_id(::mach_thread_self()); #else -@@ -1817,8 +1899,10 @@ +@@ -1630,7 +1718,10 @@ + } + #endif + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) ++#ifdef __FreeBSD__ ++#define sys_clock_getres clock_getres ++#else + #ifndef SYS_clock_getres + + #if defined(IA32) || defined(AMD64) +@@ -1644,6 +1735,7 @@ + #else + #define sys_clock_getres(x,y) ::syscall(SYS_clock_getres, x, y) + #endif ++#endif + + void os::Bsd::fast_thread_clock_init() { + if (!UseBsdPosixThreadCPUClocks) { +@@ -1817,8 +1909,10 @@ } intx os::current_thread_id() { @@ -954,7 +1017,7 @@ #else return (intx)::pthread_self(); #endif -@@ -2341,14 +2425,16 @@ +@@ -2341,14 +2435,16 @@ } void os::print_os_info_brief(outputStream* st) { @@ -973,7 +1036,7 @@ os::Posix::print_uname_info(st); -@@ -2366,7 +2452,23 @@ +@@ -2366,7 +2462,23 @@ st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); @@ -998,7 +1061,7 @@ // values in struct sysinfo are "unsigned long" struct sysinfo si; sysinfo(&si); -@@ -2376,17 +2478,22 @@ +@@ -2376,17 +2488,22 @@ os::physical_memory() >> 10); st->print("(" UINT64_FORMAT "k free)", os::available_memory() >> 10); @@ -1023,7 +1086,25 @@ st->cr(); } -@@ -2533,10 +2640,17 @@ +@@ -2399,7 +2516,7 @@ + + const char *fpe_names[] = { "FPE0", "FPE_INTDIV", "FPE_INTOVF", "FPE_FLTDIV", + "FPE_FLTOVF", "FPE_FLTUND", "FPE_FLTRES", +- "FPE_FLTINV", "FPE_FLTSUB", "FPE_FLTDEN" }; ++ "FPE_FLTINV", "FPE_FLTSUB" }; + + const char *segv_names[] = { "SEGV0", "SEGV_MAPERR", "SEGV_ACCERR" }; + +@@ -2425,7 +2542,7 @@ + st->print(", si_addr=" PTR_FORMAT, si->si_addr); + break; + case SIGFPE: +- st->print(", si_code=%d (%s)", c, c > 9 ? "" : fpe_names[c]); ++ st->print(", si_code=%d (%s)", c, c > 8 ? "" : fpe_names[c]); + st->print(", si_addr=" PTR_FORMAT, si->si_addr); + break; + case SIGSEGV: +@@ -2533,10 +2650,17 @@ jrelib_p = buf + len; // Add the appropriate library subdir @@ -1041,7 +1122,7 @@ // Add the appropriate client or server subdir len = strlen(buf); -@@ -2997,9 +3111,10 @@ +@@ -2997,9 +3121,10 @@ flags |= MAP_FIXED; } @@ -1055,7 +1136,7 @@ flags, -1, 0); if (addr != MAP_FAILED) { -@@ -3156,7 +3271,9 @@ +@@ -3156,7 +3281,9 @@ static size_t _large_page_size = 0; void os::large_page_init() { @@ -1066,7 +1147,7 @@ if (!UseLargePages) { UseHugeTLBFS = false; UseSHM = false; -@@ -3654,8 +3771,8 @@ +@@ -3654,8 +3781,8 @@ return OS_OK; #else int ret = setpriority(PRIO_PROCESS, thread->osthread()->thread_id(), newpri); @@ -1076,7 +1157,25 @@ } OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) { -@@ -4634,6 +4751,20 @@ +@@ -4171,7 +4298,7 @@ + } + } + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + // This is the fastest way to get thread cpu time on Bsd. + // Returns cpu time (user+sys) for any thread, not only for current. + // POSIX compliant clocks are implemented in the kernels 2.6.16+. +@@ -4450,7 +4577,7 @@ + // this is called _after_ the global arguments have been parsed + jint os::init_2(void) + { +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + Bsd::fast_thread_clock_init(); + #endif + +@@ -4634,6 +4761,20 @@ int os::active_processor_count() { #ifdef _ALLBSD_SOURCE @@ -1097,9 +1196,110 @@ return _processor_count; #else // Bsd doesn't yet have a (official) notion of processor sets, +@@ -5033,7 +5174,7 @@ + return munmap(addr, bytes) == 0; + } + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time); + + static clockid_t thread_cpu_clockid(Thread* thread) { +@@ -5057,7 +5198,7 @@ + jlong os::current_thread_cpu_time() { + #ifdef __APPLE__ + return os::thread_cpu_time(Thread::current(), true /* user + sys */); +-#elif !defined(_ALLBSD_SOURCE) ++#elif !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + if (os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(CLOCK_THREAD_CPUTIME_ID); + } else { +@@ -5068,7 +5209,7 @@ + } + + jlong os::thread_cpu_time(Thread* thread) { +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + // consistent with what current_thread_cpu_time() returns + if (os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(thread_cpu_clockid(thread)); +@@ -5081,7 +5222,7 @@ + jlong os::current_thread_cpu_time(bool user_sys_cpu_time) { + #ifdef __APPLE__ + return os::thread_cpu_time(Thread::current(), user_sys_cpu_time); +-#elif !defined(_ALLBSD_SOURCE) ++#elif !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + if (user_sys_cpu_time && os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(CLOCK_THREAD_CPUTIME_ID); + } else { +@@ -5110,7 +5251,7 @@ + } else { + return ((jlong)tinfo.user_time.seconds * 1000000000) + ((jlong)tinfo.user_time.microseconds * (jlong)1000); + } +-#elif !defined(_ALLBSD_SOURCE) ++#elif !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + if (user_sys_cpu_time && os::Bsd::supports_fast_thread_cpu_time()) { + return os::Bsd::fast_thread_cpu_time(thread_cpu_clockid(thread)); + } else { +@@ -5119,12 +5260,15 @@ + #endif + } + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + // + // -1 on error. + // + + static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time) { ++#ifdef __FreeBSD__ ++ return -1; ++#else + static bool proc_pid_cpu_avail = true; + static bool proc_task_unchecked = true; + static const char *proc_stat_path = "/proc/%d/stat"; +@@ -5208,6 +5352,7 @@ + } else { + return (jlong)user_time * (1000000000 / clock_tics_per_sec); + } ++#endif + } + #endif + +@@ -5226,7 +5371,7 @@ + } + + bool os::is_thread_cpu_time_supported() { +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(__FreeBSD__) + return true; + #elif defined(_ALLBSD_SOURCE) + return false; --- hotspot/src/os/bsd/vm/os_bsd.hpp +++ hotspot/src/os/bsd/vm/os_bsd.hpp -@@ -112,13 +112,15 @@ +@@ -56,9 +56,11 @@ + static int sigflags[MAXSIGNUM]; + + static int (*_clock_gettime)(clockid_t, struct timespec *); +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *); ++#endif + ++#ifndef _ALLBSD_SOURCE + static address _initial_thread_stack_bottom; + static uintptr_t _initial_thread_stack_size; + +@@ -67,6 +69,8 @@ + + static bool _is_floating_stack; + static bool _is_NPTL; ++#endif ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + static bool _supports_fast_thread_cpu_time; + #endif + +@@ -112,13 +116,15 @@ #endif static pthread_t main_thread(void) { return _main_thread; } @@ -1116,7 +1316,13 @@ static void hotspot_sigmask(Thread* thread); #ifndef _ALLBSD_SOURCE -@@ -202,7 +204,7 @@ +@@ -197,12 +203,12 @@ + // Real-time clock functions + static void clock_init(void); + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + // fast POSIX clocks support static void fast_thread_clock_init(void); #endif @@ -1125,6 +1331,15 @@ return _clock_gettime != NULL; } +@@ -210,7 +216,7 @@ + return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; + } + +-#ifndef _ALLBSD_SOURCE ++#if !defined(_ALLBSD_SOURCE) || defined(__FreeBSD__) + static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) { + return _pthread_getcpuclockid ? _pthread_getcpuclockid(tid, clock_id) : -1; + } --- hotspot/src/os/bsd/vm/threadCritical_bsd.cpp +++ hotspot/src/os/bsd/vm/threadCritical_bsd.cpp @@ -33,35 +33,36 @@ @@ -1945,6 +2160,17 @@ void* result = (void*) tp->area_top; tp->area_top += size; +--- hotspot/src/share/vm/runtime/globals.hpp ++++ hotspot/src/share/vm/runtime/globals.hpp +@@ -1125,7 +1125,7 @@ + product(intx, hashCode, 0, \ + "(Unstable) select hashCode generation algorithm" ) \ + \ +- product(intx, WorkAroundNPTLTimedWaitHang, 1, \ ++ product(intx, WorkAroundNPTLTimedWaitHang, 0, \ + "(Unstable, Linux-specific)" \ + " avoid NPTL-FUTEX hang pthread_cond_timedwait" ) \ + \ --- hotspot/src/share/vm/runtime/interfaceSupport.hpp +++ hotspot/src/share/vm/runtime/interfaceSupport.hpp @@ -67,7 +67,7 @@
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401232334.s0NNY70F086321>