changeset 23494:2a559ddea547

Merge
author asaha
date Thu, 16 Jul 2015 17:18:06 -0700
parents 2ca31b46416e (current diff) 90611b16f50f (diff)
children e30be4c0f1da
files .hgtags make/hotspot_version
diffstat 4 files changed, 43 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Jul 14 11:31:34 2015 -0700
+++ b/.hgtags	Thu Jul 16 17:18:06 2015 -0700
@@ -714,6 +714,8 @@
 ff8fdeb2fb6d6f3348597339c53412f8f6202c3f hs25.60-b22
 878cb0df27c22c6b1e9f4add1eb3da3edc8ab51d jdk8u60-b22
 0e4094950cd312c8f95c7f37336606323fe049fe jdk8u60-b23
+d89ceecf1bad55e1aee2932b8895d60fc64c15db hs25.60-b23
+fb157d537278cda4150740e27bb57cd8694e15bf jdk8u60-b24
 0219ab69f00782e5c49687e2fa75138a7ffddea1 jdk8u52-b06
 9b6f44853eed8caba935915c7e710c546b205c8e jdk8u52-b07
 0219ab69f00782e5c49687e2fa75138a7ffddea1 jdk8u65-b00
@@ -722,4 +724,6 @@
 ea47136e6ea4253c0bf238fb61760f98a8d01ebc jdk8u65-b03
 2a03fd592fe60fd113c1c89e431ebaa6857c4998 jdk8u65-b04
 aa915217a00c4b8ce0e82d1b23fa1df8a9e4cc70 jdk8u65-b05
+878cb0df27c22c6b1e9f4add1eb3da3edc8ab51d jdk8u66-b00
+777a354cada52b831a32bfc5362ad7cedfde4450 jdk8u66-b01
 9a158a0c243beb610dbaabd63d6218d3ce5825f1 jdk8u71-b00
--- a/src/os/bsd/vm/jsig.c	Tue Jul 14 11:31:34 2015 -0700
+++ b/src/os/bsd/vm/jsig.c	Thu Jul 16 17:18:06 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
+#include <string.h>
 
 #define MAXSIGNUM 32
 #define MASK(sig) ((unsigned int)1 << sig)
@@ -43,6 +44,9 @@
 static struct sigaction sact[MAXSIGNUM]; /* saved signal handlers */
 static unsigned int jvmsigs = 0; /* signals used by jvm */
 
+static pthread_key_t reentry_flag_key;
+static pthread_once_t reentry_key_init_once = PTHREAD_ONCE_INIT;
+
 /* used to synchronize the installation of signal handlers */
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
@@ -59,6 +63,15 @@
 static bool jvm_signal_installing = false;
 static bool jvm_signal_installed = false;
 
+#define check_status(cmd) \
+  do { \
+    int status = (cmd); \
+    if (status != 0) { \
+      printf("error %s (%d) in " #cmd "\n", strerror(status), status); \
+      exit(1); \
+    } \
+  } while (0)
+
 static void signal_lock() {
   pthread_mutex_lock(&mutex);
   /* When the jvm is installing its set of signal handlers, threads
@@ -74,8 +87,15 @@
   pthread_mutex_unlock(&mutex);
 }
 
+static void reentry_tls_init() {
+    // value for reentry_flag_key will default to NULL (false)
+    check_status(pthread_key_create(&reentry_flag_key, NULL));
+}
+
 static sa_handler_t call_os_signal(int sig, sa_handler_t disp,
                                    bool is_sigset) {
+  sa_handler_t res;
+
   if (os_signal == NULL) {
     if (!is_sigset) {
       os_signal = (signal_t)dlsym(RTLD_NEXT, "signal");
@@ -87,7 +107,12 @@
       exit(0);
     }
   }
-  return (*os_signal)(sig, disp);
+  check_status(pthread_once(&reentry_key_init_once, reentry_tls_init));
+  // set reentry_flag_key to non-NULL to show reentry
+  check_status(pthread_setspecific(reentry_flag_key, &res));
+  res = (*os_signal)(sig, disp);
+  check_status(pthread_setspecific(reentry_flag_key, NULL));
+  return res;
 }
 
 static void save_signal_handler(int sig, sa_handler_t disp) {
@@ -161,6 +186,11 @@
   bool sigused;
   struct sigaction oldAct;
 
+  check_status(pthread_once(&reentry_key_init_once, reentry_tls_init));
+  if (pthread_getspecific(reentry_flag_key) != NULL) {
+    return call_os_sigaction(sig, act, oact);
+  }
+
   signal_lock();
 
   sigused = (MASK(sig) & jvmsigs) != 0;
--- a/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Tue Jul 14 11:31:34 2015 -0700
+++ b/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Thu Jul 16 17:18:06 2015 -0700
@@ -189,7 +189,7 @@
     return CPUVisitor::visit(nodeh, state);
   }
 
-  PICL(bool is_fujitsu) : _L1_data_cache_line_size(0), _L2_data_cache_line_size(0), _dl_handle(NULL) {
+  PICL(bool is_fujitsu, bool is_sun4v) : _L1_data_cache_line_size(0), _L2_data_cache_line_size(0), _dl_handle(NULL) {
     if (!open_library()) {
       return;
     }
@@ -201,7 +201,7 @@
         if (is_fujitsu) {
           cpu_class = "core";
         }
-        CPUVisitor cpu_visitor(this, os::processor_count());
+        CPUVisitor cpu_visitor(this, (is_sun4v && !is_fujitsu) ? 1 : os::processor_count());
         _picl_walk_tree_by_class(rooth, cpu_class, &cpu_visitor, PICL_visit_cpu_helper);
         if (cpu_visitor.l1_visitor()->is_assigned()) { // Is there a value?
           _L1_data_cache_line_size = cpu_visitor.l1_visitor()->value();
@@ -494,7 +494,7 @@
   }
 
   // Figure out cache line sizes using PICL
-  PICL picl((features & sparc64_family_m) != 0);
+  PICL picl((features & sparc64_family_m) != 0, (features & sun4v_m) != 0);
   _L2_data_cache_line_size = picl.L2_data_cache_line_size();
 
   return features;
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Jul 14 11:31:34 2015 -0700
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu Jul 16 17:18:06 2015 -0700
@@ -3339,9 +3339,11 @@
   // Not unloading classes this cycle
   assert(!should_unload_classes(), "Inconsitency!");
 
+  // If we are not unloading classes then add SO_AllCodeCache to root
+  // scanning options.
+  add_root_scanning_option(rso);
+
   if ((!verifying() || unloaded_classes_last_cycle()) && should_verify) {
-    // Include symbols, strings and code cache elements to prevent their resurrection.
-    add_root_scanning_option(rso);
     set_verifying(true);
   } else if (verifying() && !should_verify) {
     // We were verifying, but some verification flags got disabled.