Mon, 23 Mar 2015 22:46:35 -0400
Merge
.hgtags | file | annotate | diff | comparison | revisions |
1.1 --- a/.hgtags Thu Mar 12 17:47:28 2015 -0400 1.2 +++ b/.hgtags Mon Mar 23 22:46:35 2015 -0400 1.3 @@ -601,3 +601,7 @@ 1.4 74931e85352be8556eaa511ca0dd7c38fe272ec3 hs25.60-b05 1.5 b13f1890afb8abc31ecb9c21fd2ba95aba3e33f8 jdk8u60-b05 1.6 b17a8a22a0344e3c93e2e4677de20d35f99cf4f5 hs25.60-b06 1.7 +7b70923c8e04920b60278f90ad23a63c773cee7b jdk8u60-b06 1.8 +d51ef6da82b486e7b2b3c08eef9ca0a186935ded hs25.60-b07 1.9 +353e580ce6878d80c7b7cd27f8ad24609b12c58b jdk8u60-b07 1.10 +a72a4192a36d6d84766d6135fe6515346c742007 hs25.60-b08
2.1 --- a/make/bsd/makefiles/gcc.make Thu Mar 12 17:47:28 2015 -0400 2.2 +++ b/make/bsd/makefiles/gcc.make Mon Mar 23 22:46:35 2015 -0400 2.3 @@ -349,7 +349,7 @@ 2.4 # The macro takes the version with no dots, ex: 1070 2.5 CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \ 2.6 -mmacosx-version-min=$(MACOSX_VERSION_MIN) 2.7 - LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) 2.8 + LFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) 2.9 endif 2.10 2.11
3.1 --- a/make/bsd/makefiles/saproc.make Thu Mar 12 17:47:28 2015 -0400 3.2 +++ b/make/bsd/makefiles/saproc.make Mon Mar 23 22:46:35 2015 -0400 3.3 @@ -110,6 +110,9 @@ 3.4 3.5 ifneq ($(OS_VENDOR), Darwin) 3.6 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) 3.7 +else 3.8 +# bring in minimum version argument or we'll fail on OSX 10.10 3.9 +SA_LFLAGS = $(LFLAGS) 3.10 endif 3.11 SA_LFLAGS += $(LDFLAGS_HASH_STYLE) 3.12
4.1 --- a/make/hotspot_version Thu Mar 12 17:47:28 2015 -0400 4.2 +++ b/make/hotspot_version Mon Mar 23 22:46:35 2015 -0400 4.3 @@ -35,7 +35,7 @@ 4.4 4.5 HS_MAJOR_VER=25 4.6 HS_MINOR_VER=60 4.7 -HS_BUILD_NUMBER=07 4.8 +HS_BUILD_NUMBER=09 4.9 4.10 JDK_MAJOR_VER=1 4.11 JDK_MINOR_VER=8
5.1 --- a/src/cpu/ppc/vm/ppc.ad Thu Mar 12 17:47:28 2015 -0400 5.2 +++ b/src/cpu/ppc/vm/ppc.ad Mon Mar 23 22:46:35 2015 -0400 5.3 @@ -4418,11 +4418,11 @@ 5.4 interface(CONST_INTER); 5.5 %} 5.6 5.7 -// constant 'float +0.0'. 5.8 +// Float Immediate: +0.0f. 5.9 operand immF_0() %{ 5.10 - predicate((n->getf() == 0) && 5.11 - (fpclassify(n->getf()) == FP_ZERO) && (signbit(n->getf()) == 0)); 5.12 + predicate(jint_cast(n->getf()) == 0); 5.13 match(ConF); 5.14 + 5.15 op_cost(0); 5.16 format %{ %} 5.17 interface(CONST_INTER);
6.1 --- a/src/cpu/sparc/vm/sparc.ad Thu Mar 12 17:47:28 2015 -0400 6.2 +++ b/src/cpu/sparc/vm/sparc.ad Mon Mar 23 22:46:35 2015 -0400 6.3 @@ -3760,13 +3760,9 @@ 6.4 interface(CONST_INTER); 6.5 %} 6.6 6.7 +// Double Immediate: +0.0d 6.8 operand immD0() %{ 6.9 -#ifdef _LP64 6.10 - // on 64-bit architectures this comparision is faster 6.11 predicate(jlong_cast(n->getd()) == 0); 6.12 -#else 6.13 - predicate((n->getd() == 0) && (fpclass(n->getd()) == FP_PZERO)); 6.14 -#endif 6.15 match(ConD); 6.16 6.17 op_cost(0); 6.18 @@ -3783,9 +3779,9 @@ 6.19 interface(CONST_INTER); 6.20 %} 6.21 6.22 -// Float Immediate: 0 6.23 -operand immF0() %{ 6.24 - predicate((n->getf() == 0) && (fpclass(n->getf()) == FP_PZERO)); 6.25 +// Float Immediate: +0.0f 6.26 +operand immF0() %{ 6.27 + predicate(jint_cast(n->getf()) == 0); 6.28 match(ConF); 6.29 6.30 op_cost(0);
7.1 --- a/src/os/aix/vm/os_aix.cpp Thu Mar 12 17:47:28 2015 -0400 7.2 +++ b/src/os/aix/vm/os_aix.cpp Mon Mar 23 22:46:35 2015 -0400 7.3 @@ -3987,11 +3987,6 @@ 7.4 return JNI_OK; 7.5 } 7.6 7.7 -// this is called at the end of vm_initialization 7.8 -void os::init_3(void) { 7.9 - return; 7.10 -} 7.11 - 7.12 // Mark the polling page as unreadable 7.13 void os::make_polling_page_unreadable(void) { 7.14 if (!guard_memory((char*)_polling_page, Aix::page_size())) {
8.1 --- a/src/os/bsd/vm/os_bsd.cpp Thu Mar 12 17:47:28 2015 -0400 8.2 +++ b/src/os/bsd/vm/os_bsd.cpp Mon Mar 23 22:46:35 2015 -0400 8.3 @@ -3745,9 +3745,6 @@ 8.4 return JNI_OK; 8.5 } 8.6 8.7 -// this is called at the end of vm_initialization 8.8 -void os::init_3(void) { } 8.9 - 8.10 // Mark the polling page as unreadable 8.11 void os::make_polling_page_unreadable(void) { 8.12 if( !guard_memory((char*)_polling_page, Bsd::page_size()) )
9.1 --- a/src/os/linux/vm/os_linux.cpp Thu Mar 12 17:47:28 2015 -0400 9.2 +++ b/src/os/linux/vm/os_linux.cpp Mon Mar 23 22:46:35 2015 -0400 9.3 @@ -160,35 +160,6 @@ 9.4 // Declarations 9.5 static void unpackTime(timespec* absTime, bool isAbsolute, jlong time); 9.6 9.7 -#ifdef JAVASE_EMBEDDED 9.8 -class MemNotifyThread: public Thread { 9.9 - friend class VMStructs; 9.10 - public: 9.11 - virtual void run(); 9.12 - 9.13 - private: 9.14 - static MemNotifyThread* _memnotify_thread; 9.15 - int _fd; 9.16 - 9.17 - public: 9.18 - 9.19 - // Constructor 9.20 - MemNotifyThread(int fd); 9.21 - 9.22 - // Tester 9.23 - bool is_memnotify_thread() const { return true; } 9.24 - 9.25 - // Printing 9.26 - char* name() const { return (char*)"Linux MemNotify Thread"; } 9.27 - 9.28 - // Returns the single instance of the MemNotifyThread 9.29 - static MemNotifyThread* memnotify_thread() { return _memnotify_thread; } 9.30 - 9.31 - // Create and start the single instance of MemNotifyThread 9.32 - static void start(); 9.33 -}; 9.34 -#endif // JAVASE_EMBEDDED 9.35 - 9.36 // utility functions 9.37 9.38 static int SR_initialize(); 9.39 @@ -4913,17 +4884,6 @@ 9.40 return JNI_OK; 9.41 } 9.42 9.43 -// this is called at the end of vm_initialization 9.44 -void os::init_3(void) { 9.45 -#ifdef JAVASE_EMBEDDED 9.46 - // Start the MemNotifyThread 9.47 - if (LowMemoryProtection) { 9.48 - MemNotifyThread::start(); 9.49 - } 9.50 - return; 9.51 -#endif 9.52 -} 9.53 - 9.54 // Mark the polling page as unreadable 9.55 void os::make_polling_page_unreadable(void) { 9.56 if( !guard_memory((char*)_polling_page, Linux::page_size()) ) 9.57 @@ -6100,83 +6060,6 @@ 9.58 return strlen(buffer); 9.59 } 9.60 9.61 -#ifdef JAVASE_EMBEDDED 9.62 -// 9.63 -// A thread to watch the '/dev/mem_notify' device, which will tell us when the OS is running low on memory. 9.64 -// 9.65 -MemNotifyThread* MemNotifyThread::_memnotify_thread = NULL; 9.66 - 9.67 -// ctor 9.68 -// 9.69 -MemNotifyThread::MemNotifyThread(int fd): Thread() { 9.70 - assert(memnotify_thread() == NULL, "we can only allocate one MemNotifyThread"); 9.71 - _fd = fd; 9.72 - 9.73 - if (os::create_thread(this, os::os_thread)) { 9.74 - _memnotify_thread = this; 9.75 - os::set_priority(this, NearMaxPriority); 9.76 - os::start_thread(this); 9.77 - } 9.78 -} 9.79 - 9.80 -// Where all the work gets done 9.81 -// 9.82 -void MemNotifyThread::run() { 9.83 - assert(this == memnotify_thread(), "expected the singleton MemNotifyThread"); 9.84 - 9.85 - // Set up the select arguments 9.86 - fd_set rfds; 9.87 - if (_fd != -1) { 9.88 - FD_ZERO(&rfds); 9.89 - FD_SET(_fd, &rfds); 9.90 - } 9.91 - 9.92 - // Now wait for the mem_notify device to wake up 9.93 - while (1) { 9.94 - // Wait for the mem_notify device to signal us.. 9.95 - int rc = select(_fd+1, _fd != -1 ? &rfds : NULL, NULL, NULL, NULL); 9.96 - if (rc == -1) { 9.97 - perror("select!\n"); 9.98 - break; 9.99 - } else if (rc) { 9.100 - //ssize_t free_before = os::available_memory(); 9.101 - //tty->print ("Notified: Free: %dK \n",os::available_memory()/1024); 9.102 - 9.103 - // The kernel is telling us there is not much memory left... 9.104 - // try to do something about that 9.105 - 9.106 - // If we are not already in a GC, try one. 9.107 - if (!Universe::heap()->is_gc_active()) { 9.108 - Universe::heap()->collect(GCCause::_allocation_failure); 9.109 - 9.110 - //ssize_t free_after = os::available_memory(); 9.111 - //tty->print ("Post-Notify: Free: %dK\n",free_after/1024); 9.112 - //tty->print ("GC freed: %dK\n", (free_after - free_before)/1024); 9.113 - } 9.114 - // We might want to do something like the following if we find the GC's are not helping... 9.115 - // Universe::heap()->size_policy()->set_gc_time_limit_exceeded(true); 9.116 - } 9.117 - } 9.118 -} 9.119 - 9.120 -// 9.121 -// See if the /dev/mem_notify device exists, and if so, start a thread to monitor it. 9.122 -// 9.123 -void MemNotifyThread::start() { 9.124 - int fd; 9.125 - fd = open ("/dev/mem_notify", O_RDONLY, 0); 9.126 - if (fd < 0) { 9.127 - return; 9.128 - } 9.129 - 9.130 - if (memnotify_thread() == NULL) { 9.131 - new MemNotifyThread(fd); 9.132 - } 9.133 -} 9.134 - 9.135 -#endif // JAVASE_EMBEDDED 9.136 - 9.137 - 9.138 /////////////// Unit tests /////////////// 9.139 9.140 #ifndef PRODUCT
10.1 --- a/src/os/solaris/vm/os_solaris.cpp Thu Mar 12 17:47:28 2015 -0400 10.2 +++ b/src/os/solaris/vm/os_solaris.cpp Mon Mar 23 22:46:35 2015 -0400 10.3 @@ -5194,10 +5194,6 @@ 10.4 return JNI_OK; 10.5 } 10.6 10.7 -void os::init_3(void) { 10.8 - return; 10.9 -} 10.10 - 10.11 // Mark the polling page as unreadable 10.12 void os::make_polling_page_unreadable(void) { 10.13 if( mprotect((char *)_polling_page, page_size, PROT_NONE) != 0 )
11.1 --- a/src/os/windows/vm/os_windows.cpp Thu Mar 12 17:47:28 2015 -0400 11.2 +++ b/src/os/windows/vm/os_windows.cpp Mon Mar 23 22:46:35 2015 -0400 11.3 @@ -4062,10 +4062,6 @@ 11.4 return JNI_OK; 11.5 } 11.6 11.7 -void os::init_3(void) { 11.8 - return; 11.9 -} 11.10 - 11.11 // Mark the polling page as unreadable 11.12 void os::make_polling_page_unreadable(void) { 11.13 DWORD old_status;
12.1 --- a/src/share/vm/classfile/defaultMethods.cpp Thu Mar 12 17:47:28 2015 -0400 12.2 +++ b/src/share/vm/classfile/defaultMethods.cpp Mon Mar 23 22:46:35 2015 -0400 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -1091,6 +1091,7 @@ 12.11 } 12.12 // update idnum for new location 12.13 merged_methods->at(i)->set_method_idnum(i); 12.14 + merged_methods->at(i)->set_orig_method_idnum(i); 12.15 } 12.16 12.17 // Verify correct order
13.1 --- a/src/share/vm/oops/constMethod.hpp Thu Mar 12 17:47:28 2015 -0400 13.2 +++ b/src/share/vm/oops/constMethod.hpp Mon Mar 23 22:46:35 2015 -0400 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -222,6 +222,7 @@ 13.11 u2 _max_stack; // Maximum number of entries on the expression stack 13.12 u2 _max_locals; // Number of local variables used by this method 13.13 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words 13.14 + u2 _orig_method_idnum; // Original unique identification number for the method 13.15 13.16 // Constructor 13.17 ConstMethod(int byte_code_size, 13.18 @@ -475,6 +476,9 @@ 13.19 u2 method_idnum() const { return _method_idnum; } 13.20 void set_method_idnum(u2 idnum) { _method_idnum = idnum; } 13.21 13.22 + u2 orig_method_idnum() const { return _orig_method_idnum; } 13.23 + void set_orig_method_idnum(u2 idnum) { _orig_method_idnum = idnum; } 13.24 + 13.25 // max stack 13.26 int max_stack() const { return _max_stack; } 13.27 void set_max_stack(int size) { _max_stack = size; }
14.1 --- a/src/share/vm/oops/cpCache.cpp Thu Mar 12 17:47:28 2015 -0400 14.2 +++ b/src/share/vm/oops/cpCache.cpp Mon Mar 23 22:46:35 2015 -0400 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -449,7 +449,6 @@ 14.11 new_method->name()->as_C_string(), 14.12 new_method->signature()->as_C_string())); 14.13 } 14.14 - 14.15 return true; 14.16 } 14.17 14.18 @@ -477,7 +476,6 @@ 14.19 new_method->name()->as_C_string(), 14.20 new_method->signature()->as_C_string())); 14.21 } 14.22 - 14.23 return true; 14.24 } 14.25 14.26 @@ -498,41 +496,39 @@ 14.27 // _f1 == NULL || !_f1->is_method() are OK here 14.28 return true; 14.29 } 14.30 - // return false if _f1 refers to an old or an obsolete method 14.31 + // return false if _f1 refers to a non-deleted old or obsolete method 14.32 return (NOT_PRODUCT(_f1->is_valid() &&) _f1->is_method() && 14.33 - !((Method*)_f1)->is_old() && !((Method*)_f1)->is_obsolete()); 14.34 + (f1_as_method()->is_deleted() || 14.35 + (!f1_as_method()->is_old() && !f1_as_method()->is_obsolete()))); 14.36 } 14.37 14.38 -bool ConstantPoolCacheEntry::is_interesting_method_entry(Klass* k) { 14.39 +Method* ConstantPoolCacheEntry::get_interesting_method_entry(Klass* k) { 14.40 if (!is_method_entry()) { 14.41 // not a method entry so not interesting by default 14.42 - return false; 14.43 + return NULL; 14.44 } 14.45 - 14.46 Method* m = NULL; 14.47 if (is_vfinal()) { 14.48 // virtual and final so _f2 contains method ptr instead of vtable index 14.49 m = f2_as_vfinal_method(); 14.50 } else if (is_f1_null()) { 14.51 // NULL _f1 means this is a virtual entry so also not interesting 14.52 - return false; 14.53 + return NULL; 14.54 } else { 14.55 if (!(_f1->is_method())) { 14.56 // _f1 can also contain a Klass* for an interface 14.57 - return false; 14.58 + return NULL; 14.59 } 14.60 m = f1_as_method(); 14.61 } 14.62 - 14.63 assert(m != NULL && m->is_method(), "sanity check"); 14.64 if (m == NULL || !m->is_method() || (k != NULL && m->method_holder() != k)) { 14.65 // robustness for above sanity checks or method is not in 14.66 // the interesting class 14.67 - return false; 14.68 + return NULL; 14.69 } 14.70 - 14.71 // the method is in the interesting class so the entry is interesting 14.72 - return true; 14.73 + return m; 14.74 } 14.75 #endif // INCLUDE_JVMTI 14.76 14.77 @@ -609,7 +605,7 @@ 14.78 // If any entry of this ConstantPoolCache points to any of 14.79 // old_methods, replace it with the corresponding new_method. 14.80 void ConstantPoolCache::adjust_method_entries(Method** old_methods, Method** new_methods, 14.81 - int methods_length, bool * trace_name_printed) { 14.82 + int methods_length, bool * trace_name_printed) { 14.83 14.84 if (methods_length == 0) { 14.85 // nothing to do if there are no methods 14.86 @@ -620,7 +616,7 @@ 14.87 Klass* old_holder = old_methods[0]->method_holder(); 14.88 14.89 for (int i = 0; i < length(); i++) { 14.90 - if (!entry_at(i)->is_interesting_method_entry(old_holder)) { 14.91 + if (entry_at(i)->get_interesting_method_entry(old_holder) == NULL) { 14.92 // skip uninteresting methods 14.93 continue; 14.94 } 14.95 @@ -644,10 +640,33 @@ 14.96 } 14.97 } 14.98 14.99 +// If any entry of this ConstantPoolCache points to any of 14.100 +// old_methods, replace it with the corresponding new_method. 14.101 +void ConstantPoolCache::adjust_method_entries(InstanceKlass* holder, bool * trace_name_printed) { 14.102 + for (int i = 0; i < length(); i++) { 14.103 + ConstantPoolCacheEntry* entry = entry_at(i); 14.104 + Method* old_method = entry->get_interesting_method_entry(holder); 14.105 + if (old_method == NULL || !old_method->is_old()) { 14.106 + continue; // skip uninteresting entries 14.107 + } 14.108 + if (old_method->is_deleted()) { 14.109 + // clean up entries with deleted methods 14.110 + entry->initialize_entry(entry->constant_pool_index()); 14.111 + continue; 14.112 + } 14.113 + Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum()); 14.114 + 14.115 + assert(new_method != NULL, "method_with_idnum() should not be NULL"); 14.116 + assert(old_method != new_method, "sanity check"); 14.117 + 14.118 + entry_at(i)->adjust_method_entry(old_method, new_method, trace_name_printed); 14.119 + } 14.120 +} 14.121 + 14.122 // the constant pool cache should never contain old or obsolete methods 14.123 bool ConstantPoolCache::check_no_old_or_obsolete_entries() { 14.124 for (int i = 1; i < length(); i++) { 14.125 - if (entry_at(i)->is_interesting_method_entry(NULL) && 14.126 + if (entry_at(i)->get_interesting_method_entry(NULL) != NULL && 14.127 !entry_at(i)->check_no_old_or_obsolete_entries()) { 14.128 return false; 14.129 } 14.130 @@ -657,7 +676,7 @@ 14.131 14.132 void ConstantPoolCache::dump_cache() { 14.133 for (int i = 1; i < length(); i++) { 14.134 - if (entry_at(i)->is_interesting_method_entry(NULL)) { 14.135 + if (entry_at(i)->get_interesting_method_entry(NULL) != NULL) { 14.136 entry_at(i)->print(tty, i); 14.137 } 14.138 }
15.1 --- a/src/share/vm/oops/cpCache.hpp Thu Mar 12 17:47:28 2015 -0400 15.2 +++ b/src/share/vm/oops/cpCache.hpp Mon Mar 23 22:46:35 2015 -0400 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -378,9 +378,9 @@ 15.11 // printed the klass name so that other routines in the adjust_* 15.12 // group don't print the klass name. 15.13 bool adjust_method_entry(Method* old_method, Method* new_method, 15.14 - bool * trace_name_printed); 15.15 + bool* trace_name_printed); 15.16 bool check_no_old_or_obsolete_entries(); 15.17 - bool is_interesting_method_entry(Klass* k); 15.18 + Method* get_interesting_method_entry(Klass* k); 15.19 #endif // INCLUDE_JVMTI 15.20 15.21 // Debugging & Printing 15.22 @@ -477,7 +477,8 @@ 15.23 // printed the klass name so that other routines in the adjust_* 15.24 // group don't print the klass name. 15.25 void adjust_method_entries(Method** old_methods, Method** new_methods, 15.26 - int methods_length, bool * trace_name_printed); 15.27 + int methods_length, bool* trace_name_printed); 15.28 + void adjust_method_entries(InstanceKlass* holder, bool* trace_name_printed); 15.29 bool check_no_old_or_obsolete_entries(); 15.30 void dump_cache(); 15.31 #endif // INCLUDE_JVMTI
16.1 --- a/src/share/vm/oops/instanceKlass.cpp Thu Mar 12 17:47:28 2015 -0400 16.2 +++ b/src/share/vm/oops/instanceKlass.cpp Mon Mar 23 22:46:35 2015 -0400 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it 16.10 @@ -2798,30 +2798,33 @@ 16.11 // not yet in the vtable due to concurrent subclass define and superinterface 16.12 // redefinition 16.13 // Note: those in the vtable, should have been updated via adjust_method_entries 16.14 -void InstanceKlass::adjust_default_methods(Method** old_methods, Method** new_methods, 16.15 - int methods_length, bool* trace_name_printed) { 16.16 +void InstanceKlass::adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed) { 16.17 // search the default_methods for uses of either obsolete or EMCP methods 16.18 if (default_methods() != NULL) { 16.19 - for (int j = 0; j < methods_length; j++) { 16.20 - Method* old_method = old_methods[j]; 16.21 - Method* new_method = new_methods[j]; 16.22 - 16.23 - for (int index = 0; index < default_methods()->length(); index ++) { 16.24 - if (default_methods()->at(index) == old_method) { 16.25 - default_methods()->at_put(index, new_method); 16.26 - if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 16.27 - if (!(*trace_name_printed)) { 16.28 - // RC_TRACE_MESG macro has an embedded ResourceMark 16.29 - RC_TRACE_MESG(("adjust: klassname=%s default methods from name=%s", 16.30 - external_name(), 16.31 - old_method->method_holder()->external_name())); 16.32 - *trace_name_printed = true; 16.33 - } 16.34 - RC_TRACE(0x00100000, ("default method update: %s(%s) ", 16.35 - new_method->name()->as_C_string(), 16.36 - new_method->signature()->as_C_string())); 16.37 - } 16.38 + for (int index = 0; index < default_methods()->length(); index ++) { 16.39 + Method* old_method = default_methods()->at(index); 16.40 + if (old_method == NULL || old_method->method_holder() != holder || !old_method->is_old()) { 16.41 + continue; // skip uninteresting entries 16.42 + } 16.43 + assert(!old_method->is_deleted(), "default methods may not be deleted"); 16.44 + 16.45 + Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum()); 16.46 + 16.47 + assert(new_method != NULL, "method_with_idnum() should not be NULL"); 16.48 + assert(old_method != new_method, "sanity check"); 16.49 + 16.50 + default_methods()->at_put(index, new_method); 16.51 + if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 16.52 + if (!(*trace_name_printed)) { 16.53 + // RC_TRACE_MESG macro has an embedded ResourceMark 16.54 + RC_TRACE_MESG(("adjust: klassname=%s default methods from name=%s", 16.55 + external_name(), 16.56 + old_method->method_holder()->external_name())); 16.57 + *trace_name_printed = true; 16.58 } 16.59 + RC_TRACE(0x00100000, ("default method update: %s(%s) ", 16.60 + new_method->name()->as_C_string(), 16.61 + new_method->signature()->as_C_string())); 16.62 } 16.63 } 16.64 }
17.1 --- a/src/share/vm/oops/instanceKlass.hpp Thu Mar 12 17:47:28 2015 -0400 17.2 +++ b/src/share/vm/oops/instanceKlass.hpp Mon Mar 23 22:46:35 2015 -0400 17.3 @@ -1,5 +1,5 @@ 17.4 /* 17.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 17.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 17.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.8 * 17.9 * This code is free software; you can redistribute it and/or modify it 17.10 @@ -959,8 +959,7 @@ 17.11 Method* method_at_itable(Klass* holder, int index, TRAPS); 17.12 17.13 #if INCLUDE_JVMTI 17.14 - void adjust_default_methods(Method** old_methods, Method** new_methods, 17.15 - int methods_length, bool* trace_name_printed); 17.16 + void adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed); 17.17 #endif // INCLUDE_JVMTI 17.18 17.19 // Garbage collection
18.1 --- a/src/share/vm/oops/klassVtable.cpp Thu Mar 12 17:47:28 2015 -0400 18.2 +++ b/src/share/vm/oops/klassVtable.cpp Mon Mar 23 22:46:35 2015 -0400 18.3 @@ -1,5 +1,5 @@ 18.4 /* 18.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 18.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 18.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.8 * 18.9 * This code is free software; you can redistribute it and/or modify it 18.10 @@ -860,44 +860,43 @@ 18.11 } 18.12 return updated; 18.13 } 18.14 -void klassVtable::adjust_method_entries(Method** old_methods, Method** new_methods, 18.15 - int methods_length, bool * trace_name_printed) { 18.16 - // search the vtable for uses of either obsolete or EMCP methods 18.17 - for (int j = 0; j < methods_length; j++) { 18.18 - Method* old_method = old_methods[j]; 18.19 - Method* new_method = new_methods[j]; 18.20 18.21 - // In the vast majority of cases we could get the vtable index 18.22 - // by using: old_method->vtable_index() 18.23 - // However, there are rare cases, eg. sun.awt.X11.XDecoratedPeer.getX() 18.24 - // in sun.awt.X11.XFramePeer where methods occur more than once in the 18.25 - // vtable, so, alas, we must do an exhaustive search. 18.26 - for (int index = 0; index < length(); index++) { 18.27 - if (unchecked_method_at(index) == old_method) { 18.28 - put_method_at(new_method, index); 18.29 - // For default methods, need to update the _default_methods array 18.30 - // which can only have one method entry for a given signature 18.31 - bool updated_default = false; 18.32 - if (old_method->is_default_method()) { 18.33 - updated_default = adjust_default_method(index, old_method, new_method); 18.34 - } 18.35 +// search the vtable for uses of either obsolete or EMCP methods 18.36 +void klassVtable::adjust_method_entries(InstanceKlass* holder, bool * trace_name_printed) { 18.37 + int prn_enabled = 0; 18.38 + for (int index = 0; index < length(); index++) { 18.39 + Method* old_method = unchecked_method_at(index); 18.40 + if (old_method == NULL || old_method->method_holder() != holder || !old_method->is_old()) { 18.41 + continue; // skip uninteresting entries 18.42 + } 18.43 + assert(!old_method->is_deleted(), "vtable methods may not be deleted"); 18.44 18.45 - if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 18.46 - if (!(*trace_name_printed)) { 18.47 - // RC_TRACE_MESG macro has an embedded ResourceMark 18.48 - RC_TRACE_MESG(("adjust: klassname=%s for methods from name=%s", 18.49 - klass()->external_name(), 18.50 - old_method->method_holder()->external_name())); 18.51 - *trace_name_printed = true; 18.52 - } 18.53 - // RC_TRACE macro has an embedded ResourceMark 18.54 - RC_TRACE(0x00100000, ("vtable method update: %s(%s), updated default = %s", 18.55 - new_method->name()->as_C_string(), 18.56 - new_method->signature()->as_C_string(), 18.57 - updated_default ? "true" : "false")); 18.58 - } 18.59 - // cannot 'break' here; see for-loop comment above. 18.60 + Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum()); 18.61 + 18.62 + assert(new_method != NULL, "method_with_idnum() should not be NULL"); 18.63 + assert(old_method != new_method, "sanity check"); 18.64 + 18.65 + put_method_at(new_method, index); 18.66 + // For default methods, need to update the _default_methods array 18.67 + // which can only have one method entry for a given signature 18.68 + bool updated_default = false; 18.69 + if (old_method->is_default_method()) { 18.70 + updated_default = adjust_default_method(index, old_method, new_method); 18.71 + } 18.72 + 18.73 + if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 18.74 + if (!(*trace_name_printed)) { 18.75 + // RC_TRACE_MESG macro has an embedded ResourceMark 18.76 + RC_TRACE_MESG(("adjust: klassname=%s for methods from name=%s", 18.77 + klass()->external_name(), 18.78 + old_method->method_holder()->external_name())); 18.79 + *trace_name_printed = true; 18.80 } 18.81 + // RC_TRACE macro has an embedded ResourceMark 18.82 + RC_TRACE(0x00100000, ("vtable method update: %s(%s), updated default = %s", 18.83 + new_method->name()->as_C_string(), 18.84 + new_method->signature()->as_C_string(), 18.85 + updated_default ? "true" : "false")); 18.86 } 18.87 } 18.88 } 18.89 @@ -1190,37 +1189,35 @@ 18.90 } 18.91 18.92 #if INCLUDE_JVMTI 18.93 -void klassItable::adjust_method_entries(Method** old_methods, Method** new_methods, 18.94 - int methods_length, bool * trace_name_printed) { 18.95 - // search the itable for uses of either obsolete or EMCP methods 18.96 - for (int j = 0; j < methods_length; j++) { 18.97 - Method* old_method = old_methods[j]; 18.98 - Method* new_method = new_methods[j]; 18.99 - itableMethodEntry* ime = method_entry(0); 18.100 +// search the itable for uses of either obsolete or EMCP methods 18.101 +void klassItable::adjust_method_entries(InstanceKlass* holder, bool * trace_name_printed) { 18.102 18.103 - // The itable can describe more than one interface and the same 18.104 - // method signature can be specified by more than one interface. 18.105 - // This means we have to do an exhaustive search to find all the 18.106 - // old_method references. 18.107 - for (int i = 0; i < _size_method_table; i++) { 18.108 - if (ime->method() == old_method) { 18.109 - ime->initialize(new_method); 18.110 + itableMethodEntry* ime = method_entry(0); 18.111 + for (int i = 0; i < _size_method_table; i++, ime++) { 18.112 + Method* old_method = ime->method(); 18.113 + if (old_method == NULL || old_method->method_holder() != holder || !old_method->is_old()) { 18.114 + continue; // skip uninteresting entries 18.115 + } 18.116 + assert(!old_method->is_deleted(), "itable methods may not be deleted"); 18.117 18.118 - if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 18.119 - if (!(*trace_name_printed)) { 18.120 - // RC_TRACE_MESG macro has an embedded ResourceMark 18.121 - RC_TRACE_MESG(("adjust: name=%s", 18.122 - old_method->method_holder()->external_name())); 18.123 - *trace_name_printed = true; 18.124 - } 18.125 - // RC_TRACE macro has an embedded ResourceMark 18.126 - RC_TRACE(0x00200000, ("itable method update: %s(%s)", 18.127 - new_method->name()->as_C_string(), 18.128 - new_method->signature()->as_C_string())); 18.129 - } 18.130 - // cannot 'break' here; see for-loop comment above. 18.131 + Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum()); 18.132 + 18.133 + assert(new_method != NULL, "method_with_idnum() should not be NULL"); 18.134 + assert(old_method != new_method, "sanity check"); 18.135 + 18.136 + ime->initialize(new_method); 18.137 + 18.138 + if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 18.139 + if (!(*trace_name_printed)) { 18.140 + // RC_TRACE_MESG macro has an embedded ResourceMark 18.141 + RC_TRACE_MESG(("adjust: name=%s", 18.142 + old_method->method_holder()->external_name())); 18.143 + *trace_name_printed = true; 18.144 } 18.145 - ime++; 18.146 + // RC_TRACE macro has an embedded ResourceMark 18.147 + RC_TRACE(0x00200000, ("itable method update: %s(%s)", 18.148 + new_method->name()->as_C_string(), 18.149 + new_method->signature()->as_C_string())); 18.150 } 18.151 } 18.152 }
19.1 --- a/src/share/vm/oops/klassVtable.hpp Thu Mar 12 17:47:28 2015 -0400 19.2 +++ b/src/share/vm/oops/klassVtable.hpp Mon Mar 23 22:46:35 2015 -0400 19.3 @@ -1,5 +1,5 @@ 19.4 /* 19.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 19.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 19.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 * 19.9 * This code is free software; you can redistribute it and/or modify it 19.10 @@ -98,8 +98,7 @@ 19.11 // printed the klass name so that other routines in the adjust_* 19.12 // group don't print the klass name. 19.13 bool adjust_default_method(int vtable_index, Method* old_method, Method* new_method); 19.14 - void adjust_method_entries(Method** old_methods, Method** new_methods, 19.15 - int methods_length, bool * trace_name_printed); 19.16 + void adjust_method_entries(InstanceKlass* holder, bool * trace_name_printed); 19.17 bool check_no_old_or_obsolete_entries(); 19.18 void dump_vtable(); 19.19 #endif // INCLUDE_JVMTI 19.20 @@ -288,8 +287,7 @@ 19.21 // trace_name_printed is set to true if the current call has 19.22 // printed the klass name so that other routines in the adjust_* 19.23 // group don't print the klass name. 19.24 - void adjust_method_entries(Method** old_methods, Method** new_methods, 19.25 - int methods_length, bool * trace_name_printed); 19.26 + void adjust_method_entries(InstanceKlass* holder, bool * trace_name_printed); 19.27 bool check_no_old_or_obsolete_entries(); 19.28 void dump_itable(); 19.29 #endif // INCLUDE_JVMTI
20.1 --- a/src/share/vm/oops/method.cpp Thu Mar 12 17:47:28 2015 -0400 20.2 +++ b/src/share/vm/oops/method.cpp Mon Mar 23 22:46:35 2015 -0400 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -1419,6 +1419,7 @@ 20.11 for (int i = 0; i < length; i++) { 20.12 Method* m = methods->at(i); 20.13 m->set_method_idnum(i); 20.14 + m->set_orig_method_idnum(i); 20.15 } 20.16 } 20.17 }
21.1 --- a/src/share/vm/oops/method.hpp Thu Mar 12 17:47:28 2015 -0400 21.2 +++ b/src/share/vm/oops/method.hpp Mon Mar 23 22:46:35 2015 -0400 21.3 @@ -1,5 +1,5 @@ 21.4 /* 21.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 21.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 21.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.8 * 21.9 * This code is free software; you can redistribute it and/or modify it 21.10 @@ -265,6 +265,9 @@ 21.11 u2 method_idnum() const { return constMethod()->method_idnum(); } 21.12 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } 21.13 21.14 + u2 orig_method_idnum() const { return constMethod()->orig_method_idnum(); } 21.15 + void set_orig_method_idnum(u2 idnum) { constMethod()->set_orig_method_idnum(idnum); } 21.16 + 21.17 // code size 21.18 int code_size() const { return constMethod()->code_size(); } 21.19 21.20 @@ -714,6 +717,8 @@ 21.21 void set_is_old() { _access_flags.set_is_old(); } 21.22 bool is_obsolete() const { return access_flags().is_obsolete(); } 21.23 void set_is_obsolete() { _access_flags.set_is_obsolete(); } 21.24 + bool is_deleted() const { return access_flags().is_deleted(); } 21.25 + void set_is_deleted() { _access_flags.set_is_deleted(); } 21.26 bool on_stack() const { return access_flags().on_stack(); } 21.27 void set_on_stack(const bool value); 21.28
22.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Thu Mar 12 17:47:28 2015 -0400 22.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Mar 23 22:46:35 2015 -0400 22.3 @@ -1,5 +1,5 @@ 22.4 /* 22.5 - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. 22.6 + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. 22.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.8 * 22.9 * This code is free software; you can redistribute it and/or modify it 22.10 @@ -777,9 +777,13 @@ 22.11 Method* idnum_owner = scratch_class->method_with_idnum(old_num); 22.12 if (idnum_owner != NULL) { 22.13 // There is already a method assigned this idnum -- switch them 22.14 + // Take current and original idnum from the new_method 22.15 idnum_owner->set_method_idnum(new_num); 22.16 + idnum_owner->set_orig_method_idnum(k_new_method->orig_method_idnum()); 22.17 } 22.18 + // Take current and original idnum from the old_method 22.19 k_new_method->set_method_idnum(old_num); 22.20 + k_new_method->set_orig_method_idnum(k_old_method->orig_method_idnum()); 22.21 if (thread->has_pending_exception()) { 22.22 return JVMTI_ERROR_OUT_OF_MEMORY; 22.23 } 22.24 @@ -812,9 +816,12 @@ 22.25 Method* idnum_owner = scratch_class->method_with_idnum(num); 22.26 if (idnum_owner != NULL) { 22.27 // There is already a method assigned this idnum -- switch them 22.28 + // Take current and original idnum from the new_method 22.29 idnum_owner->set_method_idnum(new_num); 22.30 + idnum_owner->set_orig_method_idnum(k_new_method->orig_method_idnum()); 22.31 } 22.32 k_new_method->set_method_idnum(num); 22.33 + k_new_method->set_orig_method_idnum(num); 22.34 if (thread->has_pending_exception()) { 22.35 return JVMTI_ERROR_OUT_OF_MEMORY; 22.36 } 22.37 @@ -3322,6 +3329,7 @@ 22.38 // This is a very busy routine. We don't want too much tracing 22.39 // printed out. 22.40 bool trace_name_printed = false; 22.41 + InstanceKlass *the_class = InstanceKlass::cast(_the_class_oop); 22.42 22.43 // Very noisy: only enable this call if you are trying to determine 22.44 // that a specific class gets found by this routine. 22.45 @@ -3333,10 +3341,8 @@ 22.46 // If the class being redefined is java.lang.Object, we need to fix all 22.47 // array class vtables also 22.48 if (k->oop_is_array() && _the_class_oop == SystemDictionary::Object_klass()) { 22.49 - k->vtable()->adjust_method_entries(_matching_old_methods, 22.50 - _matching_new_methods, 22.51 - _matching_methods_length, 22.52 - &trace_name_printed); 22.53 + k->vtable()->adjust_method_entries(the_class, &trace_name_printed); 22.54 + 22.55 } else if (k->oop_is_instance()) { 22.56 HandleMark hm(_thread); 22.57 InstanceKlass *ik = InstanceKlass::cast(k); 22.58 @@ -3376,14 +3382,9 @@ 22.59 || ik->is_subtype_of(_the_class_oop))) { 22.60 // ik->vtable() creates a wrapper object; rm cleans it up 22.61 ResourceMark rm(_thread); 22.62 - ik->vtable()->adjust_method_entries(_matching_old_methods, 22.63 - _matching_new_methods, 22.64 - _matching_methods_length, 22.65 - &trace_name_printed); 22.66 - ik->adjust_default_methods(_matching_old_methods, 22.67 - _matching_new_methods, 22.68 - _matching_methods_length, 22.69 - &trace_name_printed); 22.70 + 22.71 + ik->vtable()->adjust_method_entries(the_class, &trace_name_printed); 22.72 + ik->adjust_default_methods(the_class, &trace_name_printed); 22.73 } 22.74 22.75 // If the current class has an itable and we are either redefining an 22.76 @@ -3396,10 +3397,8 @@ 22.77 || ik->is_subclass_of(_the_class_oop))) { 22.78 // ik->itable() creates a wrapper object; rm cleans it up 22.79 ResourceMark rm(_thread); 22.80 - ik->itable()->adjust_method_entries(_matching_old_methods, 22.81 - _matching_new_methods, 22.82 - _matching_methods_length, 22.83 - &trace_name_printed); 22.84 + 22.85 + ik->itable()->adjust_method_entries(the_class, &trace_name_printed); 22.86 } 22.87 22.88 // The constant pools in other classes (other_cp) can refer to 22.89 @@ -3423,10 +3422,7 @@ 22.90 other_cp = constantPoolHandle(ik->constants()); 22.91 cp_cache = other_cp->cache(); 22.92 if (cp_cache != NULL) { 22.93 - cp_cache->adjust_method_entries(_matching_old_methods, 22.94 - _matching_new_methods, 22.95 - _matching_methods_length, 22.96 - &trace_name_printed); 22.97 + cp_cache->adjust_method_entries(the_class, &trace_name_printed); 22.98 } 22.99 } 22.100 22.101 @@ -3555,6 +3551,7 @@ 22.102 22.103 // obsolete methods need a unique idnum so they become new entries in 22.104 // the jmethodID cache in InstanceKlass 22.105 + assert(old_method->method_idnum() == new_method->method_idnum(), "must match"); 22.106 u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum(); 22.107 if (num != ConstMethod::UNSET_IDNUM) { 22.108 old_method->set_method_idnum(num); 22.109 @@ -3575,7 +3572,8 @@ 22.110 assert(!old_method->has_vtable_index(), 22.111 "cannot delete methods with vtable entries");; 22.112 22.113 - // Mark all deleted methods as old and obsolete 22.114 + // Mark all deleted methods as old, obsolete and deleted 22.115 + old_method->set_is_deleted(); 22.116 old_method->set_is_old(); 22.117 old_method->set_is_obsolete(); 22.118 ++obsolete_count; 22.119 @@ -4164,7 +4162,7 @@ 22.120 no_old_methods = false; 22.121 } 22.122 22.123 - // the constant pool cache should never contain old or obsolete methods 22.124 + // the constant pool cache should never contain non-deleted old or obsolete methods 22.125 if (ik->constants() != NULL && 22.126 ik->constants()->cache() != NULL && 22.127 !ik->constants()->cache()->check_no_old_or_obsolete_entries()) {
23.1 --- a/src/share/vm/runtime/globals.hpp Thu Mar 12 17:47:28 2015 -0400 23.2 +++ b/src/share/vm/runtime/globals.hpp Mon Mar 23 22:46:35 2015 -0400 23.3 @@ -2048,9 +2048,6 @@ 23.4 "Provide more detailed and expensive TLAB statistics " \ 23.5 "(with PrintTLAB)") \ 23.6 \ 23.7 - EMBEDDED_ONLY(product(bool, LowMemoryProtection, true, \ 23.8 - "Enable LowMemoryProtection")) \ 23.9 - \ 23.10 product_pd(bool, NeverActAsServerClassMachine, \ 23.11 "Never act like a server-class machine") \ 23.12 \
24.1 --- a/src/share/vm/runtime/os.hpp Thu Mar 12 17:47:28 2015 -0400 24.2 +++ b/src/share/vm/runtime/os.hpp Mon Mar 23 22:46:35 2015 -0400 24.3 @@ -159,7 +159,6 @@ 24.4 static void init_globals(void) { // Called from init_globals() in init.cpp 24.5 init_globals_ext(); 24.6 } 24.7 - static void init_3(void); // Called at the end of vm init 24.8 24.9 // File names are case-insensitive on windows only 24.10 // Override me as needed
25.1 --- a/src/share/vm/runtime/thread.cpp Thu Mar 12 17:47:28 2015 -0400 25.2 +++ b/src/share/vm/runtime/thread.cpp Mon Mar 23 22:46:35 2015 -0400 25.3 @@ -3690,9 +3690,6 @@ 25.4 } 25.5 } 25.6 25.7 - // Give os specific code one last chance to start 25.8 - os::init_3(); 25.9 - 25.10 create_vm_timer.end(); 25.11 #ifdef ASSERT 25.12 _vm_complete = true;
26.1 --- a/src/share/vm/services/management.cpp Thu Mar 12 17:47:28 2015 -0400 26.2 +++ b/src/share/vm/services/management.cpp Mon Mar 23 22:46:35 2015 -0400 26.3 @@ -155,11 +155,14 @@ 26.4 // Load and initialize the sun.management.Agent class 26.5 // invoke startAgent method to start the management server 26.6 Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); 26.7 - Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), 26.8 + Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_management_Agent(), 26.9 loader, 26.10 Handle(), 26.11 - true, 26.12 - CHECK); 26.13 + THREAD); 26.14 + if (k == NULL) { 26.15 + vm_exit_during_initialization("Management agent initialization failure: " 26.16 + "class sun.management.Agent not found."); 26.17 + } 26.18 instanceKlassHandle ik (THREAD, k); 26.19 26.20 JavaValue result(T_VOID);
27.1 --- a/src/share/vm/utilities/accessFlags.hpp Thu Mar 12 17:47:28 2015 -0400 27.2 +++ b/src/share/vm/utilities/accessFlags.hpp Mon Mar 23 22:46:35 2015 -0400 27.3 @@ -1,5 +1,5 @@ 27.4 /* 27.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 27.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 27.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.8 * 27.9 * This code is free software; you can redistribute it and/or modify it 27.10 @@ -54,7 +54,8 @@ 27.11 JVM_ACC_IS_OLD = 0x00010000, // RedefineClasses() has replaced this method 27.12 JVM_ACC_IS_OBSOLETE = 0x00020000, // RedefineClasses() has made method obsolete 27.13 JVM_ACC_IS_PREFIXED_NATIVE = 0x00040000, // JVMTI has prefixed this native method 27.14 - JVM_ACC_ON_STACK = 0x00080000, // RedefinedClasses() is used on the stack 27.15 + JVM_ACC_ON_STACK = 0x00080000, // RedefineClasses() was used on the stack 27.16 + JVM_ACC_IS_DELETED = 0x00008000, // RedefineClasses() has deleted this method 27.17 27.18 // Klass* flags 27.19 JVM_ACC_HAS_MIRANDA_METHODS = 0x10000000, // True if this class has miranda methods in it's vtable 27.20 @@ -131,6 +132,7 @@ 27.21 bool has_jsrs () const { return (_flags & JVM_ACC_HAS_JSRS ) != 0; } 27.22 bool is_old () const { return (_flags & JVM_ACC_IS_OLD ) != 0; } 27.23 bool is_obsolete () const { return (_flags & JVM_ACC_IS_OBSOLETE ) != 0; } 27.24 + bool is_deleted () const { return (_flags & JVM_ACC_IS_DELETED ) != 0; } 27.25 bool is_prefixed_native () const { return (_flags & JVM_ACC_IS_PREFIXED_NATIVE ) != 0; } 27.26 27.27 // Klass* flags 27.28 @@ -196,6 +198,7 @@ 27.29 void set_has_jsrs() { atomic_set_bits(JVM_ACC_HAS_JSRS); } 27.30 void set_is_old() { atomic_set_bits(JVM_ACC_IS_OLD); } 27.31 void set_is_obsolete() { atomic_set_bits(JVM_ACC_IS_OBSOLETE); } 27.32 + void set_is_deleted() { atomic_set_bits(JVM_ACC_IS_DELETED); } 27.33 void set_is_prefixed_native() { atomic_set_bits(JVM_ACC_IS_PREFIXED_NATIVE); } 27.34 27.35 void clear_not_c1_compilable() { atomic_clear_bits(JVM_ACC_NOT_C1_COMPILABLE); }
28.1 --- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Thu Mar 12 17:47:28 2015 -0400 28.2 +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Mon Mar 23 22:46:35 2015 -0400 28.3 @@ -44,14 +44,6 @@ 28.4 #endif // SOLARIS 28.5 28.6 #include <math.h> 28.7 -#ifndef FP_PZERO 28.8 -// Linux doesn't have positive/negative zero 28.9 -#define FP_PZERO FP_ZERO 28.10 -#endif 28.11 -#if (!defined fpclass) && ((!defined SPARC) || (!defined SOLARIS)) 28.12 -#define fpclass fpclassify 28.13 -#endif 28.14 - 28.15 #include <time.h> 28.16 #include <fcntl.h> 28.17 #include <dlfcn.h>
29.1 --- a/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp Thu Mar 12 17:47:28 2015 -0400 29.2 +++ b/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp Mon Mar 23 22:46:35 2015 -0400 29.3 @@ -48,15 +48,6 @@ 29.4 # include <ieeefp.h> 29.5 #endif 29.6 # include <math.h> 29.7 -#ifdef LINUX 29.8 -#ifndef FP_PZERO 29.9 - // Linux doesn't have positive/negative zero 29.10 - #define FP_PZERO FP_ZERO 29.11 -#endif 29.12 -#ifndef fpclass 29.13 - #define fpclass fpclassify 29.14 -#endif 29.15 -#endif 29.16 # include <time.h> 29.17 # include <fcntl.h> 29.18 # include <dlfcn.h>
30.1 --- a/src/share/vm/utilities/globalDefinitions_xlc.hpp Thu Mar 12 17:47:28 2015 -0400 30.2 +++ b/src/share/vm/utilities/globalDefinitions_xlc.hpp Mon Mar 23 22:46:35 2015 -0400 30.3 @@ -41,14 +41,6 @@ 30.4 #include <wchar.h> 30.5 30.6 #include <math.h> 30.7 -#ifndef FP_PZERO 30.8 -// Linux doesn't have positive/negative zero 30.9 -#define FP_PZERO FP_ZERO 30.10 -#endif 30.11 -#if (!defined fpclass) 30.12 -#define fpclass fpclassify 30.13 -#endif 30.14 - 30.15 #include <time.h> 30.16 #include <fcntl.h> 30.17 #include <dlfcn.h>
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 31.2 +++ b/test/compiler/loopopts/ConstFPVectorization.java Mon Mar 23 22:46:35 2015 -0400 31.3 @@ -0,0 +1,63 @@ 31.4 +/* 31.5 + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 31.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 31.7 + * 31.8 + * This code is free software; you can redistribute it and/or modify it 31.9 + * under the terms of the GNU General Public License version 2 only, as 31.10 + * published by the Free Software Foundation. 31.11 + * 31.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 31.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 31.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 31.15 + * version 2 for more details (a copy is included in the LICENSE file that 31.16 + * accompanied this code). 31.17 + * 31.18 + * You should have received a copy of the GNU General Public License version 31.19 + * 2 along with this work; if not, write to the Free Software Foundation, 31.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 31.21 + * 31.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 31.23 + * or visit www.oracle.com if you need additional information or have any 31.24 + * questions. 31.25 + * 31.26 + */ 31.27 + 31.28 +/** 31.29 + * @test 31.30 + * @bug 8074869 31.31 + * @summary C2 code generator can replace -0.0f with +0.0f on Linux 31.32 + * @run main ConstFPVectorization 8 31.33 + * @author volker.simonis@gmail.com 31.34 + * 31.35 + */ 31.36 + 31.37 +public class ConstFPVectorization { 31.38 + 31.39 + static float[] f = new float[16]; 31.40 + static double[] d = new double[16]; 31.41 + 31.42 + static void floatLoop(int count) { 31.43 + for (int i = 0; i < count; i++) { 31.44 + f[i] = -0.0f; 31.45 + } 31.46 + } 31.47 + 31.48 + static void doubleLoop(int count) { 31.49 + for (int i = 0; i < count; i++) { 31.50 + d[i] = -0.0d; 31.51 + } 31.52 + } 31.53 + 31.54 + public static void main(String args[]) { 31.55 + for (int i = 0; i < 10_000; i++) { 31.56 + floatLoop(Integer.parseInt(args[0])); 31.57 + doubleLoop(Integer.parseInt(args[0])); 31.58 + } 31.59 + for (int i = 0; i < Integer.parseInt(args[0]); i++) { 31.60 + if (Float.floatToRawIntBits(f[i]) != Float.floatToRawIntBits(-0.0f)) 31.61 + throw new Error("Float error at index " + i); 31.62 + if (Double.doubleToRawLongBits(d[i]) != Double.doubleToRawLongBits(-0.0d)) 31.63 + throw new Error("Double error at index " + i); 31.64 + } 31.65 + } 31.66 +}