From 521bc9973e449dd60debaf5ce3a73352e6cfa19f Mon Sep 17 00:00:00 2001 From: Yong Jeffrey Huang Date: Thu, 2 Jul 2009 20:17:59 -0700 Subject: [PATCH 01/74] 6606396: Notepad and Stylepad demos don't run in Japanese locale Reviewed-by: peytoia, ogino --- .../Notepad/resources/Notepad_ja.properties | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties b/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties index 2999cd757cc..0ec7ce0fcf5 100644 --- a/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties +++ b/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties @@ -9,7 +9,7 @@ ViewportBackingStore=false # # Each of the strings that follow form a key to be # used to the actual menu definition. -menubar=\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u30c7\u30d0\u30c3\u30b0 +menubar=file edit debug # file Menu definition # @@ -20,15 +20,15 @@ menubar=\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u30c7\u30d0\u30c3\u30b0 # new -> Notepad.newAction # save -> Notepad.saveAction # exit -> Notepad.exitAction -file=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u7d42\u4e86 -fileLabel=\u30d5\u30a1\u30a4\u30eb (F) +file=new open save - exit +fileLabel=\u30d5\u30a1\u30a4\u30eb openLabel=\u958b\u304f openImage=resources/open.gif newLabel=\u65b0\u898f newImage=resources/new.gif saveLabel=\u4fdd\u5b58 saveImage=resources/save.gif -exitLabel=\u7d42\u4e86 (X) +exitLabel=\u7d42\u4e86 # # edit Menu definition @@ -36,26 +36,26 @@ exitLabel=\u7d42\u4e86 (X) # cut -> JTextComponent.cutAction # copy -> JTextComponent.copyAction # paste -> JTextComponent.pasteAction -edit=\u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8 - \u5143\u306b\u623b\u3059 \u518d\u5b9f\u884c +edit=cut copy paste - undo redo editLabel=\u7de8\u96c6 -cutLabel=Cut +cutLabel=\u30ab\u30c3\u30c8 cutAction=cut-to-clipboard cutImage=resources/cut.gif -copyLabel=Copy -copyAction=cut-to-clipboard +copyLabel=\u30b3\u30d4\u30fc +copyAction=copy-to-clipboard copyImage=resources/copy.gif -pasteLabel=Paste +pasteLabel=\u30da\u30fc\u30b9\u30c8 pasteAction=paste-from-clipboard pasteImage=resources/paste.gif undoLabel=\u5143\u306b\u623b\u3059 -undoAction=\u5143\u306b\u623b\u3059 +undoAction=Undo redoLabel=\u518d\u5b9f\u884c -redoAction=\u518d\u5b9f\u884c +redoAction=Redo # # debug Menu definition # -debug=showElementTree \u306e\u30c0\u30f3\u30d7 +debug=dump showElementTree debugLabel=\u30c7\u30d0\u30c3\u30b0 dumpLabel=\u30e2\u30c7\u30eb\u3092 System.err \u306b\u30c0\u30f3\u30d7 dumpAction=dump-model @@ -67,7 +67,7 @@ showElementTreeLabel=\u8981\u7d20\u3092\u8868\u793a # used as the basis of the tool definition. Actions # are of course sharable, and in this case are shared # with the menu items. -toolbar=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8 +toolbar=new open save - cut copy paste newTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b openTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f saveTooltip=\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58 From 5a409d142f945f06bb87ed4c1e6140c59d9f6760 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Mon, 13 Jul 2009 14:58:17 -0700 Subject: [PATCH 02/74] 6859338: amd64 native unverified entry point pushes values before implicit null check Reviewed-by: kvn, twisti --- .../src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 9 ++-- .../test/compiler/6859338/Test6859338.java | 51 +++++++++++++++++++ 2 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 hotspot/test/compiler/6859338/Test6859338.java diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index 57fa4a480ca..68cb61979db 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -1302,22 +1302,19 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, const Register ic_reg = rax; const Register receiver = j_rarg0; - const Register tmp = rdx; Label ok; Label exception_pending; + assert_different_registers(ic_reg, receiver, rscratch1); __ verify_oop(receiver); - __ push(tmp); // spill (any other registers free here???) - __ load_klass(tmp, receiver); - __ cmpq(ic_reg, tmp); + __ load_klass(rscratch1, receiver); + __ cmpq(ic_reg, rscratch1); __ jcc(Assembler::equal, ok); - __ pop(tmp); __ jump(RuntimeAddress(SharedRuntime::get_ic_miss_stub())); __ bind(ok); - __ pop(tmp); // Verified entry point must be aligned __ align(8); diff --git a/hotspot/test/compiler/6859338/Test6859338.java b/hotspot/test/compiler/6859338/Test6859338.java new file mode 100644 index 00000000000..f54e4222a0f --- /dev/null +++ b/hotspot/test/compiler/6859338/Test6859338.java @@ -0,0 +1,51 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +/** + * @test + * @bug 6859338 + * @summary Assertion failure in sharedRuntime.cpp + * + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-InlineObjectHash -Xbatch -XX:-ProfileInterpreter Test6859338 + */ + +public class Test6859338 { + static Object[] o = new Object[] { new Object(), null }; + public static void main(String[] args) { + int total = 0; + try { + // Exercise the implicit null check in the unverified entry point + for (int i = 0; i < 40000; i++) { + int limit = o.length; + if (i < 20000) limit = 1; + for (int j = 0; j < limit; j++) { + total += o[j].hashCode(); + } + } + + } catch (NullPointerException e) { + // this is expected. A true failure causes a crash + } + } +} From 075c1335cb63e77ab302f7c6b620bd6eb68a8b4f Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Tue, 14 Jul 2009 15:40:39 -0700 Subject: [PATCH 03/74] 6700789: G1: Enable use of compressed oops with G1 heaps Modifications to G1 so as to allow the use of compressed oops. Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp --- hotspot/src/cpu/sparc/vm/assembler_sparc.cpp | 7 +- hotspot/src/cpu/x86/vm/assembler_x86.cpp | 13 +- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 4 +- .../src/cpu/x86/vm/stubGenerator_x86_32.cpp | 3 +- .../src/cpu/x86/vm/stubGenerator_x86_64.cpp | 10 +- .../g1/bufferingOopClosure.hpp | 90 +- .../gc_implementation/g1/concurrentMark.cpp | 134 +-- .../gc_implementation/g1/concurrentMark.hpp | 1 + .../g1/g1BlockOffsetTable.cpp | 4 +- .../g1/g1BlockOffsetTable.inline.hpp | 6 +- .../gc_implementation/g1/g1CollectedHeap.cpp | 820 +++--------------- .../gc_implementation/g1/g1CollectedHeap.hpp | 556 +++++++++++- .../g1/g1CollectorPolicy.cpp | 4 - .../vm/gc_implementation/g1/g1OopClosures.hpp | 81 +- .../g1/g1OopClosures.inline.hpp | 92 +- .../vm/gc_implementation/g1/g1RemSet.cpp | 56 +- .../vm/gc_implementation/g1/g1RemSet.hpp | 60 +- .../gc_implementation/g1/g1RemSet.inline.hpp | 20 +- .../g1/g1SATBCardTableModRefBS.cpp | 34 +- .../g1/g1SATBCardTableModRefBS.hpp | 34 +- .../vm/gc_implementation/g1/g1_globals.hpp | 3 - .../g1/g1_specialized_oop_closures.hpp | 7 +- .../vm/gc_implementation/g1/heapRegion.cpp | 33 +- .../gc_implementation/g1/heapRegionRemSet.cpp | 61 +- .../gc_implementation/g1/heapRegionRemSet.hpp | 24 +- .../vm/gc_implementation/g1/satbQueue.cpp | 15 +- .../vm/gc_implementation/g1/satbQueue.hpp | 1 + .../vm/gc_implementation/includeDB_gc_g1 | 8 +- .../parNew/parCardTableModRefBS.cpp | 7 +- .../parallelScavenge/parallelScavengeHeap.cpp | 2 +- .../parallelScavenge/parallelScavengeHeap.hpp | 2 +- .../psPromotionManager.inline.hpp | 1 + .../share/vm/gc_interface/collectedHeap.hpp | 2 +- hotspot/src/share/vm/includeDB_core | 14 +- hotspot/src/share/vm/includeDB_features | 6 +- hotspot/src/share/vm/memory/barrierSet.cpp | 23 +- hotspot/src/share/vm/memory/barrierSet.hpp | 15 +- .../src/share/vm/memory/barrierSet.inline.hpp | 4 +- .../src/share/vm/memory/cardTableModRefBS.hpp | 8 +- .../src/share/vm/memory/genCollectedHeap.cpp | 2 +- .../src/share/vm/memory/genCollectedHeap.hpp | 2 +- .../src/share/vm/memory/genOopClosures.hpp | 2 +- .../share/vm/memory/genOopClosures.inline.hpp | 12 +- .../share/vm/memory/referenceProcessor.cpp | 27 +- hotspot/src/share/vm/memory/space.hpp | 1 + hotspot/src/share/vm/memory/universe.cpp | 4 +- hotspot/src/share/vm/memory/universe.hpp | 2 +- .../src/share/vm/oops/instanceRefKlass.cpp | 15 +- hotspot/src/share/vm/oops/objArrayKlass.cpp | 8 +- hotspot/src/share/vm/oops/oop.inline.hpp | 10 +- hotspot/src/share/vm/oops/oopsHierarchy.hpp | 1 + hotspot/src/share/vm/opto/cfgnode.cpp | 2 +- hotspot/src/share/vm/prims/unsafe.cpp | 6 +- hotspot/src/share/vm/runtime/arguments.cpp | 29 +- hotspot/src/share/vm/runtime/safepoint.cpp | 4 +- .../src/share/vm/runtime/sharedRuntime.cpp | 1 + hotspot/src/share/vm/utilities/taskqueue.cpp | 5 + hotspot/src/share/vm/utilities/taskqueue.hpp | 10 +- 58 files changed, 1233 insertions(+), 1175 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp index f2d58782aab..b53cc4f737a 100644 --- a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp @@ -4208,6 +4208,7 @@ void MacroAssembler::g1_write_barrier_pre(Register obj, Register index, int offs PtrQueue::byte_offset_of_active()), tmp); } + // Check on whether to annul. br_on_reg_cond(rc_z, /*annul*/false, Assembler::pt, tmp, filtered); delayed() -> nop(); @@ -4215,13 +4216,13 @@ void MacroAssembler::g1_write_barrier_pre(Register obj, Register index, int offs // satb_log_barrier_work1(tmp, offset); if (index == noreg) { if (Assembler::is_simm13(offset)) { - ld_ptr(obj, offset, tmp); + load_heap_oop(obj, offset, tmp); } else { set(offset, tmp); - ld_ptr(obj, tmp, tmp); + load_heap_oop(obj, tmp, tmp); } } else { - ld_ptr(obj, index, tmp); + load_heap_oop(obj, index, tmp); } // satb_log_barrier_work2(obj, tmp, offset); diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index 174e542e396..4a67b42b2d1 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -6805,14 +6805,18 @@ void MacroAssembler::g1_write_barrier_pre(Register obj, jcc(Assembler::equal, done); // if (x.f == NULL) goto done; - cmpptr(Address(obj, 0), NULL_WORD); +#ifdef _LP64 + load_heap_oop(tmp2, Address(obj, 0)); +#else + movptr(tmp2, Address(obj, 0)); +#endif + cmpptr(tmp2, (int32_t) NULL_WORD); jcc(Assembler::equal, done); // Can we store original value in the thread's buffer? - LP64_ONLY(movslq(tmp, index);) - movptr(tmp2, Address(obj, 0)); #ifdef _LP64 + movslq(tmp, index); cmpq(tmp, 0); #else cmpl(index, 0); @@ -6834,8 +6838,7 @@ void MacroAssembler::g1_write_barrier_pre(Register obj, if(tosca_live) push(rax); push(obj); #ifdef _LP64 - movq(c_rarg0, Address(obj, 0)); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), c_rarg0, r15_thread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, r15_thread); #else push(thread); call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, thread); diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index 24210bf5dfe..a45af4ad321 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -269,11 +269,11 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm, #ifndef PRODUCT void trace_method_handle_stub(const char* adaptername, - oop mh, + oopDesc* mh, intptr_t* entry_sp, intptr_t* saved_sp) { // called as a leaf from native code: do not block the JVM! - printf("MH %s "PTR_FORMAT" "PTR_FORMAT" "INTX_FORMAT"\n", adaptername, mh, entry_sp, entry_sp - saved_sp); + printf("MH %s "PTR_FORMAT" "PTR_FORMAT" "INTX_FORMAT"\n", adaptername, (void*)mh, entry_sp, entry_sp - saved_sp); } #endif //PRODUCT diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp index e38fc1d0f1d..3d6ca91a0ea 100644 --- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp @@ -709,7 +709,7 @@ class StubGenerator: public StubCodeGenerator { // // Input: // start - starting address - // end - element count + // count - element count void gen_write_ref_array_pre_barrier(Register start, Register count) { assert_different_registers(start, count); BarrierSet* bs = Universe::heap()->barrier_set(); @@ -757,7 +757,6 @@ class StubGenerator: public StubCodeGenerator { __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post))); __ addptr(rsp, 2*wordSize); __ popa(); - } break; diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp index ec322b527d1..6b0731490fd 100644 --- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp @@ -1207,9 +1207,9 @@ class StubGenerator: public StubCodeGenerator { __ pusha(); // push registers (overkill) // must compute element count unless barrier set interface is changed (other platforms supply count) assert_different_registers(start, end, scratch); - __ lea(scratch, Address(end, wordSize)); - __ subptr(scratch, start); - __ shrptr(scratch, LogBytesPerWord); + __ lea(scratch, Address(end, BytesPerHeapOop)); + __ subptr(scratch, start); // subtract start to get #bytes + __ shrptr(scratch, LogBytesPerHeapOop); // convert to element count __ mov(c_rarg0, start); __ mov(c_rarg1, scratch); __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post))); @@ -1225,6 +1225,7 @@ class StubGenerator: public StubCodeGenerator { Label L_loop; __ shrptr(start, CardTableModRefBS::card_shift); + __ addptr(end, BytesPerHeapOop); __ shrptr(end, CardTableModRefBS::card_shift); __ subptr(end, start); // number of bytes to copy @@ -2251,6 +2252,7 @@ class StubGenerator: public StubCodeGenerator { // and report their number to the caller. assert_different_registers(rax, r14_length, count, to, end_to, rcx); __ lea(end_to, to_element_addr); + __ addptr(end_to, -heapOopSize); // make an inclusive end pointer gen_write_ref_array_post_barrier(to, end_to, rscratch1); __ movptr(rax, r14_length); // original oops __ addptr(rax, count); // K = (original - remaining) oops @@ -2259,7 +2261,7 @@ class StubGenerator: public StubCodeGenerator { // Come here on success only. __ BIND(L_do_card_marks); - __ addptr(end_to, -wordSize); // make an inclusive end pointer + __ addptr(end_to, -heapOopSize); // make an inclusive end pointer gen_write_ref_array_post_barrier(to, end_to, rscratch1); __ xorptr(rax, rax); // return 0 on success diff --git a/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp b/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp index 1124e5d799f..b9283bd57db 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/bufferingOopClosure.hpp @@ -42,35 +42,40 @@ protected: BufferLength = 1024 }; - oop *_buffer[BufferLength]; - oop **_buffer_top; - oop **_buffer_curr; + StarTask _buffer[BufferLength]; + StarTask* _buffer_top; + StarTask* _buffer_curr; - OopClosure *_oc; - double _closure_app_seconds; + OopClosure* _oc; + double _closure_app_seconds; void process_buffer () { - double start = os::elapsedTime(); - for (oop **curr = _buffer; curr < _buffer_curr; ++curr) { - _oc->do_oop(*curr); + for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) { + if (curr->is_narrow()) { + assert(UseCompressedOops, "Error"); + _oc->do_oop((narrowOop*)(*curr)); + } else { + _oc->do_oop((oop*)(*curr)); + } } _buffer_curr = _buffer; _closure_app_seconds += (os::elapsedTime() - start); } -public: - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - virtual void do_oop(oop *p) { + template inline void do_oop_work(T* p) { if (_buffer_curr == _buffer_top) { process_buffer(); } - - *_buffer_curr = p; + StarTask new_ref(p); + *_buffer_curr = new_ref; ++_buffer_curr; } + +public: + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop(oop* p) { do_oop_work(p); } + void done () { if (_buffer_curr > _buffer) { process_buffer(); @@ -88,18 +93,17 @@ public: class BufferingOopsInGenClosure: public OopsInGenClosure { BufferingOopClosure _boc; OopsInGenClosure* _oc; -public: + protected: + template inline void do_oop_work(T* p) { + assert(generation()->is_in_reserved((void*)p), "Must be in!"); + _boc.do_oop(p); + } + public: BufferingOopsInGenClosure(OopsInGenClosure *oc) : _boc(oc), _oc(oc) {} - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - - virtual void do_oop(oop* p) { - assert(generation()->is_in_reserved(p), "Must be in!"); - _boc.do_oop(p); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop(oop* p) { do_oop_work(p); } void done() { _boc.done(); @@ -130,14 +134,14 @@ private: BufferLength = 1024 }; - oop *_buffer[BufferLength]; - oop **_buffer_top; - oop **_buffer_curr; + StarTask _buffer[BufferLength]; + StarTask* _buffer_top; + StarTask* _buffer_curr; - HeapRegion *_hr_buffer[BufferLength]; - HeapRegion **_hr_curr; + HeapRegion* _hr_buffer[BufferLength]; + HeapRegion** _hr_curr; - OopsInHeapRegionClosure *_oc; + OopsInHeapRegionClosure* _oc; double _closure_app_seconds; void process_buffer () { @@ -146,15 +150,20 @@ private: "the two lengths should be the same"); double start = os::elapsedTime(); - HeapRegion **hr_curr = _hr_buffer; - HeapRegion *hr_prev = NULL; - for (oop **curr = _buffer; curr < _buffer_curr; ++curr) { - HeapRegion *region = *hr_curr; + HeapRegion** hr_curr = _hr_buffer; + HeapRegion* hr_prev = NULL; + for (StarTask* curr = _buffer; curr < _buffer_curr; ++curr) { + HeapRegion* region = *hr_curr; if (region != hr_prev) { _oc->set_region(region); hr_prev = region; } - _oc->do_oop(*curr); + if (curr->is_narrow()) { + assert(UseCompressedOops, "Error"); + _oc->do_oop((narrowOop*)(*curr)); + } else { + _oc->do_oop((oop*)(*curr)); + } ++hr_curr; } _buffer_curr = _buffer; @@ -163,17 +172,16 @@ private: } public: - virtual void do_oop(narrowOop *p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - virtual void do_oop(oop *p) { + template void do_oop_work(T* p) { if (_buffer_curr == _buffer_top) { assert(_hr_curr > _hr_buffer, "_hr_curr should be consistent with _buffer_curr"); process_buffer(); } - - *_buffer_curr = p; + StarTask new_ref(p); + *_buffer_curr = new_ref; ++_buffer_curr; *_hr_curr = _from; ++_hr_curr; diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 20f001d7758..b19b457d0a3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -452,13 +452,10 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs, _regionStack.allocate(G1MarkRegionStackSize); // Create & start a ConcurrentMark thread. - if (G1ConcMark) { - _cmThread = new ConcurrentMarkThread(this); - assert(cmThread() != NULL, "CM Thread should have been created"); - assert(cmThread()->cm() != NULL, "CM Thread should refer to this cm"); - } else { - _cmThread = NULL; - } + _cmThread = new ConcurrentMarkThread(this); + assert(cmThread() != NULL, "CM Thread should have been created"); + assert(cmThread()->cm() != NULL, "CM Thread should refer to this cm"); + _g1h = G1CollectedHeap::heap(); assert(CGC_lock != NULL, "Where's the CGC_lock?"); assert(_markBitMap1.covers(rs), "_markBitMap1 inconsistency"); @@ -783,18 +780,18 @@ public: bool do_barrier) : _cm(cm), _g1h(g1h), _do_barrier(do_barrier) { } - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - virtual void do_oop(oop* p) { - oop thisOop = *p; - if (thisOop != NULL) { - assert(thisOop->is_oop() || thisOop->mark() == NULL, + template void do_oop_work(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); + assert(obj->is_oop() || obj->mark() == NULL, "expected an oop, possibly with mark word displaced"); - HeapWord* addr = (HeapWord*)thisOop; + HeapWord* addr = (HeapWord*)obj; if (_g1h->is_in_g1_reserved(addr)) { - _cm->grayRoot(thisOop); + _cm->grayRoot(obj); } } if (_do_barrier) { @@ -850,16 +847,6 @@ void ConcurrentMark::checkpointRootsInitial() { double start = os::elapsedTime(); GCOverheadReporter::recordSTWStart(start); - // If there has not been a GC[n-1] since last GC[n] cycle completed, - // precede our marking with a collection of all - // younger generations to keep floating garbage to a minimum. - // YSR: we won't do this for now -- it's an optimization to be - // done post-beta. - - // YSR: ignoring weak refs for now; will do at bug fixing stage - // EVM: assert(discoveredRefsAreClear()); - - G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy(); g1p->record_concurrent_mark_init_start(); checkpointRootsInitialPre(); @@ -1135,6 +1122,13 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) { return; } + if (VerifyDuringGC) { + HandleMark hm; // handle scope + gclog_or_tty->print(" VerifyDuringGC:(before)"); + Universe::heap()->prepare_for_verify(); + Universe::verify(true, false, true); + } + G1CollectorPolicy* g1p = g1h->g1_policy(); g1p->record_concurrent_mark_remark_start(); @@ -1159,10 +1153,12 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) { JavaThread::satb_mark_queue_set().set_active_all_threads(false); if (VerifyDuringGC) { - g1h->prepare_for_verify(); - g1h->verify(/* allow_dirty */ true, - /* silent */ false, - /* use_prev_marking */ false); + HandleMark hm; // handle scope + gclog_or_tty->print(" VerifyDuringGC:(after)"); + Universe::heap()->prepare_for_verify(); + Universe::heap()->verify(/* allow_dirty */ true, + /* silent */ false, + /* use_prev_marking */ false); } } @@ -1658,6 +1654,15 @@ void ConcurrentMark::cleanup() { return; } + if (VerifyDuringGC) { + HandleMark hm; // handle scope + gclog_or_tty->print(" VerifyDuringGC:(before)"); + Universe::heap()->prepare_for_verify(); + Universe::verify(/* allow dirty */ true, + /* silent */ false, + /* prev marking */ true); + } + _cleanup_co_tracker.disable(); G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy(); @@ -1790,10 +1795,12 @@ void ConcurrentMark::cleanup() { g1h->increment_total_collections(); if (VerifyDuringGC) { - g1h->prepare_for_verify(); - g1h->verify(/* allow_dirty */ true, - /* silent */ false, - /* use_prev_marking */ true); + HandleMark hm; // handle scope + gclog_or_tty->print(" VerifyDuringGC:(after)"); + Universe::heap()->prepare_for_verify(); + Universe::verify(/* allow dirty */ true, + /* silent */ false, + /* prev marking */ true); } } @@ -1852,12 +1859,11 @@ class G1CMKeepAliveClosure: public OopClosure { _g1(g1), _cm(cm), _bitMap(bitMap) {} - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - void do_oop(oop* p) { - oop thisOop = *p; + template void do_oop_work(T* p) { + oop thisOop = oopDesc::load_decode_heap_oop(p); HeapWord* addr = (HeapWord*)thisOop; if (_g1->is_in_g1_reserved(addr) && _g1->is_obj_ill(thisOop)) { _bitMap->mark(addr); @@ -2016,12 +2022,11 @@ public: ReachablePrinterOopClosure(CMBitMapRO* bitmap, outputStream* out) : _bitmap(bitmap), _g1h(G1CollectedHeap::heap()), _out(out) { } - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + void do_oop(narrowOop* p) { do_oop_work(p); } + void do_oop( oop* p) { do_oop_work(p); } - void do_oop(oop* p) { - oop obj = *p; + template void do_oop_work(T* p) { + oop obj = oopDesc::load_decode_heap_oop(p); const char* str = NULL; const char* str2 = ""; @@ -2163,6 +2168,7 @@ void ConcurrentMark::deal_with_reference(oop obj) { HeapWord* objAddr = (HeapWord*) obj; + assert(obj->is_oop_or_null(true /* ignore mark word */), "Error"); if (_g1h->is_in_g1_reserved(objAddr)) { tmp_guarantee_CM( obj != NULL, "is_in_g1_reserved should ensure this" ); HeapRegion* hr = _g1h->heap_region_containing(obj); @@ -2380,7 +2386,7 @@ class CSMarkOopClosure: public OopClosure { } } - bool drain() { + template bool drain() { while (_ms_ind > 0) { oop obj = pop(); assert(obj != NULL, "Since index was non-zero."); @@ -2394,9 +2400,8 @@ class CSMarkOopClosure: public OopClosure { } // Now process this portion of this one. int lim = MIN2(next_arr_ind, len); - assert(!UseCompressedOops, "This needs to be fixed"); for (int j = arr_ind; j < lim; j++) { - do_oop(aobj->obj_at_addr(j)); + do_oop(aobj->obj_at_addr(j)); } } else { @@ -2423,13 +2428,13 @@ public: FREE_C_HEAP_ARRAY(jint, _array_ind_stack); } - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - void do_oop(oop* p) { - oop obj = *p; - if (obj == NULL) return; + template void do_oop_work(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (oopDesc::is_null(heap_oop)) return; + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); if (obj->is_forwarded()) { // If the object has already been forwarded, we have to make sure // that it's marked. So follow the forwarding pointer. Note that @@ -2478,7 +2483,11 @@ public: oop obj = oop(addr); if (!obj->is_forwarded()) { if (!_oop_cl.push(obj)) return false; - if (!_oop_cl.drain()) return false; + if (UseCompressedOops) { + if (!_oop_cl.drain()) return false; + } else { + if (!_oop_cl.drain()) return false; + } } // Otherwise... return true; @@ -2636,9 +2645,6 @@ void ConcurrentMark::disable_co_trackers() { // abandon current marking iteration due to a Full GC void ConcurrentMark::abort() { - // If we're not marking, nothing to do. - if (!G1ConcMark) return; - // Clear all marks to force marking thread to do nothing _nextMarkBitMap->clearAll(); // Empty mark stack @@ -2814,14 +2820,14 @@ private: CMTask* _task; public: - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - void do_oop(oop* p) { + template void do_oop_work(T* p) { tmp_guarantee_CM( _g1h->is_in_g1_reserved((HeapWord*) p), "invariant" ); + tmp_guarantee_CM( !_g1h->heap_region_containing((HeapWord*) p)->is_on_free_list(), "invariant" ); - oop obj = *p; + oop obj = oopDesc::load_decode_heap_oop(p); if (_cm->verbose_high()) gclog_or_tty->print_cr("[%d] we're looking at location " "*"PTR_FORMAT" = "PTR_FORMAT, @@ -2967,6 +2973,7 @@ void CMTask::deal_with_reference(oop obj) { ++_refs_reached; HeapWord* objAddr = (HeapWord*) obj; + assert(obj->is_oop_or_null(true /* ignore mark word */), "Error"); if (_g1h->is_in_g1_reserved(objAddr)) { tmp_guarantee_CM( obj != NULL, "is_in_g1_reserved should ensure this" ); HeapRegion* hr = _g1h->heap_region_containing(obj); @@ -3030,6 +3037,7 @@ void CMTask::deal_with_reference(oop obj) { void CMTask::push(oop obj) { HeapWord* objAddr = (HeapWord*) obj; tmp_guarantee_CM( _g1h->is_in_g1_reserved(objAddr), "invariant" ); + tmp_guarantee_CM( !_g1h->heap_region_containing(objAddr)->is_on_free_list(), "invariant" ); tmp_guarantee_CM( !_g1h->is_obj_ill(obj), "invariant" ); tmp_guarantee_CM( _nextMarkBitMap->isMarked(objAddr), "invariant" ); @@ -3275,6 +3283,8 @@ void CMTask::drain_local_queue(bool partially) { tmp_guarantee_CM( _g1h->is_in_g1_reserved((HeapWord*) obj), "invariant" ); + tmp_guarantee_CM( !_g1h->heap_region_containing(obj)->is_on_free_list(), + "invariant" ); scan_object(obj); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp index 274f8c19e6e..85477175ff7 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp @@ -763,6 +763,7 @@ private: CMBitMap* _nextMarkBitMap; // the task queue of this task CMTaskQueue* _task_queue; +private: // the task queue set---needed for stealing CMTaskQueueSet* _task_queues; // indicates whether the task has been claimed---this is only for diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp index eddbf86d999..978367af7ae 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @@ -424,7 +424,7 @@ G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord* q, while (n <= next_boundary) { q = n; oop obj = oop(q); - if (obj->klass() == NULL) return q; + if (obj->klass_or_null() == NULL) return q; n += obj->size(); } assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); @@ -436,7 +436,7 @@ G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord* q, while (n <= next_boundary) { q = n; oop obj = oop(q); - if (obj->klass() == NULL) return q; + if (obj->klass_or_null() == NULL) return q; n += _sp->block_size(q); } assert(q <= next_boundary && n > next_boundary, "Consequence of loop"); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp index 45e148532c4..23f75e66aba 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp @@ -96,14 +96,14 @@ forward_to_block_containing_addr_const(HeapWord* q, HeapWord* n, while (n <= addr) { q = n; oop obj = oop(q); - if (obj->klass() == NULL) return q; + if (obj->klass_or_null() == NULL) return q; n += obj->size(); } } else { while (n <= addr) { q = n; oop obj = oop(q); - if (obj->klass() == NULL) return q; + if (obj->klass_or_null() == NULL) return q; n += _sp->block_size(q); } } @@ -115,7 +115,7 @@ forward_to_block_containing_addr_const(HeapWord* q, HeapWord* n, inline HeapWord* G1BlockOffsetArray::forward_to_block_containing_addr(HeapWord* q, const void* addr) { - if (oop(q)->klass() == NULL) return q; + if (oop(q)->klass_or_null() == NULL) return q; HeapWord* n = q + _sp->block_size(q); // In the normal case, where the query "addr" is a card boundary, and the // offset table chunks are the same size as cards, the block starting at diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index a42ace5ecac..f7c53a71873 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1655,11 +1655,14 @@ void G1CollectedHeap::iterate_dirty_card_closure(bool concurrent, // Computes the sum of the storage used by the various regions. size_t G1CollectedHeap::used() const { - assert(Heap_lock->owner() != NULL, - "Should be owned on this thread's behalf."); + // Temporarily, until 6859911 is fixed. XXX + // assert(Heap_lock->owner() != NULL, + // "Should be owned on this thread's behalf."); size_t result = _summary_bytes_used; - if (_cur_alloc_region != NULL) - result += _cur_alloc_region->used(); + // Read only once in case it is set to NULL concurrently + HeapRegion* hr = _cur_alloc_region; + if (hr != NULL) + result += hr->used(); return result; } @@ -2133,13 +2136,13 @@ public: VerifyLivenessOopClosure(G1CollectedHeap* _g1h) { g1h = _g1h; } - void do_oop(narrowOop *p) { - guarantee(false, "NYI"); - } - void do_oop(oop *p) { - oop obj = *p; - assert(obj == NULL || !g1h->is_obj_dead(obj), - "Dead object referenced by a not dead object"); + void do_oop(narrowOop *p) { do_oop_work(p); } + void do_oop( oop *p) { do_oop_work(p); } + + template void do_oop_work(T *p) { + oop obj = oopDesc::load_decode_heap_oop(p); + guarantee(obj == NULL || !g1h->is_obj_dead(obj), + "Dead object referenced by a not dead object"); } }; @@ -2206,8 +2209,10 @@ public: // use_prev_marking == true -> use "prev" marking information, // use_prev_marking == false -> use "next" marking information VerifyRegionClosure(bool allow_dirty, bool par, bool use_prev_marking) - : _allow_dirty(allow_dirty), _par(par), + : _allow_dirty(allow_dirty), + _par(par), _use_prev_marking(use_prev_marking) {} + bool doHeapRegion(HeapRegion* r) { guarantee(_par || r->claim_value() == HeapRegion::InitialClaimValue, "Should be unclaimed at verify points."); @@ -2231,18 +2236,16 @@ public: // use_prev_marking == true -> use "prev" marking information, // use_prev_marking == false -> use "next" marking information VerifyRootsClosure(bool use_prev_marking) : - _g1h(G1CollectedHeap::heap()), _failures(false), + _g1h(G1CollectedHeap::heap()), + _failures(false), _use_prev_marking(use_prev_marking) { } bool failures() { return _failures; } - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - - void do_oop(oop* p) { - oop obj = *p; - if (obj != NULL) { + template void do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); if (_g1h->is_obj_dead_cond(obj, _use_prev_marking)) { gclog_or_tty->print_cr("Root location "PTR_FORMAT" " "points to dead obj "PTR_FORMAT, p, (void*) obj); @@ -2251,6 +2254,9 @@ public: } } } + + void do_oop(oop* p) { do_oop_nv(p); } + void do_oop(narrowOop* p) { do_oop_nv(p); } }; // This is the task used for parallel heap verification. @@ -2267,7 +2273,8 @@ public: G1ParVerifyTask(G1CollectedHeap* g1h, bool allow_dirty, bool use_prev_marking) : AbstractGangTask("Parallel verify task"), - _g1h(g1h), _allow_dirty(allow_dirty), + _g1h(g1h), + _allow_dirty(allow_dirty), _use_prev_marking(use_prev_marking) { } void work(int worker_i) { @@ -2479,12 +2486,10 @@ void G1CollectedHeap::do_collection_pause() { void G1CollectedHeap::doConcurrentMark() { - if (G1ConcMark) { - MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); - if (!_cmThread->in_progress()) { - _cmThread->set_started(); - CGC_lock->notify(); - } + MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); + if (!_cmThread->in_progress()) { + _cmThread->set_started(); + CGC_lock->notify(); } } @@ -2561,9 +2566,11 @@ G1CollectedHeap::setup_surviving_young_words() { "Not enough space for young surv words summary."); } memset(_surviving_young_words, 0, array_length * sizeof(size_t)); +#ifdef ASSERT for (size_t i = 0; i < array_length; ++i) { - guarantee( _surviving_young_words[i] == 0, "invariant" ); + assert( _surviving_young_words[i] == 0, "memset above" ); } +#endif // !ASSERT } void @@ -2649,7 +2656,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint() { COMPILER2_PRESENT(DerivedPointerTable::clear()); // We want to turn off ref discovery, if necessary, and turn it back on - // on again later if we do. + // on again later if we do. XXX Dubious: why is discovery disabled? bool was_enabled = ref_processor()->discovery_enabled(); if (was_enabled) ref_processor()->disable_discovery(); @@ -2662,9 +2669,6 @@ G1CollectedHeap::do_collection_pause_at_safepoint() { double start_time_sec = os::elapsedTime(); GCOverheadReporter::recordSTWStart(start_time_sec); size_t start_used_bytes = used(); - if (!G1ConcMark) { - do_sync_mark(); - } g1_policy()->record_collection_pause_start(start_time_sec, start_used_bytes); @@ -2775,6 +2779,13 @@ G1CollectedHeap::do_collection_pause_at_safepoint() { g1_policy()->should_initiate_conc_mark()) { concurrent_mark()->checkpointRootsInitialPost(); set_marking_started(); + // CAUTION: after the doConcurrentMark() call below, + // the concurrent marking thread(s) could be running + // concurrently with us. Make sure that anything after + // this point does not assume that we are the only GC thread + // running. Note: of course, the actual marking work will + // not start until the safepoint itself is released in + // ConcurrentGCThread::safepoint_desynchronize(). doConcurrentMark(); } @@ -3123,10 +3134,8 @@ class G1KeepAliveClosure: public OopClosure { G1CollectedHeap* _g1; public: G1KeepAliveClosure(G1CollectedHeap* g1) : _g1(g1) {} - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - void do_oop(oop* p) { + void do_oop(narrowOop* p) { guarantee(false, "Not needed"); } + void do_oop( oop* p) { oop obj = *p; #ifdef G1_DEBUG if (PrintGC && Verbose) { @@ -3138,7 +3147,6 @@ public: if (_g1->obj_in_cs(obj)) { assert( obj->is_forwarded(), "invariant" ); *p = obj->forwardee(); - #ifdef G1_DEBUG gclog_or_tty->print_cr(" in CSet: moved "PTR_FORMAT" -> "PTR_FORMAT, (void*) obj, (void*) *p); @@ -3155,12 +3163,12 @@ public: UpdateRSetImmediate(G1CollectedHeap* g1) : _g1(g1), _g1_rem_set(g1->g1_rem_set()) {} - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - void do_oop(oop* p) { + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { assert(_from->is_in_reserved(p), "paranoia"); - if (*p != NULL && !_from->is_survivor()) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop) && !_from->is_survivor()) { _g1_rem_set->par_write_ref(_from, p, 0); } } @@ -3176,12 +3184,12 @@ public: UpdateRSetDeferred(G1CollectedHeap* g1, DirtyCardQueue* dcq) : _g1(g1), _ct_bs((CardTableModRefBS*)_g1->barrier_set()), _dcq(dcq) {} - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - void do_oop(oop* p) { + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { assert(_from->is_in_reserved(p), "paranoia"); - if (!_from->is_in_reserved(*p) && !_from->is_survivor()) { + if (!_from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && + !_from->is_survivor()) { size_t card_index = _ct_bs->index_for(p); if (_ct_bs->mark_card_deferred(card_index)) { _dcq->enqueue((jbyte*)_ct_bs->byte_for_index(card_index)); @@ -3536,614 +3544,66 @@ void G1CollectedHeap::par_allocate_remaining_space(HeapRegion* r) { fill_with_object(block, free_words); } -#define use_local_bitmaps 1 -#define verify_local_bitmaps 0 - #ifndef PRODUCT - -class GCLabBitMap; -class GCLabBitMapClosure: public BitMapClosure { -private: - ConcurrentMark* _cm; - GCLabBitMap* _bitmap; - -public: - GCLabBitMapClosure(ConcurrentMark* cm, - GCLabBitMap* bitmap) { - _cm = cm; - _bitmap = bitmap; - } - - virtual bool do_bit(size_t offset); -}; - -#endif // PRODUCT - -#define oop_buffer_length 256 - -class GCLabBitMap: public BitMap { -private: - ConcurrentMark* _cm; - - int _shifter; - size_t _bitmap_word_covers_words; - - // beginning of the heap - HeapWord* _heap_start; - - // this is the actual start of the GCLab - HeapWord* _real_start_word; - - // this is the actual end of the GCLab - HeapWord* _real_end_word; - - // this is the first word, possibly located before the actual start - // of the GCLab, that corresponds to the first bit of the bitmap - HeapWord* _start_word; - - // size of a GCLab in words - size_t _gclab_word_size; - - static int shifter() { - return MinObjAlignment - 1; - } - - // how many heap words does a single bitmap word corresponds to? - static size_t bitmap_word_covers_words() { - return BitsPerWord << shifter(); - } - - static size_t gclab_word_size() { - return G1ParallelGCAllocBufferSize / HeapWordSize; - } - - static size_t bitmap_size_in_bits() { - size_t bits_in_bitmap = gclab_word_size() >> shifter(); - // We are going to ensure that the beginning of a word in this - // bitmap also corresponds to the beginning of a word in the - // global marking bitmap. To handle the case where a GCLab - // starts from the middle of the bitmap, we need to add enough - // space (i.e. up to a bitmap word) to ensure that we have - // enough bits in the bitmap. - return bits_in_bitmap + BitsPerWord - 1; - } -public: - GCLabBitMap(HeapWord* heap_start) - : BitMap(bitmap_size_in_bits()), - _cm(G1CollectedHeap::heap()->concurrent_mark()), - _shifter(shifter()), - _bitmap_word_covers_words(bitmap_word_covers_words()), - _heap_start(heap_start), - _gclab_word_size(gclab_word_size()), - _real_start_word(NULL), - _real_end_word(NULL), - _start_word(NULL) - { - guarantee( size_in_words() >= bitmap_size_in_words(), - "just making sure"); - } - - inline unsigned heapWordToOffset(HeapWord* addr) { - unsigned offset = (unsigned) pointer_delta(addr, _start_word) >> _shifter; - assert(offset < size(), "offset should be within bounds"); - return offset; - } - - inline HeapWord* offsetToHeapWord(size_t offset) { - HeapWord* addr = _start_word + (offset << _shifter); - assert(_real_start_word <= addr && addr < _real_end_word, "invariant"); - return addr; - } - - bool fields_well_formed() { - bool ret1 = (_real_start_word == NULL) && - (_real_end_word == NULL) && - (_start_word == NULL); - if (ret1) - return true; - - bool ret2 = _real_start_word >= _start_word && - _start_word < _real_end_word && - (_real_start_word + _gclab_word_size) == _real_end_word && - (_start_word + _gclab_word_size + _bitmap_word_covers_words) - > _real_end_word; - return ret2; - } - - inline bool mark(HeapWord* addr) { - guarantee(use_local_bitmaps, "invariant"); - assert(fields_well_formed(), "invariant"); - - if (addr >= _real_start_word && addr < _real_end_word) { - assert(!isMarked(addr), "should not have already been marked"); - - // first mark it on the bitmap - at_put(heapWordToOffset(addr), true); - - return true; - } else { - return false; - } - } - - inline bool isMarked(HeapWord* addr) { - guarantee(use_local_bitmaps, "invariant"); - assert(fields_well_formed(), "invariant"); - - return at(heapWordToOffset(addr)); - } - - void set_buffer(HeapWord* start) { - guarantee(use_local_bitmaps, "invariant"); - clear(); - - assert(start != NULL, "invariant"); - _real_start_word = start; - _real_end_word = start + _gclab_word_size; - - size_t diff = - pointer_delta(start, _heap_start) % _bitmap_word_covers_words; - _start_word = start - diff; - - assert(fields_well_formed(), "invariant"); - } - -#ifndef PRODUCT - void verify() { - // verify that the marks have been propagated - GCLabBitMapClosure cl(_cm, this); - iterate(&cl); - } -#endif // PRODUCT - - void retire() { - guarantee(use_local_bitmaps, "invariant"); - assert(fields_well_formed(), "invariant"); - - if (_start_word != NULL) { - CMBitMap* mark_bitmap = _cm->nextMarkBitMap(); - - // this means that the bitmap was set up for the GCLab - assert(_real_start_word != NULL && _real_end_word != NULL, "invariant"); - - mark_bitmap->mostly_disjoint_range_union(this, - 0, // always start from the start of the bitmap - _start_word, - size_in_words()); - _cm->grayRegionIfNecessary(MemRegion(_real_start_word, _real_end_word)); - -#ifndef PRODUCT - if (use_local_bitmaps && verify_local_bitmaps) - verify(); -#endif // PRODUCT - } else { - assert(_real_start_word == NULL && _real_end_word == NULL, "invariant"); - } - } - - static size_t bitmap_size_in_words() { - return (bitmap_size_in_bits() + BitsPerWord - 1) / BitsPerWord; - } -}; - -#ifndef PRODUCT - bool GCLabBitMapClosure::do_bit(size_t offset) { HeapWord* addr = _bitmap->offsetToHeapWord(offset); guarantee(_cm->isMarked(oop(addr)), "it should be!"); return true; } - #endif // PRODUCT -class G1ParGCAllocBuffer: public ParGCAllocBuffer { -private: - bool _retired; - bool _during_marking; - GCLabBitMap _bitmap; - -public: - G1ParGCAllocBuffer() : - ParGCAllocBuffer(G1ParallelGCAllocBufferSize / HeapWordSize), - _during_marking(G1CollectedHeap::heap()->mark_in_progress()), - _bitmap(G1CollectedHeap::heap()->reserved_region().start()), - _retired(false) - { } - - inline bool mark(HeapWord* addr) { - guarantee(use_local_bitmaps, "invariant"); - assert(_during_marking, "invariant"); - return _bitmap.mark(addr); - } - - inline void set_buf(HeapWord* buf) { - if (use_local_bitmaps && _during_marking) - _bitmap.set_buffer(buf); - ParGCAllocBuffer::set_buf(buf); - _retired = false; - } - - inline void retire(bool end_of_gc, bool retain) { - if (_retired) - return; - if (use_local_bitmaps && _during_marking) { - _bitmap.retire(); - } - ParGCAllocBuffer::retire(end_of_gc, retain); - _retired = true; - } -}; - - -class G1ParScanThreadState : public StackObj { -protected: - G1CollectedHeap* _g1h; - RefToScanQueue* _refs; - DirtyCardQueue _dcq; - CardTableModRefBS* _ct_bs; - G1RemSet* _g1_rem; - - typedef GrowableArray OverflowQueue; - OverflowQueue* _overflowed_refs; - - G1ParGCAllocBuffer _alloc_buffers[GCAllocPurposeCount]; - ageTable _age_table; - - size_t _alloc_buffer_waste; - size_t _undo_waste; - - OopsInHeapRegionClosure* _evac_failure_cl; - G1ParScanHeapEvacClosure* _evac_cl; - G1ParScanPartialArrayClosure* _partial_scan_cl; - - int _hash_seed; - int _queue_num; - - int _term_attempts; +G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, int queue_num) + : _g1h(g1h), + _refs(g1h->task_queue(queue_num)), + _dcq(&g1h->dirty_card_queue_set()), + _ct_bs((CardTableModRefBS*)_g1h->barrier_set()), + _g1_rem(g1h->g1_rem_set()), + _hash_seed(17), _queue_num(queue_num), + _term_attempts(0), + _age_table(false), #if G1_DETAILED_STATS - int _pushes, _pops, _steals, _steal_attempts; - int _overflow_pushes; + _pushes(0), _pops(0), _steals(0), + _steal_attempts(0), _overflow_pushes(0), #endif + _strong_roots_time(0), _term_time(0), + _alloc_buffer_waste(0), _undo_waste(0) +{ + // we allocate G1YoungSurvRateNumRegions plus one entries, since + // we "sacrifice" entry 0 to keep track of surviving bytes for + // non-young regions (where the age is -1) + // We also add a few elements at the beginning and at the end in + // an attempt to eliminate cache contention + size_t real_length = 1 + _g1h->g1_policy()->young_cset_length(); + size_t array_length = PADDING_ELEM_NUM + + real_length + + PADDING_ELEM_NUM; + _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length); + if (_surviving_young_words_base == NULL) + vm_exit_out_of_memory(array_length * sizeof(size_t), + "Not enough space for young surv histo."); + _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; + memset(_surviving_young_words, 0, real_length * sizeof(size_t)); - double _start; - double _start_strong_roots; - double _strong_roots_time; - double _start_term; - double _term_time; + _overflowed_refs = new OverflowQueue(10); - // Map from young-age-index (0 == not young, 1 is youngest) to - // surviving words. base is what we get back from the malloc call - size_t* _surviving_young_words_base; - // this points into the array, as we use the first few entries for padding - size_t* _surviving_young_words; - -#define PADDING_ELEM_NUM (64 / sizeof(size_t)) - - void add_to_alloc_buffer_waste(size_t waste) { _alloc_buffer_waste += waste; } - - void add_to_undo_waste(size_t waste) { _undo_waste += waste; } - - DirtyCardQueue& dirty_card_queue() { return _dcq; } - CardTableModRefBS* ctbs() { return _ct_bs; } - - void immediate_rs_update(HeapRegion* from, oop* p, int tid) { - if (!from->is_survivor()) { - _g1_rem->par_write_ref(from, p, tid); - } - } - - void deferred_rs_update(HeapRegion* from, oop* p, int tid) { - // If the new value of the field points to the same region or - // is the to-space, we don't need to include it in the Rset updates. - if (!from->is_in_reserved(*p) && !from->is_survivor()) { - size_t card_index = ctbs()->index_for(p); - // If the card hasn't been added to the buffer, do it. - if (ctbs()->mark_card_deferred(card_index)) { - dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index)); - } - } - } - -public: - G1ParScanThreadState(G1CollectedHeap* g1h, int queue_num) - : _g1h(g1h), - _refs(g1h->task_queue(queue_num)), - _dcq(&g1h->dirty_card_queue_set()), - _ct_bs((CardTableModRefBS*)_g1h->barrier_set()), - _g1_rem(g1h->g1_rem_set()), - _hash_seed(17), _queue_num(queue_num), - _term_attempts(0), - _age_table(false), -#if G1_DETAILED_STATS - _pushes(0), _pops(0), _steals(0), - _steal_attempts(0), _overflow_pushes(0), -#endif - _strong_roots_time(0), _term_time(0), - _alloc_buffer_waste(0), _undo_waste(0) - { - // we allocate G1YoungSurvRateNumRegions plus one entries, since - // we "sacrifice" entry 0 to keep track of surviving bytes for - // non-young regions (where the age is -1) - // We also add a few elements at the beginning and at the end in - // an attempt to eliminate cache contention - size_t real_length = 1 + _g1h->g1_policy()->young_cset_length(); - size_t array_length = PADDING_ELEM_NUM + - real_length + - PADDING_ELEM_NUM; - _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length); - if (_surviving_young_words_base == NULL) - vm_exit_out_of_memory(array_length * sizeof(size_t), - "Not enough space for young surv histo."); - _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; - memset(_surviving_young_words, 0, real_length * sizeof(size_t)); - - _overflowed_refs = new OverflowQueue(10); - - _start = os::elapsedTime(); - } - - ~G1ParScanThreadState() { - FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); - } - - RefToScanQueue* refs() { return _refs; } - OverflowQueue* overflowed_refs() { return _overflowed_refs; } - ageTable* age_table() { return &_age_table; } - - G1ParGCAllocBuffer* alloc_buffer(GCAllocPurpose purpose) { - return &_alloc_buffers[purpose]; - } - - size_t alloc_buffer_waste() { return _alloc_buffer_waste; } - size_t undo_waste() { return _undo_waste; } - - void push_on_queue(oop* ref) { - assert(ref != NULL, "invariant"); - assert(has_partial_array_mask(ref) || _g1h->obj_in_cs(*ref), "invariant"); - - if (!refs()->push(ref)) { - overflowed_refs()->push(ref); - IF_G1_DETAILED_STATS(note_overflow_push()); - } else { - IF_G1_DETAILED_STATS(note_push()); - } - } - - void pop_from_queue(oop*& ref) { - if (!refs()->pop_local(ref)) { - ref = NULL; - } else { - assert(ref != NULL, "invariant"); - assert(has_partial_array_mask(ref) || _g1h->obj_in_cs(*ref), - "invariant"); - - IF_G1_DETAILED_STATS(note_pop()); - } - } - - void pop_from_overflow_queue(oop*& ref) { - ref = overflowed_refs()->pop(); - } - - int refs_to_scan() { return refs()->size(); } - int overflowed_refs_to_scan() { return overflowed_refs()->length(); } - - void update_rs(HeapRegion* from, oop* p, int tid) { - if (G1DeferredRSUpdate) { - deferred_rs_update(from, p, tid); - } else { - immediate_rs_update(from, p, tid); - } - } - - HeapWord* allocate_slow(GCAllocPurpose purpose, size_t word_sz) { - - HeapWord* obj = NULL; - if (word_sz * 100 < - (size_t)(G1ParallelGCAllocBufferSize / HeapWordSize) * - ParallelGCBufferWastePct) { - G1ParGCAllocBuffer* alloc_buf = alloc_buffer(purpose); - add_to_alloc_buffer_waste(alloc_buf->words_remaining()); - alloc_buf->retire(false, false); - - HeapWord* buf = - _g1h->par_allocate_during_gc(purpose, G1ParallelGCAllocBufferSize / HeapWordSize); - if (buf == NULL) return NULL; // Let caller handle allocation failure. - // Otherwise. - alloc_buf->set_buf(buf); - - obj = alloc_buf->allocate(word_sz); - assert(obj != NULL, "buffer was definitely big enough..."); - } else { - obj = _g1h->par_allocate_during_gc(purpose, word_sz); - } - return obj; - } - - HeapWord* allocate(GCAllocPurpose purpose, size_t word_sz) { - HeapWord* obj = alloc_buffer(purpose)->allocate(word_sz); - if (obj != NULL) return obj; - return allocate_slow(purpose, word_sz); - } - - void undo_allocation(GCAllocPurpose purpose, HeapWord* obj, size_t word_sz) { - if (alloc_buffer(purpose)->contains(obj)) { - guarantee(alloc_buffer(purpose)->contains(obj + word_sz - 1), - "should contain whole object"); - alloc_buffer(purpose)->undo_allocation(obj, word_sz); - } else { - CollectedHeap::fill_with_object(obj, word_sz); - add_to_undo_waste(word_sz); - } - } - - void set_evac_failure_closure(OopsInHeapRegionClosure* evac_failure_cl) { - _evac_failure_cl = evac_failure_cl; - } - OopsInHeapRegionClosure* evac_failure_closure() { - return _evac_failure_cl; - } - - void set_evac_closure(G1ParScanHeapEvacClosure* evac_cl) { - _evac_cl = evac_cl; - } - - void set_partial_scan_closure(G1ParScanPartialArrayClosure* partial_scan_cl) { - _partial_scan_cl = partial_scan_cl; - } - - int* hash_seed() { return &_hash_seed; } - int queue_num() { return _queue_num; } - - int term_attempts() { return _term_attempts; } - void note_term_attempt() { _term_attempts++; } - -#if G1_DETAILED_STATS - int pushes() { return _pushes; } - int pops() { return _pops; } - int steals() { return _steals; } - int steal_attempts() { return _steal_attempts; } - int overflow_pushes() { return _overflow_pushes; } - - void note_push() { _pushes++; } - void note_pop() { _pops++; } - void note_steal() { _steals++; } - void note_steal_attempt() { _steal_attempts++; } - void note_overflow_push() { _overflow_pushes++; } -#endif - - void start_strong_roots() { - _start_strong_roots = os::elapsedTime(); - } - void end_strong_roots() { - _strong_roots_time += (os::elapsedTime() - _start_strong_roots); - } - double strong_roots_time() { return _strong_roots_time; } - - void start_term_time() { - note_term_attempt(); - _start_term = os::elapsedTime(); - } - void end_term_time() { - _term_time += (os::elapsedTime() - _start_term); - } - double term_time() { return _term_time; } - - double elapsed() { - return os::elapsedTime() - _start; - } - - size_t* surviving_young_words() { - // We add on to hide entry 0 which accumulates surviving words for - // age -1 regions (i.e. non-young ones) - return _surviving_young_words; - } - - void retire_alloc_buffers() { - for (int ap = 0; ap < GCAllocPurposeCount; ++ap) { - size_t waste = _alloc_buffers[ap].words_remaining(); - add_to_alloc_buffer_waste(waste); - _alloc_buffers[ap].retire(true, false); - } - } - -private: - void deal_with_reference(oop* ref_to_scan) { - if (has_partial_array_mask(ref_to_scan)) { - _partial_scan_cl->do_oop_nv(ref_to_scan); - } else { - // Note: we can use "raw" versions of "region_containing" because - // "obj_to_scan" is definitely in the heap, and is not in a - // humongous region. - HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan); - _evac_cl->set_region(r); - _evac_cl->do_oop_nv(ref_to_scan); - } - } - -public: - void trim_queue() { - // I've replicated the loop twice, first to drain the overflow - // queue, second to drain the task queue. This is better than - // having a single loop, which checks both conditions and, inside - // it, either pops the overflow queue or the task queue, as each - // loop is tighter. Also, the decision to drain the overflow queue - // first is not arbitrary, as the overflow queue is not visible - // to the other workers, whereas the task queue is. So, we want to - // drain the "invisible" entries first, while allowing the other - // workers to potentially steal the "visible" entries. - - while (refs_to_scan() > 0 || overflowed_refs_to_scan() > 0) { - while (overflowed_refs_to_scan() > 0) { - oop *ref_to_scan = NULL; - pop_from_overflow_queue(ref_to_scan); - assert(ref_to_scan != NULL, "invariant"); - // We shouldn't have pushed it on the queue if it was not - // pointing into the CSet. - assert(ref_to_scan != NULL, "sanity"); - assert(has_partial_array_mask(ref_to_scan) || - _g1h->obj_in_cs(*ref_to_scan), "sanity"); - - deal_with_reference(ref_to_scan); - } - - while (refs_to_scan() > 0) { - oop *ref_to_scan = NULL; - pop_from_queue(ref_to_scan); - - if (ref_to_scan != NULL) { - // We shouldn't have pushed it on the queue if it was not - // pointing into the CSet. - assert(has_partial_array_mask(ref_to_scan) || - _g1h->obj_in_cs(*ref_to_scan), "sanity"); - - deal_with_reference(ref_to_scan); - } - } - } - } -}; + _start = os::elapsedTime(); +} G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) : _g1(g1), _g1_rem(_g1->g1_rem_set()), _cm(_g1->concurrent_mark()), _par_scan_state(par_scan_state) { } -// This closure is applied to the fields of the objects that have just been copied. -// Should probably be made inline and moved in g1OopClosures.inline.hpp. -void G1ParScanClosure::do_oop_nv(oop* p) { - oop obj = *p; - - if (obj != NULL) { - if (_g1->in_cset_fast_test(obj)) { - // We're not going to even bother checking whether the object is - // already forwarded or not, as this usually causes an immediate - // stall. We'll try to prefetch the object (for write, given that - // we might need to install the forwarding reference) and we'll - // get back to it when pop it from the queue - Prefetch::write(obj->mark_addr(), 0); - Prefetch::read(obj->mark_addr(), (HeapWordSize*2)); - - // slightly paranoid test; I'm trying to catch potential - // problems before we go into push_on_queue to know where the - // problem is coming from - assert(obj == *p, "the value of *p should not have changed"); - _par_scan_state->push_on_queue(p); - } else { - _par_scan_state->update_rs(_from, p, _par_scan_state->queue_num()); - } - } -} - -void G1ParCopyHelper::mark_forwardee(oop* p) { +template void G1ParCopyHelper::mark_forwardee(T* p) { // This is called _after_ do_oop_work has been called, hence after // the object has been relocated to its new location and *p points // to its new location. - oop thisOop = *p; - if (thisOop != NULL) { - assert((_g1->evacuation_failed()) || (!_g1->obj_in_cs(thisOop)), + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop(heap_oop); + assert((_g1->evacuation_failed()) || (!_g1->obj_in_cs(obj)), "shouldn't still be in the CSet if evacuation didn't fail."); - HeapWord* addr = (HeapWord*)thisOop; + HeapWord* addr = (HeapWord*)obj; if (_g1->is_in_g1_reserved(addr)) _cm->grayRoot(oop(addr)); } @@ -4226,7 +3686,8 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) { if (obj->is_objArray() && arrayOop(obj)->length() >= ParGCArrayScanChunk) { arrayOop(old)->set_length(0); - _par_scan_state->push_on_queue(set_partial_array_mask(old)); + oop* old_p = set_partial_array_mask(old); + _par_scan_state->push_on_queue(old_p); } else { // No point in using the slower heap_region_containing() method, // given that we know obj is in the heap. @@ -4240,11 +3701,11 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) { return obj; } -template -void G1ParCopyClosure::do_oop_work(oop* p) { - oop obj = *p; +template +template +void G1ParCopyClosure +::do_oop_work(T* p) { + oop obj = oopDesc::load_decode_heap_oop(p); assert(barrier != G1BarrierRS || obj != NULL, "Precondition: G1BarrierRS implies obj is nonNull"); @@ -4261,9 +3722,10 @@ void G1ParCopyClosureis_forwarded()) { - *p = obj->forwardee(); + oopDesc::encode_store_heap_oop(p, obj->forwardee()); } else { - *p = copy_to_survivor_space(obj); + oop copy_oop = copy_to_survivor_space(obj); + oopDesc::encode_store_heap_oop(p, copy_oop); } // When scanning the RS, we only care about objs in CS. if (barrier == G1BarrierRS) { @@ -4282,21 +3744,9 @@ void G1ParCopyClosure::do_oop_work(oop* p); +template void G1ParCopyClosure::do_oop_work(narrowOop* p); -template void G1ParScanPartialArrayClosure::process_array_chunk( - oop obj, int start, int end) { - // process our set of indices (include header in first chunk) - assert(start < end, "invariant"); - T* const base = (T*)objArrayOop(obj)->base(); - T* const start_addr = (start == 0) ? (T*) obj : base + start; - T* const end_addr = base + end; - MemRegion mr((HeapWord*)start_addr, (HeapWord*)end_addr); - _scanner.set_region(_g1->heap_region_containing(obj)); - obj->oop_iterate(&_scanner, mr); -} - -void G1ParScanPartialArrayClosure::do_oop_nv(oop* p) { - assert(!UseCompressedOops, "Needs to be fixed to work with compressed oops"); +template void G1ParScanPartialArrayClosure::do_oop_nv(T* p) { assert(has_partial_array_mask(p), "invariant"); oop old = clear_partial_array_mask(p); assert(old->is_objArray(), "must be obj array"); @@ -4316,19 +3766,19 @@ void G1ParScanPartialArrayClosure::do_oop_nv(oop* p) { end = start + ParGCArrayScanChunk; arrayOop(old)->set_length(end); // Push remainder. - _par_scan_state->push_on_queue(set_partial_array_mask(old)); + oop* old_p = set_partial_array_mask(old); + assert(arrayOop(old)->length() < obj->length(), "Empty push?"); + _par_scan_state->push_on_queue(old_p); } else { // Restore length so that the heap remains parsable in // case of evacuation failure. arrayOop(old)->set_length(end); } - + _scanner.set_region(_g1->heap_region_containing_raw(obj)); // process our set of indices (include header in first chunk) - process_array_chunk(obj, start, end); + obj->oop_iterate_range(&_scanner, start, end); } -int G1ScanAndBalanceClosure::_nq = 0; - class G1ParEvacuateFollowersClosure : public VoidClosure { protected: G1CollectedHeap* _g1h; @@ -4351,21 +3801,28 @@ public: void do_void() { G1ParScanThreadState* pss = par_scan_state(); while (true) { - oop* ref_to_scan; pss->trim_queue(); IF_G1_DETAILED_STATS(pss->note_steal_attempt()); - if (queues()->steal(pss->queue_num(), - pss->hash_seed(), - ref_to_scan)) { + + StarTask stolen_task; + if (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) { IF_G1_DETAILED_STATS(pss->note_steal()); // slightly paranoid tests; I'm trying to catch potential // problems before we go into push_on_queue to know where the // problem is coming from - assert(ref_to_scan != NULL, "invariant"); - assert(has_partial_array_mask(ref_to_scan) || - _g1h->obj_in_cs(*ref_to_scan), "invariant"); - pss->push_on_queue(ref_to_scan); + assert((oop*)stolen_task != NULL, "Error"); + if (stolen_task.is_narrow()) { + assert(UseCompressedOops, "Error"); + narrowOop* p = (narrowOop*) stolen_task; + assert(has_partial_array_mask(p) || + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(p)), "Error"); + pss->push_on_queue(p); + } else { + oop* p = (oop*) stolen_task; + assert(has_partial_array_mask(p) || _g1h->obj_in_cs(*p), "Error"); + pss->push_on_queue(p); + } continue; } pss->start_term_time(); @@ -4382,6 +3839,7 @@ protected: G1CollectedHeap* _g1h; RefToScanQueueSet *_queues; ParallelTaskTerminator _terminator; + int _n_workers; Mutex _stats_lock; Mutex* stats_lock() { return &_stats_lock; } @@ -4397,7 +3855,8 @@ public: _g1h(g1h), _queues(task_queues), _terminator(workers, _queues), - _stats_lock(Mutex::leaf, "parallel G1 stats lock", true) + _stats_lock(Mutex::leaf, "parallel G1 stats lock", true), + _n_workers(workers) {} RefToScanQueueSet* queues() { return _queues; } @@ -4407,6 +3866,7 @@ public: } void work(int i) { + if (i >= _n_workers) return; // no work needed this round ResourceMark rm; HandleMark hm; @@ -4504,23 +3964,6 @@ public: // *** Common G1 Evacuation Stuff -class G1CountClosure: public OopsInHeapRegionClosure { -public: - int n; - G1CountClosure() : n(0) {} - void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - void do_oop(oop* p) { - oop obj = *p; - assert(obj != NULL && G1CollectedHeap::heap()->obj_in_cs(obj), - "Rem set closure called on non-rem-set pointer."); - n++; - } -}; - -static G1CountClosure count_closure; - void G1CollectedHeap:: g1_process_strong_roots(bool collecting_perm_gen, @@ -5570,8 +5013,3 @@ bool G1CollectedHeap::is_in_closed_subset(const void* p) const { void G1CollectedHeap::g1_unimplemented() { // Unimplemented(); } - - -// Local Variables: *** -// c-indentation-style: gnu *** -// End: *** diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 82cfc8488f3..3dc60175986 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -56,8 +56,8 @@ class ConcurrentZFThread; # define IF_G1_DETAILED_STATS(code) #endif -typedef GenericTaskQueue RefToScanQueue; -typedef GenericTaskQueueSet RefToScanQueueSet; +typedef GenericTaskQueue RefToScanQueue; +typedef GenericTaskQueueSet RefToScanQueueSet; typedef int RegionIdx_t; // needs to hold [ 0..max_regions() ) typedef int CardIdx_t; // needs to hold [ 0..CardsPerRegion ) @@ -1271,6 +1271,552 @@ public: }; -// Local Variables: *** -// c-indentation-style: gnu *** -// End: *** +#define use_local_bitmaps 1 +#define verify_local_bitmaps 0 +#define oop_buffer_length 256 + +#ifndef PRODUCT +class GCLabBitMap; +class GCLabBitMapClosure: public BitMapClosure { +private: + ConcurrentMark* _cm; + GCLabBitMap* _bitmap; + +public: + GCLabBitMapClosure(ConcurrentMark* cm, + GCLabBitMap* bitmap) { + _cm = cm; + _bitmap = bitmap; + } + + virtual bool do_bit(size_t offset); +}; +#endif // !PRODUCT + +class GCLabBitMap: public BitMap { +private: + ConcurrentMark* _cm; + + int _shifter; + size_t _bitmap_word_covers_words; + + // beginning of the heap + HeapWord* _heap_start; + + // this is the actual start of the GCLab + HeapWord* _real_start_word; + + // this is the actual end of the GCLab + HeapWord* _real_end_word; + + // this is the first word, possibly located before the actual start + // of the GCLab, that corresponds to the first bit of the bitmap + HeapWord* _start_word; + + // size of a GCLab in words + size_t _gclab_word_size; + + static int shifter() { + return MinObjAlignment - 1; + } + + // how many heap words does a single bitmap word corresponds to? + static size_t bitmap_word_covers_words() { + return BitsPerWord << shifter(); + } + + static size_t gclab_word_size() { + return G1ParallelGCAllocBufferSize / HeapWordSize; + } + + static size_t bitmap_size_in_bits() { + size_t bits_in_bitmap = gclab_word_size() >> shifter(); + // We are going to ensure that the beginning of a word in this + // bitmap also corresponds to the beginning of a word in the + // global marking bitmap. To handle the case where a GCLab + // starts from the middle of the bitmap, we need to add enough + // space (i.e. up to a bitmap word) to ensure that we have + // enough bits in the bitmap. + return bits_in_bitmap + BitsPerWord - 1; + } +public: + GCLabBitMap(HeapWord* heap_start) + : BitMap(bitmap_size_in_bits()), + _cm(G1CollectedHeap::heap()->concurrent_mark()), + _shifter(shifter()), + _bitmap_word_covers_words(bitmap_word_covers_words()), + _heap_start(heap_start), + _gclab_word_size(gclab_word_size()), + _real_start_word(NULL), + _real_end_word(NULL), + _start_word(NULL) + { + guarantee( size_in_words() >= bitmap_size_in_words(), + "just making sure"); + } + + inline unsigned heapWordToOffset(HeapWord* addr) { + unsigned offset = (unsigned) pointer_delta(addr, _start_word) >> _shifter; + assert(offset < size(), "offset should be within bounds"); + return offset; + } + + inline HeapWord* offsetToHeapWord(size_t offset) { + HeapWord* addr = _start_word + (offset << _shifter); + assert(_real_start_word <= addr && addr < _real_end_word, "invariant"); + return addr; + } + + bool fields_well_formed() { + bool ret1 = (_real_start_word == NULL) && + (_real_end_word == NULL) && + (_start_word == NULL); + if (ret1) + return true; + + bool ret2 = _real_start_word >= _start_word && + _start_word < _real_end_word && + (_real_start_word + _gclab_word_size) == _real_end_word && + (_start_word + _gclab_word_size + _bitmap_word_covers_words) + > _real_end_word; + return ret2; + } + + inline bool mark(HeapWord* addr) { + guarantee(use_local_bitmaps, "invariant"); + assert(fields_well_formed(), "invariant"); + + if (addr >= _real_start_word && addr < _real_end_word) { + assert(!isMarked(addr), "should not have already been marked"); + + // first mark it on the bitmap + at_put(heapWordToOffset(addr), true); + + return true; + } else { + return false; + } + } + + inline bool isMarked(HeapWord* addr) { + guarantee(use_local_bitmaps, "invariant"); + assert(fields_well_formed(), "invariant"); + + return at(heapWordToOffset(addr)); + } + + void set_buffer(HeapWord* start) { + guarantee(use_local_bitmaps, "invariant"); + clear(); + + assert(start != NULL, "invariant"); + _real_start_word = start; + _real_end_word = start + _gclab_word_size; + + size_t diff = + pointer_delta(start, _heap_start) % _bitmap_word_covers_words; + _start_word = start - diff; + + assert(fields_well_formed(), "invariant"); + } + +#ifndef PRODUCT + void verify() { + // verify that the marks have been propagated + GCLabBitMapClosure cl(_cm, this); + iterate(&cl); + } +#endif // PRODUCT + + void retire() { + guarantee(use_local_bitmaps, "invariant"); + assert(fields_well_formed(), "invariant"); + + if (_start_word != NULL) { + CMBitMap* mark_bitmap = _cm->nextMarkBitMap(); + + // this means that the bitmap was set up for the GCLab + assert(_real_start_word != NULL && _real_end_word != NULL, "invariant"); + + mark_bitmap->mostly_disjoint_range_union(this, + 0, // always start from the start of the bitmap + _start_word, + size_in_words()); + _cm->grayRegionIfNecessary(MemRegion(_real_start_word, _real_end_word)); + +#ifndef PRODUCT + if (use_local_bitmaps && verify_local_bitmaps) + verify(); +#endif // PRODUCT + } else { + assert(_real_start_word == NULL && _real_end_word == NULL, "invariant"); + } + } + + static size_t bitmap_size_in_words() { + return (bitmap_size_in_bits() + BitsPerWord - 1) / BitsPerWord; + } +}; + +class G1ParGCAllocBuffer: public ParGCAllocBuffer { +private: + bool _retired; + bool _during_marking; + GCLabBitMap _bitmap; + +public: + G1ParGCAllocBuffer() : + ParGCAllocBuffer(G1ParallelGCAllocBufferSize / HeapWordSize), + _during_marking(G1CollectedHeap::heap()->mark_in_progress()), + _bitmap(G1CollectedHeap::heap()->reserved_region().start()), + _retired(false) + { } + + inline bool mark(HeapWord* addr) { + guarantee(use_local_bitmaps, "invariant"); + assert(_during_marking, "invariant"); + return _bitmap.mark(addr); + } + + inline void set_buf(HeapWord* buf) { + if (use_local_bitmaps && _during_marking) + _bitmap.set_buffer(buf); + ParGCAllocBuffer::set_buf(buf); + _retired = false; + } + + inline void retire(bool end_of_gc, bool retain) { + if (_retired) + return; + if (use_local_bitmaps && _during_marking) { + _bitmap.retire(); + } + ParGCAllocBuffer::retire(end_of_gc, retain); + _retired = true; + } +}; + +class G1ParScanThreadState : public StackObj { +protected: + G1CollectedHeap* _g1h; + RefToScanQueue* _refs; + DirtyCardQueue _dcq; + CardTableModRefBS* _ct_bs; + G1RemSet* _g1_rem; + + typedef GrowableArray OverflowQueue; + OverflowQueue* _overflowed_refs; + + G1ParGCAllocBuffer _alloc_buffers[GCAllocPurposeCount]; + ageTable _age_table; + + size_t _alloc_buffer_waste; + size_t _undo_waste; + + OopsInHeapRegionClosure* _evac_failure_cl; + G1ParScanHeapEvacClosure* _evac_cl; + G1ParScanPartialArrayClosure* _partial_scan_cl; + + int _hash_seed; + int _queue_num; + + int _term_attempts; +#if G1_DETAILED_STATS + int _pushes, _pops, _steals, _steal_attempts; + int _overflow_pushes; +#endif + + double _start; + double _start_strong_roots; + double _strong_roots_time; + double _start_term; + double _term_time; + + // Map from young-age-index (0 == not young, 1 is youngest) to + // surviving words. base is what we get back from the malloc call + size_t* _surviving_young_words_base; + // this points into the array, as we use the first few entries for padding + size_t* _surviving_young_words; + +#define PADDING_ELEM_NUM (64 / sizeof(size_t)) + + void add_to_alloc_buffer_waste(size_t waste) { _alloc_buffer_waste += waste; } + + void add_to_undo_waste(size_t waste) { _undo_waste += waste; } + + DirtyCardQueue& dirty_card_queue() { return _dcq; } + CardTableModRefBS* ctbs() { return _ct_bs; } + + template void immediate_rs_update(HeapRegion* from, T* p, int tid) { + if (!from->is_survivor()) { + _g1_rem->par_write_ref(from, p, tid); + } + } + + template void deferred_rs_update(HeapRegion* from, T* p, int tid) { + // If the new value of the field points to the same region or + // is the to-space, we don't need to include it in the Rset updates. + if (!from->is_in_reserved(oopDesc::load_decode_heap_oop(p)) && !from->is_survivor()) { + size_t card_index = ctbs()->index_for(p); + // If the card hasn't been added to the buffer, do it. + if (ctbs()->mark_card_deferred(card_index)) { + dirty_card_queue().enqueue((jbyte*)ctbs()->byte_for_index(card_index)); + } + } + } + +public: + G1ParScanThreadState(G1CollectedHeap* g1h, int queue_num); + + ~G1ParScanThreadState() { + FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); + } + + RefToScanQueue* refs() { return _refs; } + OverflowQueue* overflowed_refs() { return _overflowed_refs; } + ageTable* age_table() { return &_age_table; } + + G1ParGCAllocBuffer* alloc_buffer(GCAllocPurpose purpose) { + return &_alloc_buffers[purpose]; + } + + size_t alloc_buffer_waste() { return _alloc_buffer_waste; } + size_t undo_waste() { return _undo_waste; } + + template void push_on_queue(T* ref) { + assert(ref != NULL, "invariant"); + assert(has_partial_array_mask(ref) || + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(ref)), "invariant"); +#ifdef ASSERT + if (has_partial_array_mask(ref)) { + oop p = clear_partial_array_mask(ref); + // Verify that we point into the CS + assert(_g1h->obj_in_cs(p), "Should be in CS"); + } +#endif + if (!refs()->push(ref)) { + overflowed_refs()->push(ref); + IF_G1_DETAILED_STATS(note_overflow_push()); + } else { + IF_G1_DETAILED_STATS(note_push()); + } + } + + void pop_from_queue(StarTask& ref) { + if (refs()->pop_local(ref)) { + assert((oop*)ref != NULL, "pop_local() returned true"); + assert(UseCompressedOops || !ref.is_narrow(), "Error"); + assert(has_partial_array_mask((oop*)ref) || + _g1h->obj_in_cs(ref.is_narrow() ? oopDesc::load_decode_heap_oop((narrowOop*)ref) + : oopDesc::load_decode_heap_oop((oop*)ref)), + "invariant"); + IF_G1_DETAILED_STATS(note_pop()); + } else { + StarTask null_task; + ref = null_task; + } + } + + void pop_from_overflow_queue(StarTask& ref) { + StarTask new_ref = overflowed_refs()->pop(); + assert((oop*)new_ref != NULL, "pop() from a local non-empty stack"); + assert(UseCompressedOops || !new_ref.is_narrow(), "Error"); + assert(has_partial_array_mask((oop*)new_ref) || + _g1h->obj_in_cs(new_ref.is_narrow() ? oopDesc::load_decode_heap_oop((narrowOop*)new_ref) + : oopDesc::load_decode_heap_oop((oop*)new_ref)), + "invariant"); + ref = new_ref; + } + + int refs_to_scan() { return refs()->size(); } + int overflowed_refs_to_scan() { return overflowed_refs()->length(); } + + template void update_rs(HeapRegion* from, T* p, int tid) { + if (G1DeferredRSUpdate) { + deferred_rs_update(from, p, tid); + } else { + immediate_rs_update(from, p, tid); + } + } + + HeapWord* allocate_slow(GCAllocPurpose purpose, size_t word_sz) { + + HeapWord* obj = NULL; + if (word_sz * 100 < + (size_t)(G1ParallelGCAllocBufferSize / HeapWordSize) * + ParallelGCBufferWastePct) { + G1ParGCAllocBuffer* alloc_buf = alloc_buffer(purpose); + add_to_alloc_buffer_waste(alloc_buf->words_remaining()); + alloc_buf->retire(false, false); + + HeapWord* buf = + _g1h->par_allocate_during_gc(purpose, G1ParallelGCAllocBufferSize / HeapWordSize); + if (buf == NULL) return NULL; // Let caller handle allocation failure. + // Otherwise. + alloc_buf->set_buf(buf); + + obj = alloc_buf->allocate(word_sz); + assert(obj != NULL, "buffer was definitely big enough..."); + } else { + obj = _g1h->par_allocate_during_gc(purpose, word_sz); + } + return obj; + } + + HeapWord* allocate(GCAllocPurpose purpose, size_t word_sz) { + HeapWord* obj = alloc_buffer(purpose)->allocate(word_sz); + if (obj != NULL) return obj; + return allocate_slow(purpose, word_sz); + } + + void undo_allocation(GCAllocPurpose purpose, HeapWord* obj, size_t word_sz) { + if (alloc_buffer(purpose)->contains(obj)) { + assert(alloc_buffer(purpose)->contains(obj + word_sz - 1), + "should contain whole object"); + alloc_buffer(purpose)->undo_allocation(obj, word_sz); + } else { + CollectedHeap::fill_with_object(obj, word_sz); + add_to_undo_waste(word_sz); + } + } + + void set_evac_failure_closure(OopsInHeapRegionClosure* evac_failure_cl) { + _evac_failure_cl = evac_failure_cl; + } + OopsInHeapRegionClosure* evac_failure_closure() { + return _evac_failure_cl; + } + + void set_evac_closure(G1ParScanHeapEvacClosure* evac_cl) { + _evac_cl = evac_cl; + } + + void set_partial_scan_closure(G1ParScanPartialArrayClosure* partial_scan_cl) { + _partial_scan_cl = partial_scan_cl; + } + + int* hash_seed() { return &_hash_seed; } + int queue_num() { return _queue_num; } + + int term_attempts() { return _term_attempts; } + void note_term_attempt() { _term_attempts++; } + +#if G1_DETAILED_STATS + int pushes() { return _pushes; } + int pops() { return _pops; } + int steals() { return _steals; } + int steal_attempts() { return _steal_attempts; } + int overflow_pushes() { return _overflow_pushes; } + + void note_push() { _pushes++; } + void note_pop() { _pops++; } + void note_steal() { _steals++; } + void note_steal_attempt() { _steal_attempts++; } + void note_overflow_push() { _overflow_pushes++; } +#endif + + void start_strong_roots() { + _start_strong_roots = os::elapsedTime(); + } + void end_strong_roots() { + _strong_roots_time += (os::elapsedTime() - _start_strong_roots); + } + double strong_roots_time() { return _strong_roots_time; } + + void start_term_time() { + note_term_attempt(); + _start_term = os::elapsedTime(); + } + void end_term_time() { + _term_time += (os::elapsedTime() - _start_term); + } + double term_time() { return _term_time; } + + double elapsed() { + return os::elapsedTime() - _start; + } + + size_t* surviving_young_words() { + // We add on to hide entry 0 which accumulates surviving words for + // age -1 regions (i.e. non-young ones) + return _surviving_young_words; + } + + void retire_alloc_buffers() { + for (int ap = 0; ap < GCAllocPurposeCount; ++ap) { + size_t waste = _alloc_buffers[ap].words_remaining(); + add_to_alloc_buffer_waste(waste); + _alloc_buffers[ap].retire(true, false); + } + } + +private: + template void deal_with_reference(T* ref_to_scan) { + if (has_partial_array_mask(ref_to_scan)) { + _partial_scan_cl->do_oop_nv(ref_to_scan); + } else { + // Note: we can use "raw" versions of "region_containing" because + // "obj_to_scan" is definitely in the heap, and is not in a + // humongous region. + HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan); + _evac_cl->set_region(r); + _evac_cl->do_oop_nv(ref_to_scan); + } + } + +public: + void trim_queue() { + // I've replicated the loop twice, first to drain the overflow + // queue, second to drain the task queue. This is better than + // having a single loop, which checks both conditions and, inside + // it, either pops the overflow queue or the task queue, as each + // loop is tighter. Also, the decision to drain the overflow queue + // first is not arbitrary, as the overflow queue is not visible + // to the other workers, whereas the task queue is. So, we want to + // drain the "invisible" entries first, while allowing the other + // workers to potentially steal the "visible" entries. + + while (refs_to_scan() > 0 || overflowed_refs_to_scan() > 0) { + while (overflowed_refs_to_scan() > 0) { + StarTask ref_to_scan; + assert((oop*)ref_to_scan == NULL, "Constructed above"); + pop_from_overflow_queue(ref_to_scan); + // We shouldn't have pushed it on the queue if it was not + // pointing into the CSet. + assert((oop*)ref_to_scan != NULL, "Follows from inner loop invariant"); + if (ref_to_scan.is_narrow()) { + assert(UseCompressedOops, "Error"); + narrowOop* p = (narrowOop*)ref_to_scan; + assert(!has_partial_array_mask(p) && + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(p)), "sanity"); + deal_with_reference(p); + } else { + oop* p = (oop*)ref_to_scan; + assert((has_partial_array_mask(p) && _g1h->obj_in_cs(clear_partial_array_mask(p))) || + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(p)), "sanity"); + deal_with_reference(p); + } + } + + while (refs_to_scan() > 0) { + StarTask ref_to_scan; + assert((oop*)ref_to_scan == NULL, "Constructed above"); + pop_from_queue(ref_to_scan); + if ((oop*)ref_to_scan != NULL) { + if (ref_to_scan.is_narrow()) { + assert(UseCompressedOops, "Error"); + narrowOop* p = (narrowOop*)ref_to_scan; + assert(!has_partial_array_mask(p) && + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(p)), "sanity"); + deal_with_reference(p); + } else { + oop* p = (oop*)ref_to_scan; + assert((has_partial_array_mask(p) && _g1h->obj_in_cs(clear_partial_array_mask(p))) || + _g1h->obj_in_cs(oopDesc::load_decode_heap_oop(p)), "sanity"); + deal_with_reference(p); + } + } + } + } + } +}; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 2833cd704f0..bb219c59c28 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -293,10 +293,6 @@ void G1CollectorPolicy::init() { if (G1SteadyStateUsed < 50) { vm_exit_during_initialization("G1SteadyStateUsed must be at least 50%."); } - if (UseConcMarkSweepGC) { - vm_exit_during_initialization("-XX:+UseG1GC is incompatible with " - "-XX:+UseConcMarkSweepGC."); - } initialize_gc_policy_counters(); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp index 1619770a663..f710203a1e9 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp @@ -42,18 +42,6 @@ public: virtual void set_region(HeapRegion* from) { _from = from; } }; - -class G1ScanAndBalanceClosure : public OopClosure { - G1CollectedHeap* _g1; - static int _nq; -public: - G1ScanAndBalanceClosure(G1CollectedHeap* g1) : _g1(g1) { } - inline void do_oop_nv(oop* p); - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p) { guarantee(false, "NYI"); } -}; - class G1ParClosureSuper : public OopsInHeapRegionClosure { protected: G1CollectedHeap* _g1; @@ -69,34 +57,32 @@ class G1ParScanClosure : public G1ParClosureSuper { public: G1ParScanClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) : G1ParClosureSuper(g1, par_scan_state) { } - void do_oop_nv(oop* p); // should be made inline - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); virtual void do_oop(oop* p) { do_oop_nv(p); } virtual void do_oop(narrowOop* p) { do_oop_nv(p); } }; -#define G1_PARTIAL_ARRAY_MASK 1 +#define G1_PARTIAL_ARRAY_MASK 0x2 -inline bool has_partial_array_mask(oop* ref) { - return (intptr_t) ref & G1_PARTIAL_ARRAY_MASK; +template inline bool has_partial_array_mask(T* ref) { + return ((uintptr_t)ref & G1_PARTIAL_ARRAY_MASK) == G1_PARTIAL_ARRAY_MASK; } -inline oop* set_partial_array_mask(oop obj) { - return (oop*) ((intptr_t) obj | G1_PARTIAL_ARRAY_MASK); +template inline T* set_partial_array_mask(T obj) { + assert(((uintptr_t)obj & G1_PARTIAL_ARRAY_MASK) == 0, "Information loss!"); + return (T*) ((uintptr_t)obj | G1_PARTIAL_ARRAY_MASK); } -inline oop clear_partial_array_mask(oop* ref) { - return oop((intptr_t) ref & ~G1_PARTIAL_ARRAY_MASK); +template inline oop clear_partial_array_mask(T* ref) { + return oop((intptr_t)ref & ~G1_PARTIAL_ARRAY_MASK); } class G1ParScanPartialArrayClosure : public G1ParClosureSuper { G1ParScanClosure _scanner; - template void process_array_chunk(oop obj, int start, int end); public: G1ParScanPartialArrayClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) : G1ParClosureSuper(g1, par_scan_state), _scanner(g1, par_scan_state) { } - void do_oop_nv(oop* p); - void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); virtual void do_oop(oop* p) { do_oop_nv(p); } virtual void do_oop(narrowOop* p) { do_oop_nv(p); } }; @@ -105,7 +91,7 @@ public: class G1ParCopyHelper : public G1ParClosureSuper { G1ParScanClosure *_scanner; protected: - void mark_forwardee(oop* p); + template void mark_forwardee(T* p); oop copy_to_survivor_space(oop obj); public: G1ParCopyHelper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state, @@ -117,36 +103,35 @@ template class G1ParCopyClosure : public G1ParCopyHelper { G1ParScanClosure _scanner; - void do_oop_work(oop* p); - void do_oop_work(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_work(T* p); public: G1ParCopyClosure(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) : _scanner(g1, par_scan_state), G1ParCopyHelper(g1, par_scan_state, &_scanner) { } - inline void do_oop_nv(oop* p) { + template void do_oop_nv(T* p) { do_oop_work(p); if (do_mark_forwardee) mark_forwardee(p); } - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } virtual void do_oop(oop* p) { do_oop_nv(p); } virtual void do_oop(narrowOop* p) { do_oop_nv(p); } }; typedef G1ParCopyClosure G1ParScanExtRootClosure; typedef G1ParCopyClosure G1ParScanPermClosure; +typedef G1ParCopyClosure G1ParScanHeapRSClosure; typedef G1ParCopyClosure G1ParScanAndMarkExtRootClosure; typedef G1ParCopyClosure G1ParScanAndMarkPermClosure; -typedef G1ParCopyClosure G1ParScanHeapRSClosure; typedef G1ParCopyClosure G1ParScanAndMarkHeapRSClosure; // This is the only case when we set skip_cset_test. Basically, this // closure is (should?) only be called directly while we're draining // the overflow and task queues. In that case we know that the // reference in question points into the collection set, otherwise we -// would not have pushed it on the queue. -typedef G1ParCopyClosure G1ParScanHeapEvacClosure; +// would not have pushed it on the queue. The following is defined in +// g1_specialized_oop_closures.hpp. +// typedef G1ParCopyClosure G1ParScanHeapEvacClosure; // We need a separate closure to handle references during evacuation -// failure processing, as it cannot asume that the reference already - // points to the collection set (like G1ParScanHeapEvacClosure does). +// failure processing, as we cannot asume that the reference already +// points into the collection set (like G1ParScanHeapEvacClosure does). typedef G1ParCopyClosure G1ParScanHeapEvacFailureClosure; class FilterIntoCSClosure: public OopClosure { @@ -158,10 +143,9 @@ public: G1CollectedHeap* g1, OopClosure* oc) : _dcto_cl(dcto_cl), _g1(g1), _oc(oc) {} - inline void do_oop_nv(oop* p); - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } bool apply_to_weak_ref_discovered_field() { return true; } bool do_header() { return false; } }; @@ -174,10 +158,9 @@ public: OopsInHeapRegionClosure* oc) : _g1(g1), _oc(oc) {} - inline void do_oop_nv(oop* p); - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } bool apply_to_weak_ref_discovered_field() { return true; } bool do_header() { return false; } void set_region(HeapRegion* from) { @@ -195,10 +178,9 @@ public: ConcurrentMark* cm) : _g1(g1), _oc(oc), _cm(cm) { } - inline void do_oop_nv(oop* p); - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } bool apply_to_weak_ref_discovered_field() { return true; } bool do_header() { return false; } void set_region(HeapRegion* from) { @@ -213,10 +195,9 @@ class FilterOutOfRegionClosure: public OopClosure { int _out_of_region; public: FilterOutOfRegionClosure(HeapRegion* r, OopClosure* oc); - inline void do_oop_nv(oop* p); - inline void do_oop_nv(narrowOop* p) { guarantee(false, "NYI"); } - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p) { guarantee(false, "NYI"); } + template void do_oop_nv(T* p); + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } bool apply_to_weak_ref_discovered_field() { return true; } bool do_header() { return false; } int out_of_region() { return _out_of_region; } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp index fdca16083fc..2ba92a7f8d3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp @@ -31,9 +31,10 @@ // perf-critical inner loop. #define FILTERINTOCSCLOSURE_DOHISTOGRAMCOUNT 0 -inline void FilterIntoCSClosure::do_oop_nv(oop* p) { - oop obj = *p; - if (obj != NULL && _g1->obj_in_cs(obj)) { +template inline void FilterIntoCSClosure::do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop) && + _g1->obj_in_cs(oopDesc::decode_heap_oop_not_null(heap_oop))) { _oc->do_oop(p); #if FILTERINTOCSCLOSURE_DOHISTOGRAMCOUNT _dcto_cl->incr_count(); @@ -41,44 +42,32 @@ inline void FilterIntoCSClosure::do_oop_nv(oop* p) { } } -inline void FilterIntoCSClosure::do_oop(oop* p) -{ - do_oop_nv(p); -} - #define FILTEROUTOFREGIONCLOSURE_DOHISTOGRAMCOUNT 0 -inline void FilterOutOfRegionClosure::do_oop_nv(oop* p) { - oop obj = *p; - HeapWord* obj_hw = (HeapWord*)obj; - if (obj_hw != NULL && (obj_hw < _r_bottom || obj_hw >= _r_end)) { - _oc->do_oop(p); +template inline void FilterOutOfRegionClosure::do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + HeapWord* obj_hw = (HeapWord*)oopDesc::decode_heap_oop_not_null(heap_oop); + if (obj_hw < _r_bottom || obj_hw >= _r_end) { + _oc->do_oop(p); #if FILTEROUTOFREGIONCLOSURE_DOHISTOGRAMCOUNT - _out_of_region++; + _out_of_region++; #endif + } } } -inline void FilterOutOfRegionClosure::do_oop(oop* p) -{ - do_oop_nv(p); -} - -inline void FilterInHeapRegionAndIntoCSClosure::do_oop_nv(oop* p) { - oop obj = *p; - if (obj != NULL && _g1->obj_in_cs(obj)) +template inline void FilterInHeapRegionAndIntoCSClosure::do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop) && + _g1->obj_in_cs(oopDesc::decode_heap_oop_not_null(heap_oop))) _oc->do_oop(p); } -inline void FilterInHeapRegionAndIntoCSClosure::do_oop(oop* p) -{ - do_oop_nv(p); -} - - -inline void FilterAndMarkInHeapRegionAndIntoCSClosure::do_oop_nv(oop* p) { - oop obj = *p; - if (obj != NULL) { +template inline void FilterAndMarkInHeapRegionAndIntoCSClosure::do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); HeapRegion* hr = _g1->heap_region_containing((HeapWord*) obj); if (hr != NULL) { if (hr->in_collection_set()) @@ -89,24 +78,29 @@ inline void FilterAndMarkInHeapRegionAndIntoCSClosure::do_oop_nv(oop* p) { } } -inline void FilterAndMarkInHeapRegionAndIntoCSClosure::do_oop(oop* p) -{ - do_oop_nv(p); -} +// This closure is applied to the fields of the objects that have just been copied. +template inline void G1ParScanClosure::do_oop_nv(T* p) { + T heap_oop = oopDesc::load_heap_oop(p); -inline void G1ScanAndBalanceClosure::do_oop_nv(oop* p) { - RefToScanQueue* q; - if (ParallelGCThreads > 0) { - // Deal the work out equally. - _nq = (_nq + 1) % ParallelGCThreads; - q = _g1->task_queue(_nq); - } else { - q = _g1->task_queue(0); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); + if (_g1->in_cset_fast_test(obj)) { + // We're not going to even bother checking whether the object is + // already forwarded or not, as this usually causes an immediate + // stall. We'll try to prefetch the object (for write, given that + // we might need to install the forwarding reference) and we'll + // get back to it when pop it from the queue + Prefetch::write(obj->mark_addr(), 0); + Prefetch::read(obj->mark_addr(), (HeapWordSize*2)); + + // slightly paranoid test; I'm trying to catch potential + // problems before we go into push_on_queue to know where the + // problem is coming from + assert(obj == oopDesc::load_decode_heap_oop(p), + "p should still be pointing to obj"); + _par_scan_state->push_on_queue(p); + } else { + _par_scan_state->update_rs(_from, p, _par_scan_state->queue_num()); + } } - bool nooverflow = q->push(p); - guarantee(nooverflow, "Overflow during poplularity region processing"); -} - -inline void G1ScanAndBalanceClosure::do_oop(oop* p) { - do_oop_nv(p); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp index 86a39a7f0a8..9c36026174e 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp @@ -65,11 +65,10 @@ public: void set_region(HeapRegion* from) { _blk->set_region(from); } - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - virtual void do_oop(oop* p) { - oop obj = *p; + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { + oop obj = oopDesc::load_decode_heap_oop(p); if (_g1->obj_in_cs(obj)) _blk->do_oop(p); } bool apply_to_weak_ref_discovered_field() { return true; } @@ -110,11 +109,10 @@ class VerifyRSCleanCardOopClosure: public OopClosure { public: VerifyRSCleanCardOopClosure(G1CollectedHeap* g1) : _g1(g1) {} - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - virtual void do_oop(oop* p) { - oop obj = *p; + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { + oop obj = oopDesc::load_decode_heap_oop(p); HeapRegion* to = _g1->heap_region_containing(obj); guarantee(to == NULL || !to->in_collection_set(), "Missed a rem set member."); @@ -129,9 +127,9 @@ HRInto_G1RemSet::HRInto_G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) { _seq_task = new SubTasksDone(NumSeqTasks); guarantee(n_workers() > 0, "There should be some workers"); - _new_refs = NEW_C_HEAP_ARRAY(GrowableArray*, n_workers()); + _new_refs = NEW_C_HEAP_ARRAY(GrowableArray*, n_workers()); for (uint i = 0; i < n_workers(); i++) { - _new_refs[i] = new (ResourceObj::C_HEAP) GrowableArray(8192,true); + _new_refs[i] = new (ResourceObj::C_HEAP) GrowableArray(8192,true); } } @@ -140,7 +138,7 @@ HRInto_G1RemSet::~HRInto_G1RemSet() { for (uint i = 0; i < n_workers(); i++) { delete _new_refs[i]; } - FREE_C_HEAP_ARRAY(GrowableArray*, _new_refs); + FREE_C_HEAP_ARRAY(GrowableArray*, _new_refs); } void CountNonCleanMemRegionClosure::do_MemRegion(MemRegion mr) { @@ -428,15 +426,15 @@ public: } }; -void -HRInto_G1RemSet::scanNewRefsRS(OopsInHeapRegionClosure* oc, - int worker_i) { +template void +HRInto_G1RemSet::scanNewRefsRS_work(OopsInHeapRegionClosure* oc, + int worker_i) { double scan_new_refs_start_sec = os::elapsedTime(); G1CollectedHeap* g1h = G1CollectedHeap::heap(); CardTableModRefBS* ct_bs = (CardTableModRefBS*) (g1h->barrier_set()); for (int i = 0; i < _new_refs[worker_i]->length(); i++) { - oop* p = _new_refs[worker_i]->at(i); - oop obj = *p; + T* p = (T*) _new_refs[worker_i]->at(i); + oop obj = oopDesc::load_decode_heap_oop(p); // *p was in the collection set when p was pushed on "_new_refs", but // another thread may have processed this location from an RS, so it // might not point into the CS any longer. If so, it's obviously been @@ -549,11 +547,10 @@ class UpdateRSetOopsIntoCSImmediate : public OopClosure { G1CollectedHeap* _g1; public: UpdateRSetOopsIntoCSImmediate(G1CollectedHeap* g1) : _g1(g1) { } - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - virtual void do_oop(oop* p) { - HeapRegion* to = _g1->heap_region_containing(*p); + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { + HeapRegion* to = _g1->heap_region_containing(oopDesc::load_decode_heap_oop(p)); if (to->in_collection_set()) { to->rem_set()->add_reference(p, 0); } @@ -567,11 +564,10 @@ class UpdateRSetOopsIntoCSDeferred : public OopClosure { public: UpdateRSetOopsIntoCSDeferred(G1CollectedHeap* g1, DirtyCardQueue* dcq) : _g1(g1), _ct_bs((CardTableModRefBS*)_g1->barrier_set()), _dcq(dcq) { } - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } - virtual void do_oop(oop* p) { - oop obj = *p; + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } + template void do_oop_work(T* p) { + oop obj = oopDesc::load_decode_heap_oop(p); if (_g1->obj_in_cs(obj)) { size_t card_index = _ct_bs->index_for(p); if (_ct_bs->mark_card_deferred(card_index)) { @@ -581,10 +577,10 @@ public: } }; -void HRInto_G1RemSet::new_refs_iterate(OopClosure* cl) { +template void HRInto_G1RemSet::new_refs_iterate_work(OopClosure* cl) { for (size_t i = 0; i < n_workers(); i++) { for (int j = 0; j < _new_refs[i]->length(); j++) { - oop* p = _new_refs[i]->at(j); + T* p = (T*) _new_refs[i]->at(j); cl->do_oop(p); } } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp index 4d58e0be6a1..60ba420d8be 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp @@ -62,10 +62,12 @@ public: // If "this" is of the given subtype, return "this", else "NULL". virtual HRInto_G1RemSet* as_HRInto_G1RemSet() { return NULL; } - // Record, if necessary, the fact that *p (where "p" is in region "from") - // has changed to its new value. + // Record, if necessary, the fact that *p (where "p" is in region "from", + // and is, a fortiori, required to be non-NULL) has changed to its new value. virtual void write_ref(HeapRegion* from, oop* p) = 0; + virtual void write_ref(HeapRegion* from, narrowOop* p) = 0; virtual void par_write_ref(HeapRegion* from, oop* p, int tid) = 0; + virtual void par_write_ref(HeapRegion* from, narrowOop* p, int tid) = 0; // Requires "region_bm" and "card_bm" to be bitmaps with 1 bit per region // or card, respectively, such that a region or card with a corresponding @@ -105,7 +107,9 @@ public: // Nothing is necessary in the version below. void write_ref(HeapRegion* from, oop* p) {} + void write_ref(HeapRegion* from, narrowOop* p) {} void par_write_ref(HeapRegion* from, oop* p, int tid) {} + void par_write_ref(HeapRegion* from, narrowOop* p, int tid) {} void scrub(BitMap* region_bm, BitMap* card_bm) {} void scrub_par(BitMap* region_bm, BitMap* card_bm, @@ -143,8 +147,19 @@ protected: // their references into the collection summarized in "_new_refs". bool _par_traversal_in_progress; void set_par_traversal(bool b) { _par_traversal_in_progress = b; } - GrowableArray** _new_refs; - void new_refs_iterate(OopClosure* cl); + GrowableArray** _new_refs; + template void new_refs_iterate_work(OopClosure* cl); + void new_refs_iterate(OopClosure* cl) { + if (UseCompressedOops) { + new_refs_iterate_work(cl); + } else { + new_refs_iterate_work(cl); + } + } + +protected: + template void write_ref_nv(HeapRegion* from, T* p); + template void par_write_ref_nv(HeapRegion* from, T* p, int tid); public: // This is called to reset dual hash tables after the gc pause @@ -161,7 +176,14 @@ public: void prepare_for_oops_into_collection_set_do(); void cleanup_after_oops_into_collection_set_do(); void scanRS(OopsInHeapRegionClosure* oc, int worker_i); - void scanNewRefsRS(OopsInHeapRegionClosure* oc, int worker_i); + template void scanNewRefsRS_work(OopsInHeapRegionClosure* oc, int worker_i); + void scanNewRefsRS(OopsInHeapRegionClosure* oc, int worker_i) { + if (UseCompressedOops) { + scanNewRefsRS_work(oc, worker_i); + } else { + scanNewRefsRS_work(oc, worker_i); + } + } void updateRS(int worker_i); HeapRegion* calculateStartRegion(int i); @@ -172,12 +194,22 @@ public: // Record, if necessary, the fact that *p (where "p" is in region "from", // which is required to be non-NULL) has changed to a new non-NULL value. - inline void write_ref(HeapRegion* from, oop* p); - // The "_nv" version is the same; it exists just so that it is not virtual. - inline void write_ref_nv(HeapRegion* from, oop* p); + // [Below the virtual version calls a non-virtual protected + // workhorse that is templatified for narrow vs wide oop.] + inline void write_ref(HeapRegion* from, oop* p) { + write_ref_nv(from, p); + } + inline void write_ref(HeapRegion* from, narrowOop* p) { + write_ref_nv(from, p); + } + inline void par_write_ref(HeapRegion* from, oop* p, int tid) { + par_write_ref_nv(from, p, tid); + } + inline void par_write_ref(HeapRegion* from, narrowOop* p, int tid) { + par_write_ref_nv(from, p, tid); + } - inline bool self_forwarded(oop obj); - inline void par_write_ref(HeapRegion* from, oop* p, int tid); + bool self_forwarded(oop obj); void scrub(BitMap* region_bm, BitMap* card_bm); void scrub_par(BitMap* region_bm, BitMap* card_bm, @@ -208,6 +240,9 @@ class UpdateRSOopClosure: public OopClosure { HeapRegion* _from; HRInto_G1RemSet* _rs; int _worker_i; + + template void do_oop_work(T* p); + public: UpdateRSOopClosure(HRInto_G1RemSet* rs, int worker_i = 0) : _from(NULL), _rs(rs), _worker_i(worker_i) { @@ -219,11 +254,10 @@ public: _from = from; } - virtual void do_oop(narrowOop* p); - virtual void do_oop(oop* p); + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop(oop* p) { do_oop_work(p); } // Override: this closure is idempotent. // bool idempotent() { return true; } bool apply_to_weak_ref_discovered_field() { return true; } }; - diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp index 00aa14452c2..f14c54031bd 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp @@ -30,12 +30,8 @@ inline size_t G1RemSet::n_workers() { } } -inline void HRInto_G1RemSet::write_ref_nv(HeapRegion* from, oop* p) { - par_write_ref(from, p, 0); -} - -inline void HRInto_G1RemSet::write_ref(HeapRegion* from, oop* p) { - write_ref_nv(from, p); +template inline void HRInto_G1RemSet::write_ref_nv(HeapRegion* from, T* p) { + par_write_ref_nv(from, p, 0); } inline bool HRInto_G1RemSet::self_forwarded(oop obj) { @@ -43,8 +39,8 @@ inline bool HRInto_G1RemSet::self_forwarded(oop obj) { return result; } -inline void HRInto_G1RemSet::par_write_ref(HeapRegion* from, oop* p, int tid) { - oop obj = *p; +template inline void HRInto_G1RemSet::par_write_ref_nv(HeapRegion* from, T* p, int tid) { + oop obj = oopDesc::load_decode_heap_oop(p); #ifdef ASSERT // can't do because of races // assert(obj == NULL || obj->is_oop(), "expected an oop"); @@ -71,7 +67,7 @@ inline void HRInto_G1RemSet::par_write_ref(HeapRegion* from, oop* p, int tid) { // false during the evacuation failure handing. if (_par_traversal_in_progress && to->in_collection_set() && !self_forwarded(obj)) { - _new_refs[tid]->push(p); + _new_refs[tid]->push((void*)p); // Deferred updates to the Cset are either discarded (in the normal case), // or processed (if an evacuation failure occurs) at the end // of the collection. @@ -89,11 +85,7 @@ inline void HRInto_G1RemSet::par_write_ref(HeapRegion* from, oop* p, int tid) { } } -inline void UpdateRSOopClosure::do_oop(narrowOop* p) { - guarantee(false, "NYI"); -} - -inline void UpdateRSOopClosure::do_oop(oop* p) { +template inline void UpdateRSOopClosure::do_oop_work(T* p) { assert(_from != NULL, "from region must be non-NULL"); _rs->par_write_ref(_from, p, _worker_i); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp index 37414989eb9..f82b8ba8fe9 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp @@ -34,6 +34,7 @@ G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap, void G1SATBCardTableModRefBS::enqueue(oop pre_val) { + assert(pre_val->is_oop_or_null(true), "Error"); if (!JavaThread::satb_mark_queue_set().active()) return; Thread* thr = Thread::current(); if (thr->is_Java_thread()) { @@ -46,32 +47,31 @@ void G1SATBCardTableModRefBS::enqueue(oop pre_val) { } // When we know the current java thread: -void -G1SATBCardTableModRefBS::write_ref_field_pre_static(void* field, - oop newVal, +template void +G1SATBCardTableModRefBS::write_ref_field_pre_static(T* field, + oop new_val, JavaThread* jt) { if (!JavaThread::satb_mark_queue_set().active()) return; - assert(!UseCompressedOops, "Else will need to modify this to deal with narrowOop"); - oop preVal = *(oop*)field; - if (preVal != NULL) { - jt->satb_mark_queue().enqueue(preVal); + T heap_oop = oopDesc::load_heap_oop(field); + if (!oopDesc::is_null(heap_oop)) { + oop pre_val = oopDesc::decode_heap_oop_not_null(heap_oop); + assert(pre_val->is_oop(true /* ignore mark word */), "Error"); + jt->satb_mark_queue().enqueue(pre_val); } } -void -G1SATBCardTableModRefBS::write_ref_array_pre(MemRegion mr) { +template void +G1SATBCardTableModRefBS::write_ref_array_pre_work(T* dst, int count) { if (!JavaThread::satb_mark_queue_set().active()) return; - assert(!UseCompressedOops, "Else will need to modify this to deal with narrowOop"); - oop* elem_ptr = (oop*)mr.start(); - while ((HeapWord*)elem_ptr < mr.end()) { - oop elem = *elem_ptr; - if (elem != NULL) enqueue(elem); - elem_ptr++; + T* elem_ptr = dst; + for (int i = 0; i < count; i++, elem_ptr++) { + T heap_oop = oopDesc::load_heap_oop(elem_ptr); + if (!oopDesc::is_null(heap_oop)) { + enqueue(oopDesc::decode_heap_oop_not_null(heap_oop)); + } } } - - G1SATBCardTableLoggingModRefBS:: G1SATBCardTableLoggingModRefBS(MemRegion whole_heap, int max_covered_regions) : diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp index 86f8283d449..5a5283e6878 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp @@ -47,31 +47,41 @@ public: // This notes that we don't need to access any BarrierSet data // structures, so this can be called from a static context. - static void write_ref_field_pre_static(void* field, oop newVal) { - assert(!UseCompressedOops, "Else needs to be templatized"); - oop preVal = *((oop*)field); - if (preVal != NULL) { - enqueue(preVal); + template static void write_ref_field_pre_static(T* field, oop newVal) { + T heap_oop = oopDesc::load_heap_oop(field); + if (!oopDesc::is_null(heap_oop)) { + enqueue(oopDesc::decode_heap_oop(heap_oop)); } } // When we know the current java thread: - static void write_ref_field_pre_static(void* field, oop newVal, - JavaThread* jt); + template static void write_ref_field_pre_static(T* field, oop newVal, + JavaThread* jt); // We export this to make it available in cases where the static // type of the barrier set is known. Note that it is non-virtual. - inline void inline_write_ref_field_pre(void* field, oop newVal) { + template inline void inline_write_ref_field_pre(T* field, oop newVal) { write_ref_field_pre_static(field, newVal); } - // This is the more general virtual version. - void write_ref_field_pre_work(void* field, oop new_val) { + // These are the more general virtual versions. + virtual void write_ref_field_pre_work(oop* field, oop new_val) { inline_write_ref_field_pre(field, new_val); } + virtual void write_ref_field_pre_work(narrowOop* field, oop new_val) { + inline_write_ref_field_pre(field, new_val); + } + virtual void write_ref_field_pre_work(void* field, oop new_val) { + guarantee(false, "Not needed"); + } - virtual void write_ref_array_pre(MemRegion mr); - + template void write_ref_array_pre_work(T* dst, int count); + virtual void write_ref_array_pre(oop* dst, int count) { + write_ref_array_pre_work(dst, count); + } + virtual void write_ref_array_pre(narrowOop* dst, int count) { + write_ref_array_pre_work(dst, count); + } }; // Adds card-table logging to the post-barrier. diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp index 5b296e204d0..8e134bb3fbf 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp @@ -80,9 +80,6 @@ develop(bool, G1TraceConcurrentRefinement, false, \ "Trace G1 concurrent refinement") \ \ - develop(bool, G1ConcMark, true, \ - "If true, run concurrent marking for G1") \ - \ product(intx, G1MarkStackSize, 2 * 1024 * 1024, \ "Size of the mark stack for concurrent marking.") \ \ diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp index 5171bdb62cb..101d330077e 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp @@ -37,14 +37,12 @@ template - G1ParScanHeapEvacClosure; +typedef G1ParCopyClosure G1ParScanHeapEvacClosure; class FilterIntoCSClosure; class FilterOutOfRegionClosure; class FilterInHeapRegionAndIntoCSClosure; class FilterAndMarkInHeapRegionAndIntoCSClosure; -class G1ScanAndBalanceClosure; #ifdef FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES #error "FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES already defined." @@ -56,8 +54,7 @@ class G1ScanAndBalanceClosure; f(FilterIntoCSClosure,_nv) \ f(FilterOutOfRegionClosure,_nv) \ f(FilterInHeapRegionAndIntoCSClosure,_nv) \ - f(FilterAndMarkInHeapRegionAndIntoCSClosure,_nv) \ - f(G1ScanAndBalanceClosure,_nv) + f(FilterAndMarkInHeapRegionAndIntoCSClosure,_nv) #ifdef FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES #error "FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES already defined." diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp index 43af2b52cb7..20876c602c6 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -66,16 +66,16 @@ public: bool failures() { return _failures; } int n_failures() { return _n_failures; } - virtual void do_oop(narrowOop* p) { - guarantee(false, "NYI"); - } + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } - void do_oop(oop* p) { + template void do_oop_work(T* p) { assert(_containing_obj != NULL, "Precondition"); assert(!_g1h->is_obj_dead_cond(_containing_obj, _use_prev_marking), "Precondition"); - oop obj = *p; - if (obj != NULL) { + T heap_oop = oopDesc::load_heap_oop(p); + if (!oopDesc::is_null(heap_oop)) { + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); bool failed = false; if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead_cond(obj, _use_prev_marking)) { @@ -106,8 +106,8 @@ public: } if (!_g1h->full_collection()) { - HeapRegion* from = _g1h->heap_region_containing(p); - HeapRegion* to = _g1h->heap_region_containing(*p); + HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); + HeapRegion* to = _g1h->heap_region_containing(obj); if (from != NULL && to != NULL && from != to && !to->isHumongous()) { @@ -534,13 +534,13 @@ HeapRegion::object_iterate_mem_careful(MemRegion mr, // Otherwise, find the obj that extends onto mr.start(). assert(cur <= mr.start() - && (oop(cur)->klass() == NULL || + && (oop(cur)->klass_or_null() == NULL || cur + oop(cur)->size() > mr.start()), "postcondition of block_start"); oop obj; while (cur < mr.end()) { obj = oop(cur); - if (obj->klass() == NULL) { + if (obj->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; } else if (!g1h->is_obj_dead(obj)) { @@ -577,7 +577,7 @@ oops_on_card_seq_iterate_careful(MemRegion mr, assert(cur <= mr.start(), "Postcondition"); while (cur <= mr.start()) { - if (oop(cur)->klass() == NULL) { + if (oop(cur)->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; } @@ -591,7 +591,7 @@ oops_on_card_seq_iterate_careful(MemRegion mr, obj = oop(cur); // If we finish this loop... assert(cur <= mr.start() - && obj->klass() != NULL + && obj->klass_or_null() != NULL && cur + obj->size() > mr.start(), "Loop postcondition"); if (!g1h->is_obj_dead(obj)) { @@ -601,7 +601,7 @@ oops_on_card_seq_iterate_careful(MemRegion mr, HeapWord* next; while (cur < mr.end()) { obj = oop(cur); - if (obj->klass() == NULL) { + if (obj->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; }; @@ -781,8 +781,13 @@ void G1OffsetTableContigSpace::set_saved_mark() { // will pick up the right saved_mark_word() as the high water mark // of the region. Either way, the behaviour will be correct. ContiguousSpace::set_saved_mark(); + OrderAccess::storestore(); _gc_time_stamp = curr_gc_time_stamp; - OrderAccess::fence(); + // The following fence is to force a flush of the writes above, but + // is strictly not needed because when an allocating worker thread + // calls set_saved_mark() it does so under the ParGCRareEvent_lock; + // when the lock is released, the write will be flushed. + // OrderAccess::fence(); } } diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp index 5fb5762811c..f52a1ff2a42 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @@ -126,7 +126,7 @@ protected: } } - void add_reference_work(oop* from, bool par) { + void add_reference_work(OopOrNarrowOopStar from, bool par) { // Must make this robust in case "from" is not in "_hr", because of // concurrency. @@ -173,11 +173,11 @@ public: _bm.clear(); } - void add_reference(oop* from) { + void add_reference(OopOrNarrowOopStar from) { add_reference_work(from, /*parallel*/ true); } - void seq_add_reference(oop* from) { + void seq_add_reference(OopOrNarrowOopStar from) { add_reference_work(from, /*parallel*/ false); } @@ -220,7 +220,7 @@ public: } // Requires "from" to be in "hr()". - bool contains_reference(oop* from) const { + bool contains_reference(OopOrNarrowOopStar from) const { assert(hr()->is_in_reserved(from), "Precondition."); size_t card_ind = pointer_delta(from, hr()->bottom(), CardTableModRefBS::card_size); @@ -394,7 +394,7 @@ public: void set_next(PosParPRT* nxt) { _next = nxt; } PosParPRT** next_addr() { return &_next; } - void add_reference(oop* from, int tid) { + void add_reference(OopOrNarrowOopStar from, int tid) { // Expand if necessary. PerRegionTable** pt = par_tables(); if (par_tables() == NULL && tid > 0 && hr()->is_gc_alloc_region()) { @@ -447,7 +447,7 @@ public: return res; } - bool contains_reference(oop* from) const { + bool contains_reference(OopOrNarrowOopStar from) const { if (PerRegionTable::contains_reference(from)) return true; if (_par_tables != NULL) { for (int i = 0; i < HeapRegionRemSet::num_par_rem_sets()-1; i++) { @@ -564,12 +564,15 @@ void OtherRegionsTable::print_from_card_cache() { } #endif -void OtherRegionsTable::add_reference(oop* from, int tid) { +void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, int tid) { size_t cur_hrs_ind = hr()->hrs_index(); #if HRRS_VERBOSE gclog_or_tty->print_cr("ORT::add_reference_work(" PTR_FORMAT "->" PTR_FORMAT ").", - from, *from); + from, + UseCompressedOops + ? oopDesc::load_decode_heap_oop((narrowOop*)from) + : oopDesc::load_decode_heap_oop((oop*)from)); #endif int from_card = (int)(uintptr_t(from) >> CardTableModRefBS::card_shift); @@ -1021,13 +1024,13 @@ bool OtherRegionsTable::del_single_region_table(size_t ind, } } -bool OtherRegionsTable::contains_reference(oop* from) const { +bool OtherRegionsTable::contains_reference(OopOrNarrowOopStar from) const { // Cast away const in this case. MutexLockerEx x((Mutex*)&_m, Mutex::_no_safepoint_check_flag); return contains_reference_locked(from); } -bool OtherRegionsTable::contains_reference_locked(oop* from) const { +bool OtherRegionsTable::contains_reference_locked(OopOrNarrowOopStar from) const { HeapRegion* hr = _g1h->heap_region_containing_raw(from); if (hr == NULL) return false; RegionIdx_t hr_ind = (RegionIdx_t) hr->hrs_index(); @@ -1288,24 +1291,24 @@ bool HeapRegionRemSetIterator::has_next(size_t& card_index) { -oop** HeapRegionRemSet::_recorded_oops = NULL; -HeapWord** HeapRegionRemSet::_recorded_cards = NULL; -HeapRegion** HeapRegionRemSet::_recorded_regions = NULL; -int HeapRegionRemSet::_n_recorded = 0; +OopOrNarrowOopStar* HeapRegionRemSet::_recorded_oops = NULL; +HeapWord** HeapRegionRemSet::_recorded_cards = NULL; +HeapRegion** HeapRegionRemSet::_recorded_regions = NULL; +int HeapRegionRemSet::_n_recorded = 0; HeapRegionRemSet::Event* HeapRegionRemSet::_recorded_events = NULL; int* HeapRegionRemSet::_recorded_event_index = NULL; int HeapRegionRemSet::_n_recorded_events = 0; -void HeapRegionRemSet::record(HeapRegion* hr, oop* f) { +void HeapRegionRemSet::record(HeapRegion* hr, OopOrNarrowOopStar f) { if (_recorded_oops == NULL) { assert(_n_recorded == 0 && _recorded_cards == NULL && _recorded_regions == NULL, "Inv"); - _recorded_oops = NEW_C_HEAP_ARRAY(oop*, MaxRecorded); - _recorded_cards = NEW_C_HEAP_ARRAY(HeapWord*, MaxRecorded); - _recorded_regions = NEW_C_HEAP_ARRAY(HeapRegion*, MaxRecorded); + _recorded_oops = NEW_C_HEAP_ARRAY(OopOrNarrowOopStar, MaxRecorded); + _recorded_cards = NEW_C_HEAP_ARRAY(HeapWord*, MaxRecorded); + _recorded_regions = NEW_C_HEAP_ARRAY(HeapRegion*, MaxRecorded); } if (_n_recorded == MaxRecorded) { gclog_or_tty->print_cr("Filled up 'recorded' (%d).", MaxRecorded); @@ -1408,21 +1411,21 @@ void HeapRegionRemSet::test() { HeapRegionRemSet* hrrs = hr0->rem_set(); // Make three references from region 0x101... - hrrs->add_reference((oop*)hr1_start); - hrrs->add_reference((oop*)hr1_mid); - hrrs->add_reference((oop*)hr1_last); + hrrs->add_reference((OopOrNarrowOopStar)hr1_start); + hrrs->add_reference((OopOrNarrowOopStar)hr1_mid); + hrrs->add_reference((OopOrNarrowOopStar)hr1_last); - hrrs->add_reference((oop*)hr2_start); - hrrs->add_reference((oop*)hr2_mid); - hrrs->add_reference((oop*)hr2_last); + hrrs->add_reference((OopOrNarrowOopStar)hr2_start); + hrrs->add_reference((OopOrNarrowOopStar)hr2_mid); + hrrs->add_reference((OopOrNarrowOopStar)hr2_last); - hrrs->add_reference((oop*)hr3_start); - hrrs->add_reference((oop*)hr3_mid); - hrrs->add_reference((oop*)hr3_last); + hrrs->add_reference((OopOrNarrowOopStar)hr3_start); + hrrs->add_reference((OopOrNarrowOopStar)hr3_mid); + hrrs->add_reference((OopOrNarrowOopStar)hr3_last); // Now cause a coarsening. - hrrs->add_reference((oop*)hr4->bottom()); - hrrs->add_reference((oop*)hr5->bottom()); + hrrs->add_reference((OopOrNarrowOopStar)hr4->bottom()); + hrrs->add_reference((OopOrNarrowOopStar)hr5->bottom()); // Now, does iteration yield these three? HeapRegionRemSetIterator iter; diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp index d6309815251..d525b5ad306 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @@ -116,9 +116,9 @@ public: // For now. Could "expand" some tables in the future, so that this made // sense. - void add_reference(oop* from, int tid); + void add_reference(OopOrNarrowOopStar from, int tid); - void add_reference(oop* from) { + void add_reference(OopOrNarrowOopStar from) { return add_reference(from, 0); } @@ -140,8 +140,8 @@ public: static size_t static_mem_size(); static size_t fl_mem_size(); - bool contains_reference(oop* from) const; - bool contains_reference_locked(oop* from) const; + bool contains_reference(OopOrNarrowOopStar from) const; + bool contains_reference_locked(OopOrNarrowOopStar from) const; void clear(); @@ -192,10 +192,10 @@ private: // Unused unless G1RecordHRRSOops is true. static const int MaxRecorded = 1000000; - static oop** _recorded_oops; - static HeapWord** _recorded_cards; - static HeapRegion** _recorded_regions; - static int _n_recorded; + static OopOrNarrowOopStar* _recorded_oops; + static HeapWord** _recorded_cards; + static HeapRegion** _recorded_regions; + static int _n_recorded; static const int MaxRecordedEvents = 1000; static Event* _recorded_events; @@ -231,13 +231,13 @@ public: /* Used in the sequential case. Returns "true" iff this addition causes the size limit to be reached. */ - void add_reference(oop* from) { + void add_reference(OopOrNarrowOopStar from) { _other_regions.add_reference(from); } /* Used in the parallel case. Returns "true" iff this addition causes the size limit to be reached. */ - void add_reference(oop* from, int tid) { + void add_reference(OopOrNarrowOopStar from, int tid) { _other_regions.add_reference(from, tid); } @@ -301,7 +301,7 @@ public: return OtherRegionsTable::fl_mem_size(); } - bool contains_reference(oop* from) const { + bool contains_reference(OopOrNarrowOopStar from) const { return _other_regions.contains_reference(from); } void print() const; @@ -329,7 +329,7 @@ public: } #endif - static void record(HeapRegion* hr, oop* f); + static void record(HeapRegion* hr, OopOrNarrowOopStar f); static void print_recorded(); static void record_event(Event evnt); diff --git a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp index a3e74a41ce0..3cf402ce7a8 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.cpp @@ -43,6 +43,18 @@ void ObjPtrQueue::apply_closure_to_buffer(ObjectClosure* cl, } } } + +#ifdef ASSERT +void ObjPtrQueue::verify_oops_in_buffer() { + if (_buf == NULL) return; + for (size_t i = _index; i < _sz; i += oopSize) { + oop obj = (oop)_buf[byte_index_to_index((int)i)]; + assert(obj != NULL && obj->is_oop(true /* ignore mark word */), + "Not an oop"); + } +} +#endif + #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away #pragma warning( disable:4355 ) // 'this' : used in base member initializer list #endif // _MSC_VER @@ -66,6 +78,7 @@ void SATBMarkQueueSet::initialize(Monitor* cbl_mon, Mutex* fl_lock, void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) { + DEBUG_ONLY(t->satb_mark_queue().verify_oops_in_buffer();) t->satb_mark_queue().handle_zero_index(); } @@ -143,7 +156,7 @@ void SATBMarkQueueSet::abandon_partial_marking() { } _completed_buffers_tail = NULL; _n_completed_buffers = 0; - debug_only(assert_completed_buffer_list_len_correct_locked()); + DEBUG_ONLY(assert_completed_buffer_list_len_correct_locked()); } while (buffers_to_delete != NULL) { CompletedBufferNode* nd = buffers_to_delete; diff --git a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp index ab8bf5fa4ab..ed1181dd79f 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp @@ -39,6 +39,7 @@ public: static void apply_closure_to_buffer(ObjectClosure* cl, void** buf, size_t index, size_t sz); + void verify_oops_in_buffer() NOT_DEBUG_RETURN; }; diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 index f7236edafe6..7e2df3fc8af 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 @@ -27,6 +27,7 @@ bufferingOopClosure.hpp genOopClosures.hpp bufferingOopClosure.hpp generation.hpp bufferingOopClosure.hpp os.hpp +bufferingOopClosure.hpp taskqueue.hpp cardTableRS.cpp concurrentMark.hpp cardTableRS.cpp g1SATBCardTableModRefBS.hpp @@ -139,7 +140,7 @@ g1CollectedHeap.cpp concurrentZFThread.hpp g1CollectedHeap.cpp g1CollectedHeap.inline.hpp g1CollectedHeap.cpp g1CollectorPolicy.hpp g1CollectedHeap.cpp g1MarkSweep.hpp -g1CollectedHeap.cpp g1RemSet.hpp +g1CollectedHeap.cpp g1RemSet.inline.hpp g1CollectedHeap.cpp g1OopClosures.inline.hpp g1CollectedHeap.cpp genOopClosures.inline.hpp g1CollectedHeap.cpp gcLocker.inline.hpp @@ -151,13 +152,14 @@ g1CollectedHeap.cpp icBuffer.hpp g1CollectedHeap.cpp isGCActiveMark.hpp g1CollectedHeap.cpp oop.inline.hpp g1CollectedHeap.cpp oop.pcgc.inline.hpp -g1CollectedHeap.cpp parGCAllocBuffer.hpp g1CollectedHeap.cpp vm_operations_g1.hpp g1CollectedHeap.cpp vmThread.hpp g1CollectedHeap.hpp barrierSet.hpp +g1CollectedHeap.hpp g1RemSet.hpp g1CollectedHeap.hpp heapRegion.hpp g1CollectedHeap.hpp memRegion.hpp +g1CollectedHeap.hpp parGCAllocBuffer.hpp g1CollectedHeap.hpp sharedHeap.hpp g1CollectedHeap.inline.hpp concurrentMark.hpp @@ -245,6 +247,7 @@ g1RemSet.cpp intHisto.hpp g1RemSet.cpp iterator.hpp g1RemSet.cpp oop.inline.hpp +g1RemSet.inline.hpp oop.inline.hpp g1RemSet.inline.hpp g1RemSet.hpp g1RemSet.inline.hpp heapRegionRemSet.hpp @@ -255,6 +258,7 @@ g1SATBCardTableModRefBS.cpp thread.hpp g1SATBCardTableModRefBS.cpp thread_.inline.hpp g1SATBCardTableModRefBS.cpp satbQueue.hpp +g1SATBCardTableModRefBS.hpp oop.inline.hpp g1SATBCardTableModRefBS.hpp cardTableModRefBS.hpp g1SATBCardTableModRefBS.hpp memRegion.hpp diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp index fcbd6cc42e8..ce7ba20252c 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp @@ -31,9 +31,10 @@ void CardTableModRefBS::par_non_clean_card_iterate_work(Space* sp, MemRegion mr, bool clear, int n_threads) { if (n_threads > 0) { - assert(n_threads == (int)ParallelGCThreads, "# worker threads != # requested!"); - - // Make sure the LNC array is valid for the space. + assert((n_threads == 1 && ParallelGCThreads == 0) || + n_threads <= (int)ParallelGCThreads, + "# worker threads != # requested!"); + // Make sure the LNC array is valid for the space. jbyte** lowest_non_clean; uintptr_t lowest_non_clean_base_chunk_index; size_t lowest_non_clean_chunk_size; diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp index d0fa3a4eecf..b48344fd2c2 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp @@ -885,7 +885,7 @@ void ParallelScavengeHeap::print_tracing_info() const { } -void ParallelScavengeHeap::verify(bool allow_dirty, bool silent) { +void ParallelScavengeHeap::verify(bool allow_dirty, bool silent, bool option /* ignored */) { // Why do we need the total_collections()-filter below? if (total_collections() > 0) { if (!silent) { diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp index 2b8904cfa29..350c0431716 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp @@ -217,7 +217,7 @@ class ParallelScavengeHeap : public CollectedHeap { virtual void gc_threads_do(ThreadClosure* tc) const; virtual void print_tracing_info() const; - void verify(bool allow_dirty, bool silent); + void verify(bool allow_dirty, bool silent, bool /* option */); void print_heap_change(size_t prev_used); diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp index f1a9e64fe93..e1f0994b88c 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp @@ -117,6 +117,7 @@ inline void PSPromotionManager::process_popped_location_depth(StarTask p) { process_array_chunk(old); } else { if (p.is_narrow()) { + assert(UseCompressedOops, "Error"); PSScavenge::copy_and_push_safe_barrier(this, (narrowOop*)p); } else { PSScavenge::copy_and_push_safe_barrier(this, (oop*)p); diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp index 3db5224bb59..11da8de2ec8 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp @@ -533,7 +533,7 @@ class CollectedHeap : public CHeapObj { virtual void print_tracing_info() const = 0; // Heap verification - virtual void verify(bool allow_dirty, bool silent) = 0; + virtual void verify(bool allow_dirty, bool silent, bool option) = 0; // Non product verification and debugging. #ifndef PRODUCT diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index f595248f92c..bd6109967fd 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -554,7 +554,6 @@ ciEnv.cpp jvmtiExport.hpp ciEnv.cpp linkResolver.hpp ciEnv.cpp methodDataOop.hpp ciEnv.cpp objArrayKlass.hpp -ciEnv.cpp oop.hpp ciEnv.cpp oop.inline.hpp ciEnv.cpp oop.inline2.hpp ciEnv.cpp oopFactory.hpp @@ -785,7 +784,6 @@ ciObjectFactory.hpp growableArray.hpp ciSignature.cpp allocation.inline.hpp ciSignature.cpp ciSignature.hpp ciSignature.cpp ciUtilities.hpp -ciSignature.cpp oop.hpp ciSignature.cpp oop.inline.hpp ciSignature.cpp signature.hpp @@ -950,7 +948,6 @@ classLoadingService.hpp perfData.hpp classify.cpp classify.hpp classify.cpp systemDictionary.hpp -classify.hpp oop.hpp classify.hpp oop.inline.hpp codeBlob.cpp allocation.inline.hpp @@ -1185,7 +1182,6 @@ compilerOracle.cpp handles.inline.hpp compilerOracle.cpp jniHandles.hpp compilerOracle.cpp klass.hpp compilerOracle.cpp methodOop.hpp -compilerOracle.cpp oop.hpp compilerOracle.cpp oop.inline.hpp compilerOracle.cpp oopFactory.hpp compilerOracle.cpp resourceArea.hpp @@ -1629,7 +1625,6 @@ frame.cpp methodDataOop.hpp frame.cpp methodOop.hpp frame.cpp monitorChunk.hpp frame.cpp nativeInst_.hpp -frame.cpp oop.hpp frame.cpp oop.inline.hpp frame.cpp oop.inline2.hpp frame.cpp oopMapCache.hpp @@ -1797,7 +1792,6 @@ generation.cpp genOopClosures.inline.hpp generation.cpp generation.hpp generation.cpp generation.inline.hpp generation.cpp java.hpp -generation.cpp oop.hpp generation.cpp oop.inline.hpp generation.cpp spaceDecorator.hpp generation.cpp space.inline.hpp @@ -2270,7 +2264,6 @@ java.cpp jvmtiExport.hpp java.cpp memprofiler.hpp java.cpp methodOop.hpp java.cpp objArrayOop.hpp -java.cpp oop.hpp java.cpp oop.inline.hpp java.cpp oopFactory.hpp java.cpp sharedRuntime.hpp @@ -2947,7 +2940,7 @@ mutex_.inline.hpp thread_.inline.hpp nativeInst_.cpp assembler_.inline.hpp nativeInst_.cpp handles.hpp nativeInst_.cpp nativeInst_.hpp -nativeInst_.cpp oop.hpp +nativeInst_.cpp oop.inline.hpp nativeInst_.cpp ostream.hpp nativeInst_.cpp resourceArea.hpp nativeInst_.cpp sharedRuntime.hpp @@ -3842,7 +3835,7 @@ stackMapTable.hpp stackMapFrame.hpp stackValue.cpp debugInfo.hpp stackValue.cpp frame.inline.hpp stackValue.cpp handles.inline.hpp -stackValue.cpp oop.hpp +stackValue.cpp oop.inline.hpp stackValue.cpp stackValue.hpp stackValue.hpp handles.hpp @@ -4329,7 +4322,6 @@ typeArrayOop.hpp typeArrayKlass.hpp unhandledOops.cpp collectedHeap.hpp unhandledOops.cpp gcLocker.inline.hpp unhandledOops.cpp globalDefinitions.hpp -unhandledOops.cpp oop.hpp unhandledOops.cpp oop.inline.hpp unhandledOops.cpp thread.hpp unhandledOops.cpp unhandledOops.hpp @@ -4465,7 +4457,6 @@ vframe.cpp javaClasses.hpp vframe.cpp nmethod.hpp vframe.cpp objectMonitor.hpp vframe.cpp objectMonitor.inline.hpp -vframe.cpp oop.hpp vframe.cpp oop.inline.hpp vframe.cpp oopMapCache.hpp vframe.cpp pcDesc.hpp @@ -4577,7 +4568,6 @@ vmThread.cpp events.hpp vmThread.cpp interfaceSupport.hpp vmThread.cpp methodOop.hpp vmThread.cpp mutexLocker.hpp -vmThread.cpp oop.hpp vmThread.cpp oop.inline.hpp vmThread.cpp os.hpp vmThread.cpp resourceArea.hpp diff --git a/hotspot/src/share/vm/includeDB_features b/hotspot/src/share/vm/includeDB_features index 863f6513340..c0b02eb42c8 100644 --- a/hotspot/src/share/vm/includeDB_features +++ b/hotspot/src/share/vm/includeDB_features @@ -47,7 +47,7 @@ dump.cpp javaCalls.hpp dump.cpp javaClasses.hpp dump.cpp loaderConstraints.hpp dump.cpp methodDataOop.hpp -dump.cpp oop.hpp +dump.cpp oop.inline.hpp dump.cpp oopFactory.hpp dump.cpp resourceArea.hpp dump.cpp signature.hpp @@ -237,7 +237,7 @@ serialize.cpp compactingPermGenGen.hpp serialize.cpp compiledICHolderOop.hpp serialize.cpp methodDataOop.hpp serialize.cpp objArrayOop.hpp -serialize.cpp oop.hpp +serialize.cpp oop.inline.hpp serialize.cpp symbolTable.hpp serialize.cpp systemDictionary.hpp @@ -295,7 +295,7 @@ vmStructs.cpp nmethod.hpp vmStructs.cpp objArrayKlass.hpp vmStructs.cpp objArrayKlassKlass.hpp vmStructs.cpp objArrayOop.hpp -vmStructs.cpp oop.hpp +vmStructs.cpp oop.inline.hpp vmStructs.cpp oopMap.hpp vmStructs.cpp pcDesc.hpp vmStructs.cpp perfMemory.hpp diff --git a/hotspot/src/share/vm/memory/barrierSet.cpp b/hotspot/src/share/vm/memory/barrierSet.cpp index 23308805a60..07ff7a0fc21 100644 --- a/hotspot/src/share/vm/memory/barrierSet.cpp +++ b/hotspot/src/share/vm/memory/barrierSet.cpp @@ -25,12 +25,27 @@ # include "incls/_precompiled.incl" # include "incls/_barrierSet.cpp.incl" -// count is in HeapWord's +// count is number of array elements being written void BarrierSet::static_write_ref_array_pre(HeapWord* start, size_t count) { - Universe::heap()->barrier_set()->write_ref_array_pre(MemRegion(start, start + count)); + assert(count <= (size_t)max_intx, "count too large"); +#if 0 + warning("Pre: \t" INTPTR_FORMAT "[" SIZE_FORMAT "]\t", + start, count); +#endif + if (UseCompressedOops) { + Universe::heap()->barrier_set()->write_ref_array_pre((narrowOop*)start, (int)count); + } else { + Universe::heap()->barrier_set()->write_ref_array_pre( (oop*)start, (int)count); + } } -// count is in HeapWord's +// count is number of array elements being written void BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) { - Universe::heap()->barrier_set()->write_ref_array_work(MemRegion(start, start + count)); + assert(count <= (size_t)max_intx, "count too large"); + HeapWord* end = start + objArrayOopDesc::array_size((int)count); +#if 0 + warning("Post:\t" INTPTR_FORMAT "[" SIZE_FORMAT "] : [" INTPTR_FORMAT","INTPTR_FORMAT")\t", + start, count, start, end); +#endif + Universe::heap()->barrier_set()->write_ref_array_work(MemRegion(start, end)); } diff --git a/hotspot/src/share/vm/memory/barrierSet.hpp b/hotspot/src/share/vm/memory/barrierSet.hpp index bff929b2c8b..0fc6a006140 100644 --- a/hotspot/src/share/vm/memory/barrierSet.hpp +++ b/hotspot/src/share/vm/memory/barrierSet.hpp @@ -81,9 +81,13 @@ public: // barrier types. Semantically, it should be thought of as a call to the // virtual "_work" function below, which must implement the barrier.) // First the pre-write versions... - inline void write_ref_field_pre(void* field, oop new_val); + template inline void write_ref_field_pre(T* field, oop new_val); +private: + // Keep this private so as to catch violations at build time. + virtual void write_ref_field_pre_work( void* field, oop new_val) { guarantee(false, "Not needed"); }; protected: - virtual void write_ref_field_pre_work(void* field, oop new_val) {}; + virtual void write_ref_field_pre_work( oop* field, oop new_val) {}; + virtual void write_ref_field_pre_work(narrowOop* field, oop new_val) {}; public: // ...then the post-write version. @@ -117,12 +121,17 @@ public: virtual void read_ref_array(MemRegion mr) = 0; virtual void read_prim_array(MemRegion mr) = 0; - virtual void write_ref_array_pre(MemRegion mr) {} + virtual void write_ref_array_pre( oop* dst, int length) {} + virtual void write_ref_array_pre(narrowOop* dst, int length) {} inline void write_ref_array(MemRegion mr); // Static versions, suitable for calling from generated code. static void static_write_ref_array_pre(HeapWord* start, size_t count); static void static_write_ref_array_post(HeapWord* start, size_t count); + // Narrow oop versions of the above; count is # of array elements being written, + // starting with "start", which is HeapWord-aligned. + static void static_write_ref_array_pre_narrow(HeapWord* start, size_t count); + static void static_write_ref_array_post_narrow(HeapWord* start, size_t count); protected: virtual void write_ref_array_work(MemRegion mr) = 0; diff --git a/hotspot/src/share/vm/memory/barrierSet.inline.hpp b/hotspot/src/share/vm/memory/barrierSet.inline.hpp index 50382c994bb..edcb551bdcd 100644 --- a/hotspot/src/share/vm/memory/barrierSet.inline.hpp +++ b/hotspot/src/share/vm/memory/barrierSet.inline.hpp @@ -23,10 +23,10 @@ */ // Inline functions of BarrierSet, which de-virtualize certain -// performance-critical calls when when the barrier is the most common +// performance-critical calls when the barrier is the most common // card-table kind. -void BarrierSet::write_ref_field_pre(void* field, oop new_val) { +template void BarrierSet::write_ref_field_pre(T* field, oop new_val) { if (kind() == CardTableModRef) { ((CardTableModRefBS*)this)->inline_write_ref_field_pre(field, new_val); } else { diff --git a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp index 46a5dd9f6b9..d31dc6eb8a4 100644 --- a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp +++ b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp @@ -287,7 +287,7 @@ public: // these functions here for performance. protected: void write_ref_field_work(oop obj, size_t offset, oop newVal); - void write_ref_field_work(void* field, oop newVal); + virtual void write_ref_field_work(void* field, oop newVal); public: bool has_write_ref_array_opt() { return true; } @@ -317,10 +317,10 @@ public: // *** Card-table-barrier-specific things. - inline void inline_write_ref_field_pre(void* field, oop newVal) {} + template inline void inline_write_ref_field_pre(T* field, oop newVal) {} - inline void inline_write_ref_field(void* field, oop newVal) { - jbyte* byte = byte_for(field); + template inline void inline_write_ref_field(T* field, oop newVal) { + jbyte* byte = byte_for((void*)field); *byte = dirty_card; } diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index 048bd0eca29..e25cc513158 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -1194,7 +1194,7 @@ GCStats* GenCollectedHeap::gc_stats(int level) const { return _gens[level]->gc_stats(); } -void GenCollectedHeap::verify(bool allow_dirty, bool silent) { +void GenCollectedHeap::verify(bool allow_dirty, bool silent, bool option /* ignored */) { if (!silent) { gclog_or_tty->print("permgen "); } diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.hpp b/hotspot/src/share/vm/memory/genCollectedHeap.hpp index 0630eec6395..0c14c7f3d9a 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp @@ -325,7 +325,7 @@ public: void prepare_for_verify(); // Override. - void verify(bool allow_dirty, bool silent); + void verify(bool allow_dirty, bool silent, bool /* option */); // Override. void print() const; diff --git a/hotspot/src/share/vm/memory/genOopClosures.hpp b/hotspot/src/share/vm/memory/genOopClosures.hpp index 4cb2ca6c202..8f8fe5caaa0 100644 --- a/hotspot/src/share/vm/memory/genOopClosures.hpp +++ b/hotspot/src/share/vm/memory/genOopClosures.hpp @@ -57,7 +57,7 @@ class OopsInGenClosure : public OopClosure { template void do_barrier(T* p); // Version for use by closures that may be called in parallel code. - void par_do_barrier(oop* p); + template void par_do_barrier(T* p); public: OopsInGenClosure() : OopClosure(NULL), diff --git a/hotspot/src/share/vm/memory/genOopClosures.inline.hpp b/hotspot/src/share/vm/memory/genOopClosures.inline.hpp index 5f13668e9c4..8971b43ccae 100644 --- a/hotspot/src/share/vm/memory/genOopClosures.inline.hpp +++ b/hotspot/src/share/vm/memory/genOopClosures.inline.hpp @@ -40,18 +40,20 @@ inline void OopsInGenClosure::set_generation(Generation* gen) { template inline void OopsInGenClosure::do_barrier(T* p) { assert(generation()->is_in_reserved(p), "expected ref in generation"); - assert(!oopDesc::is_null(*p), "expected non-null object"); - oop obj = oopDesc::load_decode_heap_oop_not_null(p); + T heap_oop = oopDesc::load_heap_oop(p); + assert(!oopDesc::is_null(heap_oop), "expected non-null oop"); + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); // If p points to a younger generation, mark the card. if ((HeapWord*)obj < _gen_boundary) { _rs->inline_write_ref_field_gc(p, obj); } } -inline void OopsInGenClosure::par_do_barrier(oop* p) { +template inline void OopsInGenClosure::par_do_barrier(T* p) { assert(generation()->is_in_reserved(p), "expected ref in generation"); - oop obj = *p; - assert(obj != NULL, "expected non-null object"); + T heap_oop = oopDesc::load_heap_oop(p); + assert(!oopDesc::is_null(heap_oop), "expected non-null oop"); + oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); // If p points to a younger generation, mark the card. if ((HeapWord*)obj < gen_boundary()) { rs()->write_ref_field_gc_par(p, obj); diff --git a/hotspot/src/share/vm/memory/referenceProcessor.cpp b/hotspot/src/share/vm/memory/referenceProcessor.cpp index 36d95144f46..616ca5d690a 100644 --- a/hotspot/src/share/vm/memory/referenceProcessor.cpp +++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp @@ -1013,12 +1013,19 @@ ReferenceProcessor::add_to_discovered_list_mt(DiscoveredList& refs_list, // discovered_addr. oop current_head = refs_list.head(); - // Note: In the case of G1, this pre-barrier is strictly + // Note: In the case of G1, this specific pre-barrier is strictly // not necessary because the only case we are interested in - // here is when *discovered_addr is NULL, so this will expand to - // nothing. As a result, I am just manually eliding this out for G1. + // here is when *discovered_addr is NULL (see the CAS further below), + // so this will expand to nothing. As a result, we have manually + // elided this out for G1, but left in the test for some future + // collector that might have need for a pre-barrier here. if (_discovered_list_needs_barrier && !UseG1GC) { - _bs->write_ref_field_pre((void*)discovered_addr, current_head); guarantee(false, "Needs to be fixed: YSR"); + if (UseCompressedOops) { + _bs->write_ref_field_pre((narrowOop*)discovered_addr, current_head); + } else { + _bs->write_ref_field_pre((oop*)discovered_addr, current_head); + } + guarantee(false, "Need to check non-G1 collector"); } oop retest = oopDesc::atomic_compare_exchange_oop(current_head, discovered_addr, NULL); @@ -1029,9 +1036,8 @@ ReferenceProcessor::add_to_discovered_list_mt(DiscoveredList& refs_list, refs_list.set_head(obj); refs_list.inc_length(1); if (_discovered_list_needs_barrier) { - _bs->write_ref_field((void*)discovered_addr, current_head); guarantee(false, "Needs to be fixed: YSR"); + _bs->write_ref_field((void*)discovered_addr, current_head); } - } else { // If retest was non NULL, another thread beat us to it: // The reference has already been discovered... @@ -1177,11 +1183,16 @@ bool ReferenceProcessor::discover_reference(oop obj, ReferenceType rt) { // pre-value, we can safely elide the pre-barrier here for the case of G1. assert(discovered == NULL, "control point invariant"); if (_discovered_list_needs_barrier && !UseG1GC) { // safe to elide for G1 - _bs->write_ref_field_pre((oop*)discovered_addr, current_head); + if (UseCompressedOops) { + _bs->write_ref_field_pre((narrowOop*)discovered_addr, current_head); + } else { + _bs->write_ref_field_pre((oop*)discovered_addr, current_head); + } + guarantee(false, "Need to check non-G1 collector"); } oop_store_raw(discovered_addr, current_head); if (_discovered_list_needs_barrier) { - _bs->write_ref_field((oop*)discovered_addr, current_head); + _bs->write_ref_field((void*)discovered_addr, current_head); } list->set_head(obj); list->inc_length(1); diff --git a/hotspot/src/share/vm/memory/space.hpp b/hotspot/src/share/vm/memory/space.hpp index e6164ba19ef..98fc8a22880 100644 --- a/hotspot/src/share/vm/memory/space.hpp +++ b/hotspot/src/share/vm/memory/space.hpp @@ -106,6 +106,7 @@ class Space: public CHeapObj { virtual void set_end(HeapWord* value) { _end = value; } virtual HeapWord* saved_mark_word() const { return _saved_mark_word; } + void set_saved_mark_word(HeapWord* p) { _saved_mark_word = p; } MemRegionClosure* preconsumptionDirtyCardClosure() const { diff --git a/hotspot/src/share/vm/memory/universe.cpp b/hotspot/src/share/vm/memory/universe.cpp index b854d64892c..adcc3eca787 100644 --- a/hotspot/src/share/vm/memory/universe.cpp +++ b/hotspot/src/share/vm/memory/universe.cpp @@ -1170,7 +1170,7 @@ void Universe::print_heap_after_gc(outputStream* st) { st->print_cr("}"); } -void Universe::verify(bool allow_dirty, bool silent) { +void Universe::verify(bool allow_dirty, bool silent, bool option) { if (SharedSkipVerify) { return; } @@ -1194,7 +1194,7 @@ void Universe::verify(bool allow_dirty, bool silent) { if (!silent) gclog_or_tty->print("[Verifying "); if (!silent) gclog_or_tty->print("threads "); Threads::verify(); - heap()->verify(allow_dirty, silent); + heap()->verify(allow_dirty, silent, option); if (!silent) gclog_or_tty->print("syms "); SymbolTable::verify(); diff --git a/hotspot/src/share/vm/memory/universe.hpp b/hotspot/src/share/vm/memory/universe.hpp index 9e17a184450..53cf78066aa 100644 --- a/hotspot/src/share/vm/memory/universe.hpp +++ b/hotspot/src/share/vm/memory/universe.hpp @@ -398,7 +398,7 @@ class Universe: AllStatic { // Debugging static bool verify_in_progress() { return _verify_in_progress; } - static void verify(bool allow_dirty = true, bool silent = false); + static void verify(bool allow_dirty = true, bool silent = false, bool option = true); static int verify_count() { return _verify_count; } static void print(); static void print_on(outputStream* st); diff --git a/hotspot/src/share/vm/oops/instanceRefKlass.cpp b/hotspot/src/share/vm/oops/instanceRefKlass.cpp index c6d9f75b0cb..5e6d40f9dc5 100644 --- a/hotspot/src/share/vm/oops/instanceRefKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceRefKlass.cpp @@ -28,13 +28,14 @@ template static void specialized_oop_follow_contents(instanceRefKlass* ref, oop obj) { T* referent_addr = (T*)java_lang_ref_Reference::referent_addr(obj); - oop referent = oopDesc::load_decode_heap_oop(referent_addr); + T heap_oop = oopDesc::load_heap_oop(referent_addr); debug_only( if(TraceReferenceGC && PrintGCDetails) { gclog_or_tty->print_cr("instanceRefKlass::oop_follow_contents " INTPTR_FORMAT, obj); } ) - if (referent != NULL) { + if (!oopDesc::is_null(heap_oop)) { + oop referent = oopDesc::decode_heap_oop_not_null(heap_oop); if (!referent->is_gc_marked() && MarkSweep::ref_processor()-> discover_reference(obj, ref->reference_type())) { @@ -81,13 +82,14 @@ static void specialized_oop_follow_contents(instanceRefKlass* ref, ParCompactionManager* cm, oop obj) { T* referent_addr = (T*)java_lang_ref_Reference::referent_addr(obj); - oop referent = oopDesc::load_decode_heap_oop(referent_addr); + T heap_oop = oopDesc::load_heap_oop(referent_addr); debug_only( if(TraceReferenceGC && PrintGCDetails) { gclog_or_tty->print_cr("instanceRefKlass::oop_follow_contents " INTPTR_FORMAT, obj); } ) - if (referent != NULL) { + if (!oopDesc::is_null(heap_oop)) { + oop referent = oopDesc::decode_heap_oop_not_null(heap_oop); if (PSParallelCompact::mark_bitmap()->is_unmarked(referent) && PSParallelCompact::ref_processor()-> discover_reference(obj, ref->reference_type())) { @@ -182,9 +184,10 @@ int instanceRefKlass::oop_adjust_pointers(oop obj) { } \ \ T* referent_addr = (T*)java_lang_ref_Reference::referent_addr(obj); \ - oop referent = oopDesc::load_decode_heap_oop(referent_addr); \ - if (referent != NULL && contains(referent_addr)) { \ + T heap_oop = oopDesc::load_heap_oop(referent_addr); \ + if (!oopDesc::is_null(heap_oop) && contains(referent_addr)) { \ ReferenceProcessor* rp = closure->_ref_processor; \ + oop referent = oopDesc::decode_heap_oop_not_null(heap_oop); \ if (!referent->is_gc_marked() && (rp != NULL) && \ rp->discover_reference(obj, reference_type())) { \ return size; \ diff --git a/hotspot/src/share/vm/oops/objArrayKlass.cpp b/hotspot/src/share/vm/oops/objArrayKlass.cpp index 3f56d9c1ff6..a97cb0aadd6 100644 --- a/hotspot/src/share/vm/oops/objArrayKlass.cpp +++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp @@ -84,8 +84,6 @@ oop objArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) { template void objArrayKlass::do_copy(arrayOop s, T* src, arrayOop d, T* dst, int length, TRAPS) { - const size_t word_len = objArrayOopDesc::array_size(length); - BarrierSet* bs = Universe::heap()->barrier_set(); // For performance reasons, we assume we are that the write barrier we // are using has optimized modes for arrays of references. At least one @@ -93,11 +91,10 @@ template void objArrayKlass::do_copy(arrayOop s, T* src, assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt"); assert(bs->has_write_ref_array_pre_opt(), "For pre-barrier as well."); - MemRegion dst_mr = MemRegion((HeapWord*)dst, word_len); if (s == d) { // since source and destination are equal we do not need conversion checks. assert(length > 0, "sanity check"); - bs->write_ref_array_pre(dst_mr); + bs->write_ref_array_pre(dst, length); Copy::conjoint_oops_atomic(src, dst, length); } else { // We have to make sure all elements conform to the destination array @@ -105,7 +102,7 @@ template void objArrayKlass::do_copy(arrayOop s, T* src, klassOop stype = objArrayKlass::cast(s->klass())->element_klass(); if (stype == bound || Klass::cast(stype)->is_subtype_of(bound)) { // elements are guaranteed to be subtypes, so no check necessary - bs->write_ref_array_pre(dst_mr); + bs->write_ref_array_pre(dst, length); Copy::conjoint_oops_atomic(src, dst, length); } else { // slow case: need individual subtype checks @@ -137,6 +134,7 @@ template void objArrayKlass::do_copy(arrayOop s, T* src, } } } + const size_t word_len = objArrayOopDesc::array_size(length); bs->write_ref_array(MemRegion((HeapWord*)dst, word_len)); } diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp index 5c4ad5a1e0d..962a075fbd1 100644 --- a/hotspot/src/share/vm/oops/oop.inline.hpp +++ b/hotspot/src/share/vm/oops/oop.inline.hpp @@ -148,12 +148,14 @@ inline bool oopDesc::is_null(narrowOop obj) { return obj == 0; } inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) { assert(!is_null(v), "oop value can never be zero"); + assert(Universe::heap()->is_in_reserved(v), "Address not in heap"); address base = Universe::narrow_oop_base(); int shift = Universe::narrow_oop_shift(); uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base, 1)); assert(OopEncodingHeapMax > pd, "change encoding max if new encoding"); uint64_t result = pd >> shift; assert((result & CONST64(0xffffffff00000000)) == 0, "narrow oop overflow"); + assert(decode_heap_oop(result) == v, "reversibility"); return (narrowOop)result; } @@ -449,7 +451,7 @@ inline void update_barrier_set(void* p, oop v) { oopDesc::bs()->write_ref_field(p, v); } -inline void update_barrier_set_pre(void* p, oop v) { +template inline void update_barrier_set_pre(T* p, oop v) { oopDesc::bs()->write_ref_field_pre(p, v); } @@ -459,15 +461,15 @@ template inline void oop_store(T* p, oop v) { } else { update_barrier_set_pre(p, v); oopDesc::encode_store_heap_oop(p, v); - update_barrier_set(p, v); + update_barrier_set((void*)p, v); // cast away type } } template inline void oop_store(volatile T* p, oop v) { - update_barrier_set_pre((void*)p, v); + update_barrier_set_pre((T*)p, v); // cast away volatile // Used by release_obj_field_put, so use release_store_ptr. oopDesc::release_encode_store_heap_oop(p, v); - update_barrier_set((void*)p, v); + update_barrier_set((void*)p, v); // cast away type } template inline void oop_store_without_check(T* p, oop v) { diff --git a/hotspot/src/share/vm/oops/oopsHierarchy.hpp b/hotspot/src/share/vm/oops/oopsHierarchy.hpp index 1e864522d97..4609f0efc72 100644 --- a/hotspot/src/share/vm/oops/oopsHierarchy.hpp +++ b/hotspot/src/share/vm/oops/oopsHierarchy.hpp @@ -29,6 +29,7 @@ typedef juint narrowOop; // Offset instead of address for an oop within a java object typedef class klassOopDesc* wideKlassOop; // to keep SA happy and unhandled oop // detector happy. +typedef void* OopOrNarrowOopStar; #ifndef CHECK_UNHANDLED_OOPS diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index e48c15e7914..a81859cf83c 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -1789,7 +1789,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { #ifdef _LP64 // Push DecodeN down through phi. // The rest of phi graph will transform by split EncodeP node though phis up. - if (UseCompressedOops && can_reshape && progress == NULL) { + if (UseNewCode && UseCompressedOops && can_reshape && progress == NULL) { bool may_push = true; bool has_decodeN = false; Node* in_decodeN = NULL; diff --git a/hotspot/src/share/vm/prims/unsafe.cpp b/hotspot/src/share/vm/prims/unsafe.cpp index 081f19fefd2..8bf06ef9064 100644 --- a/hotspot/src/share/vm/prims/unsafe.cpp +++ b/hotspot/src/share/vm/prims/unsafe.cpp @@ -1048,7 +1048,11 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe, oop e = JNIHandles::resolve(e_h); oop p = JNIHandles::resolve(obj); HeapWord* addr = (HeapWord *)index_oop_from_field_offset_long(p, offset); - update_barrier_set_pre((void*)addr, e); + if (UseCompressedOops) { + update_barrier_set_pre((narrowOop*)addr, e); + } else { + update_barrier_set_pre((oop*)addr, e); + } oop res = oopDesc::atomic_compare_exchange_oop(x, addr, e); jboolean success = (res == e); if (success) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index d86e7a9f16b..6eaa8cea6b8 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1202,18 +1202,13 @@ void Arguments::set_ergonomics_flags() { } #ifdef _LP64 - // Compressed Headers do not work with CMS, which uses a bit in the klass - // field offset to determine free list chunk markers. // Check that UseCompressedOops can be set with the max heap size allocated // by ergonomics. if (MaxHeapSize <= max_heap_for_compressed_oops()) { - if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) { + if (FLAG_IS_DEFAULT(UseCompressedOops)) { // Turn off until bug is fixed. // the following line to return it to default status. // FLAG_SET_ERGO(bool, UseCompressedOops, true); - } else if (UseCompressedOops && UseG1GC) { - warning(" UseCompressedOops does not currently work with UseG1GC; switching off UseCompressedOops. "); - FLAG_SET_DEFAULT(UseCompressedOops, false); } #ifdef _WIN64 if (UseLargePages && UseCompressedOops) { @@ -1454,6 +1449,7 @@ bool Arguments::check_gc_consistency() { if (UseSerialGC) i++; if (UseConcMarkSweepGC || UseParNewGC) i++; if (UseParallelGC || UseParallelOldGC) i++; + if (UseG1GC) i++; if (i > 1) { jio_fprintf(defaultStream::error_stream(), "Conflicting collector combinations in option list; " @@ -2603,22 +2599,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) { return result; } - // These are hacks until G1 is fully supported and tested - // but lets you force -XX:+UseG1GC in PRT and get it where it (mostly) works - if (UseG1GC) { - if (UseConcMarkSweepGC || UseParNewGC || UseParallelGC || UseParallelOldGC || UseSerialGC) { -#ifndef PRODUCT - tty->print_cr("-XX:+UseG1GC is incompatible with other collectors, using UseG1GC"); -#endif // PRODUCT - UseConcMarkSweepGC = false; - UseParNewGC = false; - UseParallelGC = false; - UseParallelOldGC = false; - UseSerialGC = false; - } - no_shared_spaces(); - } - #ifndef PRODUCT if (TraceBytecodesAt != 0) { TraceBytecodes = true; @@ -2676,10 +2656,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) { } else if (UseParNewGC) { // Set some flags for ParNew set_parnew_gc_flags(); - } - // Temporary; make the "if" an "else-if" before - // we integrate G1. XXX - if (UseG1GC) { + } else if (UseG1GC) { // Set some flags for garbage-first, if needed. set_g1_gc_flags(); } diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp index eed2afff8f9..01bd705c291 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -49,7 +49,7 @@ void SafepointSynchronize::begin() { // In the future we should investigate whether CMS can use the // more-general mechanism below. DLD (01/05). ConcurrentMarkSweepThread::synchronize(false); - } else { + } else if (UseG1GC) { ConcurrentGCThread::safepoint_synchronize(); } #endif // SERIALGC @@ -400,7 +400,7 @@ void SafepointSynchronize::end() { // If there are any concurrent GC threads resume them. if (UseConcMarkSweepGC) { ConcurrentMarkSweepThread::desynchronize(false); - } else { + } else if (UseG1GC) { ConcurrentGCThread::safepoint_desynchronize(); } #endif // SERIALGC diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp index 4709b6bd748..b729eeff2b5 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp @@ -119,6 +119,7 @@ JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread)) assert(false, "should be optimized out"); return; } + assert(orig->is_oop(true /* ignore mark word */), "Error"); // store the original value that was in the field reference thread->satb_mark_queue().enqueue(orig); JRT_END diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp index 768f9b5580b..3a41b5754e1 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.cpp +++ b/hotspot/src/share/vm/utilities/taskqueue.cpp @@ -64,15 +64,18 @@ bool ParallelTaskTerminator::peek_in_queue_set() { } void ParallelTaskTerminator::yield() { + assert(_offered_termination <= _n_threads, "Invariant"); os::yield(); } void ParallelTaskTerminator::sleep(uint millis) { + assert(_offered_termination <= _n_threads, "Invariant"); os::sleep(Thread::current(), millis, false); } bool ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { + assert(_offered_termination < _n_threads, "Invariant"); Atomic::inc(&_offered_termination); uint yield_count = 0; @@ -96,6 +99,7 @@ ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { // Loop waiting for all threads to offer termination or // more work. while (true) { + assert(_offered_termination <= _n_threads, "Invariant"); // Are all threads offering termination? if (_offered_termination == _n_threads) { return true; @@ -151,6 +155,7 @@ ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { if (peek_in_queue_set() || (terminator != NULL && terminator->should_exit_termination())) { Atomic::dec(&_offered_termination); + assert(_offered_termination < _n_threads, "Invariant"); return false; } } diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp index 6b83bc083f5..489122afcd9 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -560,8 +560,14 @@ typedef GenericTaskQueueSet OopTaskQueueSet; class StarTask { void* _holder; // either union oop* or narrowOop* public: - StarTask(narrowOop *p) { _holder = (void *)((uintptr_t)p | COMPRESSED_OOP_MASK); } - StarTask(oop *p) { _holder = (void*)p; } + StarTask(narrowOop* p) { + assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!"); + _holder = (void *)((uintptr_t)p | COMPRESSED_OOP_MASK); + } + StarTask(oop* p) { + assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!"); + _holder = (void*)p; + } StarTask() { _holder = NULL; } operator oop*() { return (oop*)_holder; } operator narrowOop*() { From dd76763423f427a552407f4a106fa4388bcaf130 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Wed, 15 Jul 2009 10:25:01 +0100 Subject: [PATCH 04/74] 6846972: cannot access member of raw type when erasure change overriding into overloading Fix of 6400189 caused a nasty problem in method resolution Reviewed-by: jjg --- .../com/sun/tools/javac/comp/Resolve.java | 3 +- .../javac/generics/rawOverride/T6846972.java | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/generics/rawOverride/T6846972.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java index bb62298119c..808fd9959ef 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -251,7 +251,8 @@ public class Resolve { return true; else { Symbol s2 = ((MethodSymbol)sym).implementation(site.tsym, types, true); - return (s2 == null || s2 == sym); + return (s2 == null || s2 == sym || + !types.isSubSignature(types.memberType(site, s2), types.memberType(site, sym))); } } //where diff --git a/langtools/test/tools/javac/generics/rawOverride/T6846972.java b/langtools/test/tools/javac/generics/rawOverride/T6846972.java new file mode 100644 index 00000000000..af39a2d7cd6 --- /dev/null +++ b/langtools/test/tools/javac/generics/rawOverride/T6846972.java @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6846972 + * @summary cannot access member of raw type when erasure change overriding into overloading + * @author mcimadamore + * @compile T6846972.java + */ + +import java.util.EnumMap; + +public class T6846972 { + + enum Suit { + CLUBS, DIAMONDS; + } + + static Object [] array = { + Suit.CLUBS, "value1", + Suit.DIAMONDS, "value2" + }; + + static void test() { + EnumMap map = new EnumMap(Suit.class); + map.put(array[0], array[1]); + } +} From ae2586d2c3656378e28e8e372836fd270f439bf3 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Wed, 15 Jul 2009 17:01:47 +0100 Subject: [PATCH 05/74] 6860795: NullPointerException when compiling a negative java source Rich formatter shouldn't propagate visits on method symbols that have a null type Reviewed-by: jjg --- .../javac/util/RichDiagnosticFormatter.java | 3 +- .../javac/Diagnostics/6860795/T6860795.java | 34 +++++++++++++++++++ .../javac/Diagnostics/6860795/T6860795.out | 2 ++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/Diagnostics/6860795/T6860795.java create mode 100644 langtools/test/tools/javac/Diagnostics/6860795/T6860795.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 6d8538bf654..60e323f7bda 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -569,7 +569,8 @@ public class RichDiagnosticFormatter extends @Override public Void visitMethodSymbol(MethodSymbol s, Void ignored) { visit(s.owner, null); - typePreprocessor.visit(s.type); + if (s.type != null) + typePreprocessor.visit(s.type); return null; } }; diff --git a/langtools/test/tools/javac/Diagnostics/6860795/T6860795.java b/langtools/test/tools/javac/Diagnostics/6860795/T6860795.java new file mode 100644 index 00000000000..6480e0ff2b7 --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6860795/T6860795.java @@ -0,0 +1,34 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6860795 + * @summary NullPointerException when compiling a negative java source + * @author mcimadamore + * @compile/fail/ref=T6860795.out -XDrawDiagnostics T6860795.java + */ + +class Test { + void foo(float x, int x) {} +} diff --git a/langtools/test/tools/javac/Diagnostics/6860795/T6860795.out b/langtools/test/tools/javac/Diagnostics/6860795/T6860795.out new file mode 100644 index 00000000000..f7ec1120afd --- /dev/null +++ b/langtools/test/tools/javac/Diagnostics/6860795/T6860795.out @@ -0,0 +1,2 @@ +T6860795.java:33:27: compiler.err.already.defined: x, foo +1 error From 26c66d001583ed3d5f38c866063cca74836b1dae Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Wed, 15 Jul 2009 12:22:59 -0400 Subject: [PATCH 06/74] 6859911: G1: assert(Heap_lock->owner() = NULL, "Should be owned on this thread's behalf") The used() method assumes that the heap lock is held when it is called. However, when used() is called from print_on(), this is not the case. Reviewed-by: ysr, jmasa --- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 7 ++++++- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index f7c53a71873..4f2ef1d5d78 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1666,6 +1666,11 @@ size_t G1CollectedHeap::used() const { return result; } +size_t G1CollectedHeap::used_unlocked() const { + size_t result = _summary_bytes_used; + return result; +} + class SumUsedClosure: public HeapRegionClosure { size_t _used; public: @@ -2349,7 +2354,7 @@ void G1CollectedHeap::print_on(outputStream* st) const { void G1CollectedHeap::print_on(outputStream* st, bool extended) const { st->print(" %-20s", "garbage-first heap"); st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", - capacity()/K, used()/K); + capacity()/K, used_unlocked()/K); st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", _g1_storage.low_boundary(), _g1_storage.high(), diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 3dc60175986..2bf8b51299c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -700,6 +700,9 @@ public: size_t g1_reserved_obj_bytes() { return _g1_reserved.byte_size(); } virtual size_t capacity() const; virtual size_t used() const; + // This should be called when we're not holding the heap lock. The + // result might be a bit inaccurate. + size_t used_unlocked() const; size_t recalculate_used() const; #ifndef PRODUCT size_t recalculate_used_regions() const; From 8c000e858b40b9b2b4b1b6297b22a5f3a6ee7b17 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 15 Jul 2009 12:08:55 -0700 Subject: [PATCH 07/74] 6857789: (reflect) Create common superclass of reflective exceptions Reviewed-by: martin --- .../java/lang/ClassNotFoundException.java | 2 +- .../java/lang/IllegalAccessException.java | 2 +- .../java/lang/InstantiationException.java | 2 +- .../java/lang/NoSuchFieldException.java | 2 +- .../java/lang/NoSuchMethodException.java | 2 +- .../lang/ReflectiveOperationException.java | 91 +++++++++++++++++++ .../reflect/InvocationTargetException.java | 2 +- 7 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 jdk/src/share/classes/java/lang/ReflectiveOperationException.java diff --git a/jdk/src/share/classes/java/lang/ClassNotFoundException.java b/jdk/src/share/classes/java/lang/ClassNotFoundException.java index 8da84456726..af3af4246a5 100644 --- a/jdk/src/share/classes/java/lang/ClassNotFoundException.java +++ b/jdk/src/share/classes/java/lang/ClassNotFoundException.java @@ -50,7 +50,7 @@ package java.lang; * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) * @since JDK1.0 */ -public class ClassNotFoundException extends Exception { +public class ClassNotFoundException extends ReflectiveOperationException { /** * use serialVersionUID from JDK 1.1.X for interoperability */ diff --git a/jdk/src/share/classes/java/lang/IllegalAccessException.java b/jdk/src/share/classes/java/lang/IllegalAccessException.java index 19b51b90fef..2dc609978fc 100644 --- a/jdk/src/share/classes/java/lang/IllegalAccessException.java +++ b/jdk/src/share/classes/java/lang/IllegalAccessException.java @@ -56,7 +56,7 @@ package java.lang; * @see java.lang.reflect.Constructor#newInstance(Object[]) * @since JDK1.0 */ -public class IllegalAccessException extends Exception { +public class IllegalAccessException extends ReflectiveOperationException { private static final long serialVersionUID = 6616958222490762034L; /** diff --git a/jdk/src/share/classes/java/lang/InstantiationException.java b/jdk/src/share/classes/java/lang/InstantiationException.java index ace382ae437..fac48397cc8 100644 --- a/jdk/src/share/classes/java/lang/InstantiationException.java +++ b/jdk/src/share/classes/java/lang/InstantiationException.java @@ -43,7 +43,7 @@ package java.lang; * @since JDK1.0 */ public -class InstantiationException extends Exception { +class InstantiationException extends ReflectiveOperationException { private static final long serialVersionUID = -8441929162975509110L; /** diff --git a/jdk/src/share/classes/java/lang/NoSuchFieldException.java b/jdk/src/share/classes/java/lang/NoSuchFieldException.java index b44fb173ebb..ce3adf2d289 100644 --- a/jdk/src/share/classes/java/lang/NoSuchFieldException.java +++ b/jdk/src/share/classes/java/lang/NoSuchFieldException.java @@ -31,7 +31,7 @@ package java.lang; * @author unascribed * @since JDK1.1 */ -public class NoSuchFieldException extends Exception { +public class NoSuchFieldException extends ReflectiveOperationException { private static final long serialVersionUID = -6143714805279938260L; /** diff --git a/jdk/src/share/classes/java/lang/NoSuchMethodException.java b/jdk/src/share/classes/java/lang/NoSuchMethodException.java index 720fbfcbbc6..dc8954b6cd0 100644 --- a/jdk/src/share/classes/java/lang/NoSuchMethodException.java +++ b/jdk/src/share/classes/java/lang/NoSuchMethodException.java @@ -32,7 +32,7 @@ package java.lang; * @since JDK1.0 */ public -class NoSuchMethodException extends Exception { +class NoSuchMethodException extends ReflectiveOperationException { private static final long serialVersionUID = 5034388446362600923L; /** diff --git a/jdk/src/share/classes/java/lang/ReflectiveOperationException.java b/jdk/src/share/classes/java/lang/ReflectiveOperationException.java new file mode 100644 index 00000000000..d06613c6d2b --- /dev/null +++ b/jdk/src/share/classes/java/lang/ReflectiveOperationException.java @@ -0,0 +1,91 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package java.lang; + +/** + * Common superclass of exceptions thrown by reflective operations in + * core reflection. + * + * @see LinkageError + * @since 1.7 + */ +public class ReflectiveOperationException extends Exception { + static final long serialVersionUID = 123456789L; + + /** + * Constructs a new exception with {@code null} as its detail + * message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public ReflectiveOperationException() { + super(); + } + + /** + * Constructs a new exception with the specified detail message. + * The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public ReflectiveOperationException(String message) { + super(message); + } + + /** + * Constructs a new exception with the specified detail message + * and cause. + * + *

Note that the detail message associated with + * {@code cause} is not automatically incorporated in + * this exception's detail message. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public ReflectiveOperationException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new exception with the specified cause and a detail + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). + * + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public ReflectiveOperationException(Throwable cause) { + super(cause); + } +} diff --git a/jdk/src/share/classes/java/lang/reflect/InvocationTargetException.java b/jdk/src/share/classes/java/lang/reflect/InvocationTargetException.java index 28f3b206297..048d04cacbf 100644 --- a/jdk/src/share/classes/java/lang/reflect/InvocationTargetException.java +++ b/jdk/src/share/classes/java/lang/reflect/InvocationTargetException.java @@ -39,7 +39,7 @@ package java.lang.reflect; * @see Method * @see Constructor */ -public class InvocationTargetException extends Exception { +public class InvocationTargetException extends ReflectiveOperationException { /** * Use serialVersionUID from JDK 1.1.X for interoperability */ From a24ea182cc2e56ab8e649f9fba3fca621d50f5e4 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Wed, 15 Jul 2009 13:37:35 -0700 Subject: [PATCH 08/74] 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post Co-authored-by: Chuck Rasbold Reviewed-by: never, kvn --- hotspot/src/share/vm/opto/loopopts.cpp | 5 +- hotspot/test/compiler/6860469/Test.java | 71 +++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 hotspot/test/compiler/6860469/Test.java diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp index 5084e3d8234..e7c02dca900 100644 --- a/hotspot/src/share/vm/opto/loopopts.cpp +++ b/hotspot/src/share/vm/opto/loopopts.cpp @@ -346,7 +346,10 @@ Node *PhaseIdealLoop::remix_address_expressions( Node *n ) { // Yes! Reshape address expression! Node *inv_scale = new (C, 3) LShiftINode( add_invar, scale ); - register_new_node( inv_scale, add_invar_ctrl ); + Node *inv_scale_ctrl = + dom_depth(add_invar_ctrl) > dom_depth(scale_ctrl) ? + add_invar_ctrl : scale_ctrl; + register_new_node( inv_scale, inv_scale_ctrl ); Node *var_scale = new (C, 3) LShiftINode( add_var, scale ); register_new_node( var_scale, n_ctrl ); Node *var_add = new (C, 3) AddINode( var_scale, inv_scale ); diff --git a/hotspot/test/compiler/6860469/Test.java b/hotspot/test/compiler/6860469/Test.java new file mode 100644 index 00000000000..0e7771b24fc --- /dev/null +++ b/hotspot/test/compiler/6860469/Test.java @@ -0,0 +1,71 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +/** + * @test + * @bug 6860469 + * @summary remix_address_expressions reshapes address expression with bad control + * + * @run main/othervm -Xcomp -XX:CompileOnly=Test.C Test + */ + +public class Test { + + private static final int H = 16; + private static final int F = 9; + + static int[] fl = new int[1 << F]; + + static int C(int ll, int f) { + int max = -1; + int min = H + 1; + + if (ll != 0) { + if (ll < min) { + min = ll; + } + if (ll > max) { + max = ll; + } + } + + if (f > max) { + f = max; + } + if (min > f) { + min = f; + } + + for (int mc = 1 >> max - f; mc <= 0; mc++) { + int i = mc << (32 - f); + fl[i] = max; + } + + return min; + } + + public static void main(String argv[]) { + C(0, 10); + } +} From b8fae2d33cfffdf41f134b530fd3790da65ed2a5 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 15 Jul 2009 14:43:13 -0700 Subject: [PATCH 09/74] 6463998: Undocumented NullPointerExeption from Float.parseFloat and Double.parseDouble Reviewed-by: lancea, iris --- jdk/src/share/classes/java/lang/Double.java | 1 + jdk/src/share/classes/java/lang/Float.java | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/java/lang/Double.java b/jdk/src/share/classes/java/lang/Double.java index 9866d5d4aee..8efb241b808 100644 --- a/jdk/src/share/classes/java/lang/Double.java +++ b/jdk/src/share/classes/java/lang/Double.java @@ -529,6 +529,7 @@ public final class Double extends Number implements Comparable { * @param s the string to be parsed. * @return the {@code double} value represented by the string * argument. + * @throws NullPointerException if the string is null * @throws NumberFormatException if the string does not contain * a parsable {@code double}. * @see java.lang.Double#valueOf(String) diff --git a/jdk/src/share/classes/java/lang/Float.java b/jdk/src/share/classes/java/lang/Float.java index 1c89a458fa7..eb133016f6b 100644 --- a/jdk/src/share/classes/java/lang/Float.java +++ b/jdk/src/share/classes/java/lang/Float.java @@ -438,12 +438,13 @@ public final class Float extends Number implements Comparable { * represented by the specified {@code String}, as performed * by the {@code valueOf} method of class {@code Float}. * - * @param s the string to be parsed. + * @param s the string to be parsed. * @return the {@code float} value represented by the string * argument. - * @throws NumberFormatException if the string does not contain a + * @throws NullPointerException if the string is null + * @throws NumberFormatException if the string does not contain a * parsable {@code float}. - * @see java.lang.Float#valueOf(String) + * @see java.lang.Float#valueOf(String) * @since 1.2 */ public static float parseFloat(String s) throws NumberFormatException { From c3efa899b62ed8b89990fdcab0a109d9de840bd2 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 16 Jul 2009 14:10:42 -0700 Subject: [PATCH 10/74] 6851742: (EA) allocation elimination doesn't work with UseG1GC Fix eliminate_card_mark() to eliminate G1 pre/post barriers. Reviewed-by: never --- hotspot/src/share/vm/opto/escape.cpp | 16 +- hotspot/src/share/vm/opto/graphKit.cpp | 324 +++++++++------------ hotspot/src/share/vm/opto/graphKit.hpp | 30 +- hotspot/src/share/vm/opto/idealKit.cpp | 25 +- hotspot/src/share/vm/opto/idealKit.hpp | 11 +- hotspot/src/share/vm/opto/ifnode.cpp | 13 +- hotspot/src/share/vm/opto/library_call.cpp | 31 +- hotspot/src/share/vm/opto/machnode.cpp | 6 + hotspot/src/share/vm/opto/macro.cpp | 82 +++++- hotspot/src/share/vm/opto/matcher.cpp | 3 +- hotspot/src/share/vm/opto/phaseX.hpp | 2 + hotspot/src/share/vm/opto/type.hpp | 4 + 12 files changed, 315 insertions(+), 232 deletions(-) diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp index ed3067e9e94..a9be52b6e35 100644 --- a/hotspot/src/share/vm/opto/escape.cpp +++ b/hotspot/src/share/vm/opto/escape.cpp @@ -578,11 +578,24 @@ PhiNode *ConnectionGraph::create_split_phi(PhiNode *orig_phi, int alias_idx, Gro if (phi_alias_idx == alias_idx) { return orig_phi; } - // have we already created a Phi for this alias index? + // Have we recently created a Phi for this alias index? PhiNode *result = get_map_phi(orig_phi->_idx); if (result != NULL && C->get_alias_index(result->adr_type()) == alias_idx) { return result; } + // Previous check may fail when the same wide memory Phi was split into Phis + // for different memory slices. Search all Phis for this region. + if (result != NULL) { + Node* region = orig_phi->in(0); + for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) { + Node* phi = region->fast_out(i); + if (phi->is_Phi() && + C->get_alias_index(phi->as_Phi()->adr_type()) == alias_idx) { + assert(phi->_idx >= nodes_size(), "only new Phi per instance memory slice"); + return phi->as_Phi(); + } + } + } if ((int)C->unique() + 2*NodeLimitFudgeFactor > MaxNodeLimit) { if (C->do_escape_analysis() == true && !C->failing()) { // Retry compilation without escape analysis. @@ -595,6 +608,7 @@ PhiNode *ConnectionGraph::create_split_phi(PhiNode *orig_phi, int alias_idx, Gro orig_phi_worklist.append_if_missing(orig_phi); const TypePtr *atype = C->get_adr_type(alias_idx); result = PhiNode::make(orig_phi->in(0), NULL, Type::MEMORY, atype); + C->copy_node_notes_to(result, orig_phi); set_map_phi(orig_phi->_idx, result); igvn->set_type(result, result->bottom_type()); record_for_optimizer(result); diff --git a/hotspot/src/share/vm/opto/graphKit.cpp b/hotspot/src/share/vm/opto/graphKit.cpp index 83646c54ed9..90ffdfca8cb 100644 --- a/hotspot/src/share/vm/opto/graphKit.cpp +++ b/hotspot/src/share/vm/opto/graphKit.cpp @@ -1373,11 +1373,12 @@ Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt, return st; } + void GraphKit::pre_barrier(Node* ctl, Node* obj, Node* adr, - uint adr_idx, - Node *val, + uint adr_idx, + Node* val, const TypeOopPtr* val_type, BasicType bt) { BarrierSet* bs = Universe::heap()->barrier_set(); @@ -1385,7 +1386,7 @@ void GraphKit::pre_barrier(Node* ctl, switch (bs->kind()) { case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCTLogging: - g1_write_barrier_pre(obj, adr, adr_idx, val, val_type, bt); + g1_write_barrier_pre(obj, adr, adr_idx, val, val_type, bt); break; case BarrierSet::CardTableModRef: @@ -1404,8 +1405,8 @@ void GraphKit::post_barrier(Node* ctl, Node* store, Node* obj, Node* adr, - uint adr_idx, - Node *val, + uint adr_idx, + Node* val, BasicType bt, bool use_precise) { BarrierSet* bs = Universe::heap()->barrier_set(); @@ -1413,7 +1414,7 @@ void GraphKit::post_barrier(Node* ctl, switch (bs->kind()) { case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCTLogging: - g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise); + g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise); break; case BarrierSet::CardTableModRef: @@ -1431,42 +1432,36 @@ void GraphKit::post_barrier(Node* ctl, } } -Node* GraphKit::store_oop_to_object(Node* ctl, - Node* obj, - Node* adr, - const TypePtr* adr_type, - Node *val, - const TypeOopPtr* val_type, - BasicType bt) { +Node* GraphKit::store_oop(Node* ctl, + Node* obj, + Node* adr, + const TypePtr* adr_type, + Node* val, + const TypeOopPtr* val_type, + BasicType bt, + bool use_precise) { + + set_control(ctl); + if (stopped()) return top(); // Dead path ? + + assert(bt == T_OBJECT, "sanity"); + assert(val != NULL, "not dead path"); uint adr_idx = C->get_alias_index(adr_type); - Node* store; - pre_barrier(ctl, obj, adr, adr_idx, val, val_type, bt); - store = store_to_memory(control(), adr, val, bt, adr_idx); - post_barrier(control(), store, obj, adr, adr_idx, val, bt, false); - return store; -} - -Node* GraphKit::store_oop_to_array(Node* ctl, - Node* obj, - Node* adr, - const TypePtr* adr_type, - Node *val, - const TypeOopPtr* val_type, - BasicType bt) { - uint adr_idx = C->get_alias_index(adr_type); - Node* store; - pre_barrier(ctl, obj, adr, adr_idx, val, val_type, bt); - store = store_to_memory(control(), adr, val, bt, adr_idx); - post_barrier(control(), store, obj, adr, adr_idx, val, bt, true); + assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); + + pre_barrier(control(), obj, adr, adr_idx, val, val_type, bt); + Node* store = store_to_memory(control(), adr, val, bt, adr_idx); + post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise); return store; } +// Could be an array or object we don't know at compile time (unsafe ref.) Node* GraphKit::store_oop_to_unknown(Node* ctl, - Node* obj, - Node* adr, - const TypePtr* adr_type, - Node *val, - BasicType bt) { + Node* obj, // containing obj + Node* adr, // actual adress to store val at + const TypePtr* adr_type, + Node* val, + BasicType bt) { Compile::AliasType* at = C->alias_type(adr_type); const TypeOopPtr* val_type = NULL; if (adr_type->isa_instptr()) { @@ -1485,12 +1480,7 @@ Node* GraphKit::store_oop_to_unknown(Node* ctl, if (val_type == NULL) { val_type = TypeInstPtr::BOTTOM; } - - uint adr_idx = at->index(); - pre_barrier(ctl, obj, adr, adr_idx, val, val_type, bt); - Node* store = store_to_memory(control(), adr, val, bt, adr_idx); - post_barrier(control(), store, obj, adr, adr_idx, val, bt, true); - return store; + return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true); } @@ -1804,93 +1794,6 @@ Node* GraphKit::just_allocated_object(Node* current_control) { } -//------------------------------store_barrier---------------------------------- -// Insert a write-barrier store. This is to let generational GC work; we have -// to flag all oop-stores before the next GC point. -void GraphKit::write_barrier_post(Node* oop_store, Node* obj, Node* adr, - Node* val, bool use_precise) { - // No store check needed if we're storing a NULL or an old object - // (latter case is probably a string constant). The concurrent - // mark sweep garbage collector, however, needs to have all nonNull - // oop updates flagged via card-marks. - if (val != NULL && val->is_Con()) { - // must be either an oop or NULL - const Type* t = val->bottom_type(); - if (t == TypePtr::NULL_PTR || t == Type::TOP) - // stores of null never (?) need barriers - return; - ciObject* con = t->is_oopptr()->const_oop(); - if (con != NULL - && con->is_perm() - && Universe::heap()->can_elide_permanent_oop_store_barriers()) - // no store barrier needed, because no old-to-new ref created - return; - } - - if (use_ReduceInitialCardMarks() - && obj == just_allocated_object(control())) { - // We can skip marks on a freshly-allocated object. - // Keep this code in sync with do_eager_card_mark in runtime.cpp. - // That routine eagerly marks the occasional object which is produced - // by the slow path, so that we don't have to do it here. - return; - } - - if (!use_precise) { - // All card marks for a (non-array) instance are in one place: - adr = obj; - } - // (Else it's an array (or unknown), and we want more precise card marks.) - assert(adr != NULL, ""); - - // Get the alias_index for raw card-mark memory - int adr_type = Compile::AliasIdxRaw; - // Convert the pointer to an int prior to doing math on it - Node* cast = _gvn.transform(new (C, 2) CastP2XNode(control(), adr)); - // Divide by card size - assert(Universe::heap()->barrier_set()->kind() == BarrierSet::CardTableModRef, - "Only one we handle so far."); - CardTableModRefBS* ct = - (CardTableModRefBS*)(Universe::heap()->barrier_set()); - Node *b = _gvn.transform(new (C, 3) URShiftXNode( cast, _gvn.intcon(CardTableModRefBS::card_shift) )); - // We store into a byte array, so do not bother to left-shift by zero - Node *c = byte_map_base_node(); - // Combine - Node *sb_ctl = control(); - Node *sb_adr = _gvn.transform(new (C, 4) AddPNode( top()/*no base ptr*/, c, b )); - Node *sb_val = _gvn.intcon(0); - // Smash zero into card - if( !UseConcMarkSweepGC ) { - BasicType bt = T_BYTE; - store_to_memory(sb_ctl, sb_adr, sb_val, bt, adr_type); - } else { - // Specialized path for CM store barrier - cms_card_mark( sb_ctl, sb_adr, sb_val, oop_store); - } -} - -// Specialized path for CMS store barrier -void GraphKit::cms_card_mark(Node* ctl, Node* adr, Node* val, Node *oop_store) { - BasicType bt = T_BYTE; - int adr_idx = Compile::AliasIdxRaw; - Node* mem = memory(adr_idx); - - // The type input is NULL in PRODUCT builds - const TypePtr* type = NULL; - debug_only(type = C->get_adr_type(adr_idx)); - - // Add required edge to oop_store, optimizer does not support precedence edges. - // Convert required edge to precedence edge before allocation. - Node *store = _gvn.transform( new (C, 5) StoreCMNode(ctl, mem, adr, type, val, oop_store) ); - set_memory(store, adr_idx); - - // For CMS, back-to-back card-marks can only remove the first one - // and this requires DU info. Push on worklist for optimizer. - if (mem->req() > MemNode::Address && adr == mem->in(MemNode::Address)) - record_for_igvn(store); -} - - void GraphKit::round_double_arguments(ciMethod* dest_method) { // (Note: TypeFunc::make has a cache that makes this fast.) const TypeFunc* tf = TypeFunc::make(dest_method); @@ -3215,6 +3118,79 @@ InitializeNode* AllocateNode::initialization() { return NULL; } +//----------------------------- store barriers ---------------------------- +#define __ ideal. + +void GraphKit::sync_kit(IdealKit& ideal) { + // Final sync IdealKit and graphKit. + __ drain_delay_transform(); + set_all_memory(__ merged_memory()); + set_control(__ ctrl()); +} + +// vanilla/CMS post barrier +// Insert a write-barrier store. This is to let generational GC work; we have +// to flag all oop-stores before the next GC point. +void GraphKit::write_barrier_post(Node* oop_store, + Node* obj, + Node* adr, + Node* val, + bool use_precise) { + // No store check needed if we're storing a NULL or an old object + // (latter case is probably a string constant). The concurrent + // mark sweep garbage collector, however, needs to have all nonNull + // oop updates flagged via card-marks. + if (val != NULL && val->is_Con()) { + // must be either an oop or NULL + const Type* t = val->bottom_type(); + if (t == TypePtr::NULL_PTR || t == Type::TOP) + // stores of null never (?) need barriers + return; + ciObject* con = t->is_oopptr()->const_oop(); + if (con != NULL + && con->is_perm() + && Universe::heap()->can_elide_permanent_oop_store_barriers()) + // no store barrier needed, because no old-to-new ref created + return; + } + + if (!use_precise) { + // All card marks for a (non-array) instance are in one place: + adr = obj; + } + // (Else it's an array (or unknown), and we want more precise card marks.) + assert(adr != NULL, ""); + + IdealKit ideal(gvn(), control(), merged_memory(), true); + + // Convert the pointer to an int prior to doing math on it + Node* cast = __ CastPX(__ ctrl(), adr); + + // Divide by card size + assert(Universe::heap()->barrier_set()->kind() == BarrierSet::CardTableModRef, + "Only one we handle so far."); + Node* card_offset = __ URShiftX( cast, __ ConI(CardTableModRefBS::card_shift) ); + + // Combine card table base and card offset + Node* card_adr = __ AddP(__ top(), byte_map_base_node(), card_offset ); + + // Get the alias_index for raw card-mark memory + int adr_type = Compile::AliasIdxRaw; + // Smash zero into card + Node* zero = __ ConI(0); + BasicType bt = T_BYTE; + if( !UseConcMarkSweepGC ) { + __ store(__ ctrl(), card_adr, zero, bt, adr_type); + } else { + // Specialized path for CM store barrier + __ storeCM(__ ctrl(), card_adr, zero, oop_store, bt, adr_type); + } + + // Final sync IdealKit and GraphKit. + sync_kit(ideal); +} + +// G1 pre/post barriers void GraphKit::g1_write_barrier_pre(Node* obj, Node* adr, uint alias_idx, @@ -3222,10 +3198,8 @@ void GraphKit::g1_write_barrier_pre(Node* obj, const TypeOopPtr* val_type, BasicType bt) { IdealKit ideal(gvn(), control(), merged_memory(), true); -#define __ ideal. - __ declares_done(); - Node* thread = __ thread(); + Node* tls = __ thread(); // ThreadLocalStorage Node* no_ctrl = NULL; Node* no_base = __ top(); @@ -3248,9 +3222,9 @@ void GraphKit::g1_write_barrier_pre(Node* obj, // set_control( ctl); - Node* marking_adr = __ AddP(no_base, thread, __ ConX(marking_offset)); - Node* buffer_adr = __ AddP(no_base, thread, __ ConX(buffer_offset)); - Node* index_adr = __ AddP(no_base, thread, __ ConX(index_offset)); + Node* marking_adr = __ AddP(no_base, tls, __ ConX(marking_offset)); + Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset)); + Node* index_adr = __ AddP(no_base, tls, __ ConX(index_offset)); // Now some of the values @@ -3278,55 +3252,52 @@ void GraphKit::g1_write_barrier_pre(Node* obj, Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); Node* next_indexX = next_index; #ifdef _LP64 - // We could refine the type for what it's worth - // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue); - next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) ); -#endif // _LP64 + // We could refine the type for what it's worth + // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue); + next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) ); +#endif // Now get the buffer location we will log the original value into and store it - Node *log_addr = __ AddP(no_base, buffer, next_indexX); - // __ store(__ ctrl(), log_addr, orig, T_OBJECT, C->get_alias_index(TypeOopPtr::BOTTOM)); __ store(__ ctrl(), log_addr, orig, T_OBJECT, Compile::AliasIdxRaw); - // update the index - // __ store(__ ctrl(), index_adr, next_index, T_INT, Compile::AliasIdxRaw); - // This is a hack to force this store to occur before the oop store that is coming up - __ store(__ ctrl(), index_adr, next_index, T_INT, C->get_alias_index(TypeOopPtr::BOTTOM)); + __ store(__ ctrl(), index_adr, next_index, T_INT, Compile::AliasIdxRaw); } __ else_(); { // logging buffer is full, call the runtime const TypeFunc *tf = OptoRuntime::g1_wb_pre_Type(); - // __ make_leaf_call(tf, OptoRuntime::g1_wb_pre_Java(), "g1_wb_pre", orig, thread); - __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), "g1_wb_pre", orig, thread); - } __ end_if(); - } __ end_if(); - } __ end_if(); + __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), "g1_wb_pre", orig, tls); + } __ end_if(); // (!index) + } __ end_if(); // (orig != NULL) + } __ end_if(); // (!marking) - __ drain_delay_transform(); - set_control( __ ctrl()); - set_all_memory( __ merged_memory()); - -#undef __ + // Final sync IdealKit and GraphKit. + sync_kit(ideal); } // // Update the card table and add card address to the queue // -void GraphKit::g1_mark_card(IdealKit* ideal, Node* card_adr, Node* store, Node* index, Node* index_adr, Node* buffer, const TypeFunc* tf) { -#define __ ideal-> +void GraphKit::g1_mark_card(IdealKit& ideal, + Node* card_adr, + Node* oop_store, + Node* index, + Node* index_adr, + Node* buffer, + const TypeFunc* tf) { + Node* zero = __ ConI(0); Node* no_base = __ top(); BasicType card_bt = T_BYTE; // Smash zero into card. MUST BE ORDERED WRT TO STORE - __ storeCM(__ ctrl(), card_adr, zero, store, card_bt, Compile::AliasIdxRaw); + __ storeCM(__ ctrl(), card_adr, zero, oop_store, card_bt, Compile::AliasIdxRaw); // Now do the queue work __ if_then(index, BoolTest::ne, zero); { - Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); + Node* next_index = __ SubI(index, __ ConI(sizeof(intptr_t))); Node* next_indexX = next_index; #ifdef _LP64 // We could refine the type for what it's worth @@ -3341,10 +3312,10 @@ void GraphKit::g1_mark_card(IdealKit* ideal, Node* card_adr, Node* store, Node* } __ else_(); { __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), "g1_wb_post", card_adr, __ thread()); } __ end_if(); -#undef __ + } -void GraphKit::g1_write_barrier_post(Node* store, +void GraphKit::g1_write_barrier_post(Node* oop_store, Node* obj, Node* adr, uint alias_idx, @@ -3369,10 +3340,8 @@ void GraphKit::g1_write_barrier_post(Node* store, assert(adr != NULL, ""); IdealKit ideal(gvn(), control(), merged_memory(), true); -#define __ ideal. - __ declares_done(); - Node* thread = __ thread(); + Node* tls = __ thread(); // ThreadLocalStorage Node* no_ctrl = NULL; Node* no_base = __ top(); @@ -3394,8 +3363,8 @@ void GraphKit::g1_write_barrier_post(Node* store, // Pointers into the thread - Node* buffer_adr = __ AddP(no_base, thread, __ ConX(buffer_offset)); - Node* index_adr = __ AddP(no_base, thread, __ ConX(index_offset)); + Node* buffer_adr = __ AddP(no_base, tls, __ ConX(buffer_offset)); + Node* index_adr = __ AddP(no_base, tls, __ ConX(index_offset)); // Now some values @@ -3404,18 +3373,14 @@ void GraphKit::g1_write_barrier_post(Node* store, // Convert the store obj pointer to an int prior to doing math on it - // Use addr not obj gets accurate card marks - - // Node* cast = __ CastPX(no_ctrl, adr /* obj */); - // Must use ctrl to prevent "integerized oop" existing across safepoint - Node* cast = __ CastPX(__ ctrl(), ( use_precise ? adr : obj )); + Node* cast = __ CastPX(__ ctrl(), adr); // Divide pointer by card size Node* card_offset = __ URShiftX( cast, __ ConI(CardTableModRefBS::card_shift) ); // Combine card table base and card offset - Node *card_adr = __ AddP(no_base, byte_map_base_node(), card_offset ); + Node* card_adr = __ AddP(no_base, byte_map_base_node(), card_offset ); // If we know the value being stored does it cross regions? @@ -3439,18 +3404,17 @@ void GraphKit::g1_write_barrier_post(Node* store, Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw); __ if_then(card_val, BoolTest::ne, zero); { - g1_mark_card(&ideal, card_adr, store, index, index_adr, buffer, tf); + g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf); } __ end_if(); } __ end_if(); } __ end_if(); } else { - g1_mark_card(&ideal, card_adr, store, index, index_adr, buffer, tf); + // Object.clone() instrinsic uses this path. + g1_mark_card(ideal, card_adr, oop_store, index, index_adr, buffer, tf); } - - __ drain_delay_transform(); - set_control( __ ctrl()); - set_all_memory( __ merged_memory()); + // Final sync IdealKit and GraphKit. + sync_kit(ideal); +} #undef __ -} diff --git a/hotspot/src/share/vm/opto/graphKit.hpp b/hotspot/src/share/vm/opto/graphKit.hpp index 7904a0b0f2f..cd4fceff9d9 100644 --- a/hotspot/src/share/vm/opto/graphKit.hpp +++ b/hotspot/src/share/vm/opto/graphKit.hpp @@ -449,13 +449,24 @@ class GraphKit : public Phase { // // If val==NULL, it is taken to be a completely unknown value. QQQ + Node* store_oop(Node* ctl, + Node* obj, // containing obj + Node* adr, // actual adress to store val at + const TypePtr* adr_type, + Node* val, + const TypeOopPtr* val_type, + BasicType bt, + bool use_precise); + Node* store_oop_to_object(Node* ctl, Node* obj, // containing obj Node* adr, // actual adress to store val at const TypePtr* adr_type, Node* val, const TypeOopPtr* val_type, - BasicType bt); + BasicType bt) { + return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, false); + } Node* store_oop_to_array(Node* ctl, Node* obj, // containing obj @@ -463,7 +474,9 @@ class GraphKit : public Phase { const TypePtr* adr_type, Node* val, const TypeOopPtr* val_type, - BasicType bt); + BasicType bt) { + return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true); + } // Could be an array or object we don't know at compile time (unsafe ref.) Node* store_oop_to_unknown(Node* ctl, @@ -488,9 +501,6 @@ class GraphKit : public Phase { // Return a load of array element at idx. Node* load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype); - // CMS card-marks have an input from the corresponding oop_store - void cms_card_mark(Node* ctl, Node* adr, Node* val, Node* oop_store); - //---------------- Dtrace support -------------------- void make_dtrace_method_entry_exit(ciMethod* method, bool is_entry); void make_dtrace_method_entry(ciMethod* method) { @@ -582,9 +592,6 @@ class GraphKit : public Phase { return C->too_many_recompiles(method(), bci(), reason); } - // vanilla/CMS post barrier - void write_barrier_post(Node *store, Node* obj, Node* adr, Node* val, bool use_precise); - // Returns the object (if any) which was created the moment before. Node* just_allocated_object(Node* current_control); @@ -593,6 +600,11 @@ class GraphKit : public Phase { && Universe::heap()->can_elide_tlab_store_barriers()); } + void sync_kit(IdealKit& ideal); + + // vanilla/CMS post barrier + void write_barrier_post(Node *store, Node* obj, Node* adr, Node* val, bool use_precise); + // G1 pre/post barriers void g1_write_barrier_pre(Node* obj, Node* adr, @@ -610,7 +622,7 @@ class GraphKit : public Phase { bool use_precise); // Helper function for g1 private: - void g1_mark_card(IdealKit* ideal, Node* card_adr, Node* store, Node* index, Node* index_adr, + void g1_mark_card(IdealKit& ideal, Node* card_adr, Node* store, Node* index, Node* index_adr, Node* buffer, const TypeFunc* tf); public: diff --git a/hotspot/src/share/vm/opto/idealKit.cpp b/hotspot/src/share/vm/opto/idealKit.cpp index 026a22f0c7a..0631d905eb0 100644 --- a/hotspot/src/share/vm/opto/idealKit.cpp +++ b/hotspot/src/share/vm/opto/idealKit.cpp @@ -34,7 +34,7 @@ const uint IdealKit::first_var = TypeFunc::Parms + 1; //----------------------------IdealKit----------------------------------------- -IdealKit::IdealKit(PhaseGVN &gvn, Node* control, Node* mem, bool delay_all_transforms) : +IdealKit::IdealKit(PhaseGVN &gvn, Node* control, Node* mem, bool delay_all_transforms, bool has_declarations) : _gvn(gvn), C(gvn.C) { _initial_ctrl = control; _initial_memory = mem; @@ -47,6 +47,9 @@ IdealKit::IdealKit(PhaseGVN &gvn, Node* control, Node* mem, bool delay_all_trans _pending_cvstates = new (C->node_arena()) GrowableArray(C->node_arena(), init_size, 0, 0); _delay_transform = new (C->node_arena()) GrowableArray(C->node_arena(), init_size, 0, 0); DEBUG_ONLY(_state = new (C->node_arena()) GrowableArray(C->node_arena(), init_size, 0, 0)); + if (!has_declarations) { + declarations_done(); + } } //-------------------------------if_then------------------------------------- @@ -97,7 +100,7 @@ void IdealKit::else_() { //-------------------------------end_if------------------------------------- // Merge the "then" and "else" cvstates. // -// The if_then() pushed the current state for later use +// The if_then() pushed a copy of the current state for later use // as the initial state for a future "else" clause. The // current state then became the initial state for the // then clause. If an "else" clause was encountered, it will @@ -258,8 +261,8 @@ Node* IdealKit::promote_to_phi(Node* n, Node* reg) { return delay_transform(PhiNode::make(reg, n, ct)); } -//-----------------------------declares_done----------------------------------- -void IdealKit::declares_done() { +//-----------------------------declarations_done------------------------------- +void IdealKit::declarations_done() { _cvstate = new_cvstate(); // initialize current cvstate set_ctrl(_initial_ctrl); // initialize control in current cvstate set_all_memory(_initial_memory);// initialize memory in current cvstate @@ -277,7 +280,9 @@ Node* IdealKit::transform(Node* n) { //-----------------------------delay_transform----------------------------------- Node* IdealKit::delay_transform(Node* n) { - gvn().set_type(n, n->bottom_type()); + if (!gvn().is_IterGVN() || !gvn().is_IterGVN()->delay_transform()) { + gvn().set_type(n, n->bottom_type()); + } _delay_transform->push(n); return n; } @@ -321,7 +326,9 @@ IdealVariable::IdealVariable(IdealKit &k) { Node* IdealKit::memory(uint alias_idx) { MergeMemNode* mem = merged_memory(); Node* p = mem->memory_at(alias_idx); - _gvn.set_type(p, Type::MEMORY); // must be mapped + if (!gvn().is_IterGVN() || !gvn().is_IterGVN()->delay_transform()) { + _gvn.set_type(p, Type::MEMORY); // must be mapped + } return p; } @@ -462,9 +469,6 @@ void IdealKit::make_leaf_call(const TypeFunc *slow_call_type, const TypePtr* adr_type = TypeRawPtr::BOTTOM; uint adr_idx = C->get_alias_index(adr_type); - // Clone initial memory - MergeMemNode* cloned_mem = MergeMemNode::make(C, merged_memory()); - // Slow-path leaf call int size = slow_call_type->domain()->cnt(); CallNode *call = (CallNode*)new (C, size) CallLeafNode( slow_call_type, slow_call, leaf_name, adr_type); @@ -489,9 +493,6 @@ void IdealKit::make_leaf_call(const TypeFunc *slow_call_type, set_ctrl(transform( new (C, 1) ProjNode(call,TypeFunc::Control) )); - // Set the incoming clone of memory as current memory - set_all_memory(cloned_mem); - // Make memory for the call Node* mem = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory) ); diff --git a/hotspot/src/share/vm/opto/idealKit.hpp b/hotspot/src/share/vm/opto/idealKit.hpp index 5ccdb77b3b7..817ed4de2c1 100644 --- a/hotspot/src/share/vm/opto/idealKit.hpp +++ b/hotspot/src/share/vm/opto/idealKit.hpp @@ -49,7 +49,7 @@ // Example: // Node* limit = ?? // IdealVariable i(kit), j(kit); -// declares_done(); +// declarations_done(); // Node* exit = make_label(1); // 1 goto // set(j, ConI(0)); // loop(i, ConI(0), BoolTest::lt, limit); { @@ -101,10 +101,7 @@ class IdealKit: public StackObj { Node* new_cvstate(); // Create a new cvstate Node* cvstate() { return _cvstate; } // current cvstate Node* copy_cvstate(); // copy current cvstate - void set_ctrl(Node* ctrl) { _cvstate->set_req(TypeFunc::Control, ctrl); } - // Should this assert this is a MergeMem??? - void set_all_memory(Node* mem){ _cvstate->set_req(TypeFunc::Memory, mem); } void set_memory(Node* mem, uint alias_idx ); void do_memory_merge(Node* merging, Node* join); void clear(Node* m); // clear a cvstate @@ -132,15 +129,17 @@ class IdealKit: public StackObj { Node* memory(uint alias_idx); public: - IdealKit(PhaseGVN &gvn, Node* control, Node* memory, bool delay_all_transforms = false); + IdealKit(PhaseGVN &gvn, Node* control, Node* memory, bool delay_all_transforms = false, bool has_declarations = false); ~IdealKit() { stop(); drain_delay_transform(); } // Control Node* ctrl() { return _cvstate->in(TypeFunc::Control); } + void set_ctrl(Node* ctrl) { _cvstate->set_req(TypeFunc::Control, ctrl); } Node* top() { return C->top(); } MergeMemNode* merged_memory() { return _cvstate->in(TypeFunc::Memory)->as_MergeMem(); } + void set_all_memory(Node* mem) { _cvstate->set_req(TypeFunc::Memory, mem); } void set(IdealVariable& v, Node* rhs) { _cvstate->set_req(first_var + v.id(), rhs); } Node* value(IdealVariable& v) { return _cvstate->in(first_var + v.id()); } void dead(IdealVariable& v) { set(v, (Node*)NULL); } @@ -155,7 +154,7 @@ class IdealKit: public StackObj { Node* make_label(int goto_ct); void bind(Node* lab); void goto_(Node* lab, bool bind = false); - void declares_done(); + void declarations_done(); void drain_delay_transform(); Node* IfTrue(IfNode* iff) { return transform(new (C,1) IfTrueNode(iff)); } diff --git a/hotspot/src/share/vm/opto/ifnode.cpp b/hotspot/src/share/vm/opto/ifnode.cpp index 38fab34a50d..98cd93c3ca5 100644 --- a/hotspot/src/share/vm/opto/ifnode.cpp +++ b/hotspot/src/share/vm/opto/ifnode.cpp @@ -378,7 +378,18 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) { // Force the original merge dead igvn->hash_delete(r); - r->set_req_X(0,NULL,igvn); + // First, remove region's dead users. + for (DUIterator_Last lmin, l = r->last_outs(lmin); l >= lmin;) { + Node* u = r->last_out(l); + if( u == r ) { + r->set_req(0, NULL); + } else { + assert(u->outcnt() == 0, "only dead users"); + igvn->remove_dead_node(u); + } + l -= 1; + } + igvn->remove_dead_node(r); // Now remove the bogus extra edges used to keep things alive igvn->remove_dead_node( hook ); diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp index 4fd8f5044a7..ec58f71e01b 100644 --- a/hotspot/src/share/vm/opto/library_call.cpp +++ b/hotspot/src/share/vm/opto/library_call.cpp @@ -1030,7 +1030,7 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin)); const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot); - IdealKit kit(gvn(), control(), merged_memory()); + IdealKit kit(gvn(), control(), merged_memory(), false, true); #define __ kit. Node* zero = __ ConI(0); Node* one = __ ConI(1); @@ -1042,7 +1042,7 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar Node* targetOffset = __ ConI(targetOffset_i); Node* sourceEnd = __ SubI(__ AddI(sourceOffset, sourceCount), targetCountLess1); - IdealVariable rtn(kit), i(kit), j(kit); __ declares_done(); + IdealVariable rtn(kit), i(kit), j(kit); __ declarations_done(); Node* outer_loop = __ make_label(2 /* goto */); Node* return_ = __ make_label(1); @@ -1079,9 +1079,9 @@ Node* LibraryCallKit::string_indexOf(Node* string_object, ciTypeArray* target_ar __ bind(outer_loop); }__ end_loop(); __ dead(i); __ bind(return_); - __ drain_delay_transform(); - set_control(__ ctrl()); + // Final sync IdealKit and GraphKit. + sync_kit(kit); Node* result = __ value(rtn); #undef __ C->set_has_loops(true); @@ -2183,14 +2183,23 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas // of it. So we need to emit code to conditionally do the proper type of // store. - IdealKit kit(gvn(), control(), merged_memory()); - kit.declares_done(); + IdealKit ideal(gvn(), control(), merged_memory()); +#define __ ideal. // QQQ who knows what probability is here?? - kit.if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); { - (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type); - } kit.else_(); { - (void) store_to_memory(control(), adr, val, type, adr_type, is_volatile); - } kit.end_if(); + __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); { + // Sync IdealKit and graphKit. + set_all_memory( __ merged_memory()); + set_control(__ ctrl()); + Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type); + // Update IdealKit memory. + __ set_all_memory(merged_memory()); + __ set_ctrl(control()); + } __ else_(); { + __ store(__ ctrl(), adr, val, type, alias_type->index(), is_volatile); + } __ end_if(); + // Final sync IdealKit and GraphKit. + sync_kit(ideal); +#undef __ } } } diff --git a/hotspot/src/share/vm/opto/machnode.cpp b/hotspot/src/share/vm/opto/machnode.cpp index b7357f86ab6..aa2c3494368 100644 --- a/hotspot/src/share/vm/opto/machnode.cpp +++ b/hotspot/src/share/vm/opto/machnode.cpp @@ -300,6 +300,12 @@ const Node* MachNode::get_base_and_disp(intptr_t &offset, const TypePtr* &adr_ty } } adr_type = t_disp->add_offset(offset); + } else if( base == NULL && offset != 0 && offset != Type::OffsetBot ) { + // Use ideal type if it is oop ptr. + const TypePtr *tp = oper->type()->isa_ptr(); + if( tp != NULL) { + adr_type = tp; + } } } diff --git a/hotspot/src/share/vm/opto/macro.cpp b/hotspot/src/share/vm/opto/macro.cpp index 12410d12ab2..e2421a7f3d3 100644 --- a/hotspot/src/share/vm/opto/macro.cpp +++ b/hotspot/src/share/vm/opto/macro.cpp @@ -198,14 +198,79 @@ void PhaseMacroExpand::extract_call_projections(CallNode *call) { } // Eliminate a card mark sequence. p2x is a ConvP2XNode -void PhaseMacroExpand::eliminate_card_mark(Node *p2x) { +void PhaseMacroExpand::eliminate_card_mark(Node* p2x) { assert(p2x->Opcode() == Op_CastP2X, "ConvP2XNode required"); - Node *shift = p2x->unique_out(); - Node *addp = shift->unique_out(); - for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { - Node *st = addp->last_out(j); - assert(st->is_Store(), "store required"); - _igvn.replace_node(st, st->in(MemNode::Memory)); + if (!UseG1GC) { + // vanilla/CMS post barrier + Node *shift = p2x->unique_out(); + Node *addp = shift->unique_out(); + for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) { + Node *st = addp->last_out(j); + assert(st->is_Store(), "store required"); + _igvn.replace_node(st, st->in(MemNode::Memory)); + } + } else { + // G1 pre/post barriers + assert(p2x->outcnt() == 2, "expects 2 users: Xor and URShift nodes"); + // It could be only one user, URShift node, in Object.clone() instrinsic + // but the new allocation is passed to arraycopy stub and it could not + // be scalar replaced. So we don't check the case. + + // Remove G1 post barrier. + + // Search for CastP2X->Xor->URShift->Cmp path which + // checks if the store done to a different from the value's region. + // And replace Cmp with #0 (false) to collapse G1 post barrier. + Node* xorx = NULL; + for (DUIterator_Fast imax, i = p2x->fast_outs(imax); i < imax; i++) { + Node* u = p2x->fast_out(i); + if (u->Opcode() == Op_XorX) { + xorx = u; + break; + } + } + assert(xorx != NULL, "missing G1 post barrier"); + Node* shift = xorx->unique_out(); + Node* cmpx = shift->unique_out(); + assert(cmpx->is_Cmp() && cmpx->unique_out()->is_Bool() && + cmpx->unique_out()->as_Bool()->_test._test == BoolTest::ne, + "missing region check in G1 post barrier"); + _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ)); + + // Remove G1 pre barrier. + + // Search "if (marking != 0)" check and set it to "false". + Node* this_region = p2x->in(0); + assert(this_region != NULL, ""); + // There is no G1 pre barrier if previous stored value is NULL + // (for example, after initialization). + if (this_region->is_Region() && this_region->req() == 3) { + int ind = 1; + if (!this_region->in(ind)->is_IfFalse()) { + ind = 2; + } + if (this_region->in(ind)->is_IfFalse()) { + Node* bol = this_region->in(ind)->in(0)->in(1); + assert(bol->is_Bool(), ""); + cmpx = bol->in(1); + if (bol->as_Bool()->_test._test == BoolTest::ne && + cmpx->is_Cmp() && cmpx->in(2) == intcon(0) && + cmpx->in(1)->is_Load()) { + Node* adr = cmpx->in(1)->as_Load()->in(MemNode::Address); + const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + + PtrQueue::byte_offset_of_active()); + if (adr->is_AddP() && adr->in(AddPNode::Base) == top() && + adr->in(AddPNode::Address)->Opcode() == Op_ThreadLocal && + adr->in(AddPNode::Offset) == MakeConX(marking_offset)) { + _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ)); + } + } + } + } + // Now CastP2X can be removed since it is used only on dead path + // which currently still alive until igvn optimize it. + assert(p2x->unique_out()->Opcode() == Op_URShiftX, ""); + _igvn.replace_node(p2x, top()); } } @@ -760,14 +825,11 @@ void PhaseMacroExpand::process_users_of_allocation(AllocateNode *alloc) { if (n->is_Store()) { _igvn.replace_node(n, n->in(MemNode::Memory)); } else { - assert( n->Opcode() == Op_CastP2X, "CastP2X required"); eliminate_card_mark(n); } k -= (oc2 - use->outcnt()); } } else { - assert( !use->is_SafePoint(), "safepoint uses must have been already elimiated"); - assert( use->Opcode() == Op_CastP2X, "CastP2X required"); eliminate_card_mark(use); } j -= (oc1 - res->outcnt()); diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp index c5f75e8bbe5..0b8c546c9fd 100644 --- a/hotspot/src/share/vm/opto/matcher.cpp +++ b/hotspot/src/share/vm/opto/matcher.cpp @@ -1489,8 +1489,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) { #ifdef ASSERT // Verify adr type after matching memory operation const MachOper* oper = mach->memory_operand(); - if (oper != NULL && oper != (MachOper*)-1 && - mach->adr_type() != TypeRawPtr::BOTTOM) { // non-direct addressing mode + if (oper != NULL && oper != (MachOper*)-1) { // It has a unique memory operand. Find corresponding ideal mem node. Node* m = NULL; if (leaf->is_Mem()) { diff --git a/hotspot/src/share/vm/opto/phaseX.hpp b/hotspot/src/share/vm/opto/phaseX.hpp index 79482ec289d..cac60f249f7 100644 --- a/hotspot/src/share/vm/opto/phaseX.hpp +++ b/hotspot/src/share/vm/opto/phaseX.hpp @@ -450,6 +450,8 @@ public: subsume_node(old, nn); } + bool delay_transform() const { return _delay_transform; } + void set_delay_transform(bool delay) { _delay_transform = delay; } diff --git a/hotspot/src/share/vm/opto/type.hpp b/hotspot/src/share/vm/opto/type.hpp index 06419149147..01a652ee799 100644 --- a/hotspot/src/share/vm/opto/type.hpp +++ b/hotspot/src/share/vm/opto/type.hpp @@ -1216,6 +1216,8 @@ inline bool Type::is_floatingpoint() const { #define Op_AndX Op_AndL #define Op_AddX Op_AddL #define Op_SubX Op_SubL +#define Op_XorX Op_XorL +#define Op_URShiftX Op_URShiftL // conversions #define ConvI2X(x) ConvI2L(x) #define ConvL2X(x) (x) @@ -1258,6 +1260,8 @@ inline bool Type::is_floatingpoint() const { #define Op_AndX Op_AndI #define Op_AddX Op_AddI #define Op_SubX Op_SubI +#define Op_XorX Op_XorI +#define Op_URShiftX Op_URShiftI // conversions #define ConvI2X(x) (x) #define ConvL2X(x) ConvL2I(x) From 2e2f60507e8bb7eca90be3b55978d8e8f0d01b6c Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 16 Jul 2009 16:29:55 -0700 Subject: [PATCH 11/74] 6851282: JIT miscompilation results in null entry in array when using CompressedOops Get type for new Phi from non dead path. Reviewed-by: never --- hotspot/src/share/vm/opto/cfgnode.cpp | 9 +- hotspot/test/compiler/6851282/Test.java | 124 ++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 hotspot/test/compiler/6851282/Test.java diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index e48c15e7914..85f5e107d8e 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -1796,8 +1796,12 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { for (uint i=1; iis_DecodeN() && ii->bottom_type() == bottom_type()) { - has_decodeN = true; - in_decodeN = ii->in(1); + // Note: in_decodeN is used only to define the type of new phi. + // Find a non dead path otherwise phi type will be wrong. + if (ii->in(1)->bottom_type() != Type::TOP) { + has_decodeN = true; + in_decodeN = ii->in(1); + } } else if (!ii->is_Phi()) { may_push = false; } @@ -1805,7 +1809,6 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { if (has_decodeN && may_push) { PhaseIterGVN *igvn = phase->is_IterGVN(); - // Note: in_decodeN is used only to define the type of new phi here. PhiNode *new_phi = PhiNode::make_blank(in(0), in_decodeN); uint orig_cnt = req(); for (uint i=1; i as = new ArrayList(); + for (int i = 0; i < 5000; i++) { + List bs = new ArrayList(); + for (int j = i; j < i + 1000; j++) + bs.add(new B(j)); + as.add(new A(bs.toArray(new B[0]))); + } + new Test().foo(as.get(0), as.subList(1, as.size()).toArray(new A[0])); + } +} + +class A { + final B[] bs; + + public A(B[] bs) { + this.bs = bs; + } + + final B[] c(final A a) { + return new BoxedArray(bs).filter(new Function() { + public Boolean apply(B arg) { + for (B b : a.bs) { + if (b.d == arg.d) + return true; + } + return false; + } + }); + } +} + +class BoxedArray { + + private final T[] array; + + BoxedArray(T[] array) { + this.array = array; + } + + public T[] filter(Function function) { + boolean[] include = new boolean[array.length]; + int len = 0; + int i = 0; + while (i < array.length) { + if (function.apply(array[i])) { + include[i] = true; + len += 1; + } + i += 1; + } + T[] result = (T[]) java.lang.reflect.Array.newInstance(array.getClass().getComponentType(), len); + len = 0; + i = 0; + while (len < result.length) { + if (include[i]) { + result[len] = array[i]; + len += 1; + } + i += 1; + } + return result; + } +} + +interface Function { + R apply(T arg); +} + +class B { + final int d; + public B(int d) { + this.d = d; + } +} + From 1c4a7e95bb5e97dbfe8bf04e82f08c3935e2fb6d Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Thu, 16 Jul 2009 17:59:27 -0700 Subject: [PATCH 12/74] 6861513: correct copyright attribution in test for 6837094 and 6860469 Reviewed-by: rasbold --- hotspot/test/compiler/6837094/Test.java | 2 +- hotspot/test/compiler/6860469/Test.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hotspot/test/compiler/6837094/Test.java b/hotspot/test/compiler/6837094/Test.java index 9fe2a6a35e5..23db4fc71c5 100644 --- a/hotspot/test/compiler/6837094/Test.java +++ b/hotspot/test/compiler/6837094/Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 Google Inc. 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 diff --git a/hotspot/test/compiler/6860469/Test.java b/hotspot/test/compiler/6860469/Test.java index 0e7771b24fc..59d5f9969d5 100644 --- a/hotspot/test/compiler/6860469/Test.java +++ b/hotspot/test/compiler/6860469/Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 Google Inc. 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 From e5047864cd1b701e2afdcfe2f87907dc7eedd650 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Fri, 17 Jul 2009 15:40:19 +0400 Subject: [PATCH 13/74] 6844297: java/awt/EventQueue/6638195/bug6638195.java test failed in jdk7 on Windows just on b59,passed on b57 Reviewed-by: bchristi, dcherepanov --- .../awt/EventQueue/6638195/bug6638195.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/jdk/test/java/awt/EventQueue/6638195/bug6638195.java b/jdk/test/java/awt/EventQueue/6638195/bug6638195.java index 9dc3b50b973..c4612391547 100644 --- a/jdk/test/java/awt/EventQueue/6638195/bug6638195.java +++ b/jdk/test/java/awt/EventQueue/6638195/bug6638195.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 @@ -23,7 +23,7 @@ /* @test * - * @bug 6638195 + * @bug 6638195 6844297 * @author Igor Kushnirskiy * @summary tests if EventQueueDelegate.Delegate is invoked. */ @@ -47,11 +47,22 @@ public class bug6638195 { } private static void runTest(MyEventQueueDelegate delegate) throws Exception { + // We need an empty runnable here, so the next event is + // processed with a new EventQueueDelegate. See 6844297 + // for details EventQueue.invokeLater( new Runnable() { public void run() { } }); + // The following event is expected to be processed by + // the EventQueueDelegate instance + EventQueue.invokeLater( + new Runnable() { + public void run() { + } + }); + // Finally, proceed on the main thread final CountDownLatch latch = new CountDownLatch(1); EventQueue.invokeLater( new Runnable() { @@ -60,7 +71,7 @@ public class bug6638195 { } }); latch.await(); - if (! delegate.allInvoked()) { + if (!delegate.allInvoked()) { throw new RuntimeException("failed"); } } @@ -125,6 +136,7 @@ public class bug6638195 { return objectMap; } + static class MyEventQueueDelegate implements EventQueueDelegate.Delegate { private volatile boolean getNextEventInvoked = false; private volatile boolean beforeDispatchInvoked = false; From 31eb8dfb51a90c8ab8f0b01a1c307c4e00acbbfc Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Mon, 20 Jul 2009 17:16:34 -0400 Subject: [PATCH 14/74] 6787645: CRL validation code should permit some clock skew when checking validity of CRLs Reviewed-by: vinnie --- .../security/cert/CertPathHelperImpl.java | 8 +++-- .../java/security/cert/X509CRLSelector.java | 30 ++++++++++++++++--- .../provider/certpath/CertPathHelper.java | 10 ++++++- .../certpath/CrlRevocationChecker.java | 8 +++-- .../provider/certpath/OCSPResponse.java | 4 +-- 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/jdk/src/share/classes/java/security/cert/CertPathHelperImpl.java b/jdk/src/share/classes/java/security/cert/CertPathHelperImpl.java index a9998282a25..b279392d442 100644 --- a/jdk/src/share/classes/java/security/cert/CertPathHelperImpl.java +++ b/jdk/src/share/classes/java/security/cert/CertPathHelperImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 @@ -46,7 +46,7 @@ class CertPathHelperImpl extends CertPathHelper { /** * Initialize the helper framework. This method must be called from * the static initializer of each class that is the target of one of - * the methods in this class. This ensures that the helper if initialized + * the methods in this class. This ensures that the helper is initialized * prior to a tunneled call from the Sun provider. */ synchronized static void initialize() { @@ -59,4 +59,8 @@ class CertPathHelperImpl extends CertPathHelper { Set names) { sel.setPathToNamesInternal(names); } + + protected void implSetDateAndTime(X509CRLSelector sel, Date date, long skew) { + sel.setDateAndTime(date, skew); + } } diff --git a/jdk/src/share/classes/java/security/cert/X509CRLSelector.java b/jdk/src/share/classes/java/security/cert/X509CRLSelector.java index b602aee12c5..1fc750db4d0 100644 --- a/jdk/src/share/classes/java/security/cert/X509CRLSelector.java +++ b/jdk/src/share/classes/java/security/cert/X509CRLSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 @@ -72,6 +72,10 @@ import sun.security.x509.X500Name; */ public class X509CRLSelector implements CRLSelector { + static { + CertPathHelperImpl.initialize(); + } + private static final Debug debug = Debug.getInstance("certpath"); private HashSet issuerNames; private HashSet issuerX500Principals; @@ -79,6 +83,7 @@ public class X509CRLSelector implements CRLSelector { private BigInteger maxCRL; private Date dateAndTime; private X509Certificate certChecking; + private long skew = 0; /** * Creates an X509CRLSelector. Initially, no criteria are set @@ -417,7 +422,18 @@ public class X509CRLSelector implements CRLSelector { if (dateAndTime == null) this.dateAndTime = null; else - this.dateAndTime = (Date) dateAndTime.clone(); + this.dateAndTime = new Date(dateAndTime.getTime()); + this.skew = 0; + } + + /** + * Sets the dateAndTime criterion and allows for the specified clock skew + * (in milliseconds) when checking against the validity period of the CRL. + */ + void setDateAndTime(Date dateAndTime, long skew) { + this.dateAndTime = + (dateAndTime == null ? null : new Date(dateAndTime.getTime())); + this.skew = skew; } /** @@ -657,8 +673,14 @@ public class X509CRLSelector implements CRLSelector { } return false; } - if (crlThisUpdate.after(dateAndTime) - || nextUpdate.before(dateAndTime)) { + Date nowPlusSkew = dateAndTime; + Date nowMinusSkew = dateAndTime; + if (skew > 0) { + nowPlusSkew = new Date(dateAndTime.getTime() + skew); + nowMinusSkew = new Date(dateAndTime.getTime() - skew); + } + if (nowMinusSkew.after(nextUpdate) + || nowPlusSkew.before(crlThisUpdate)) { if (debug != null) { debug.println("X509CRLSelector.match: update out of range"); } diff --git a/jdk/src/share/classes/sun/security/provider/certpath/CertPathHelper.java b/jdk/src/share/classes/sun/security/provider/certpath/CertPathHelper.java index 38c5130d6d9..b45b20737fa 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/CertPathHelper.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/CertPathHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 @@ -25,9 +25,11 @@ package sun.security.provider.certpath; +import java.util.Date; import java.util.Set; import java.security.cert.X509CertSelector; +import java.security.cert.X509CRLSelector; import sun.security.x509.GeneralNameInterface; @@ -55,8 +57,14 @@ public abstract class CertPathHelper { protected abstract void implSetPathToNames(X509CertSelector sel, Set names); + protected abstract void implSetDateAndTime(X509CRLSelector sel, Date date, long skew); + static void setPathToNames(X509CertSelector sel, Set names) { instance.implSetPathToNames(sel, names); } + + static void setDateAndTime(X509CRLSelector sel, Date date, long skew) { + instance.implSetDateAndTime(sel, date, skew); + } } diff --git a/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java b/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java index 63ee343175d..b462dd5ba08 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 @@ -81,6 +81,10 @@ class CrlRevocationChecker extends PKIXCertPathChecker { private static final boolean[] ALL_REASONS = {true, true, true, true, true, true, true, true, true}; + // Maximum clock skew in milliseconds (15 minutes) allowed when checking + // validity of CRLs + private static final long MAX_CLOCK_SKEW = 900000; + /** * Creates a CrlRevocationChecker. * @@ -281,7 +285,7 @@ class CrlRevocationChecker extends PKIXCertPathChecker { try { X509CRLSelector sel = new X509CRLSelector(); sel.setCertificateChecking(currCert); - sel.setDateAndTime(mCurrentTime); + CertPathHelper.setDateAndTime(sel, mCurrentTime, MAX_CLOCK_SKEW); for (CertStore mStore : mStores) { for (java.security.cert.CRL crl : mStore.getCRLs(sel)) { diff --git a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java index 62cd4288ed0..cdadc45f66c 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -149,9 +149,9 @@ class OCSPResponse { private SingleResponse singleResponse; - // Maximum clock skew in milliseconds (10 minutes) allowed when checking + // Maximum clock skew in milliseconds (15 minutes) allowed when checking // validity of OCSP responses - private static final long MAX_CLOCK_SKEW = 600000; + private static final long MAX_CLOCK_SKEW = 900000; // an array of all of the CRLReasons (used in SingleResponse) private static CRLReason[] values = CRLReason.values(); From 62ca1df1dd99fe15de47d8a8cadb8e7a310f0924 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 21 Jul 2009 16:42:58 -0700 Subject: [PATCH 15/74] 6857159: local schedule failed with checkcast of Thread.currentThread() Reviewed-by: kvn --- hotspot/src/share/vm/adlc/formssel.cpp | 31 +++++++++ hotspot/src/share/vm/adlc/formssel.hpp | 6 ++ .../test/compiler/6857159/Test6857159.java | 68 +++++++++++++++++++ hotspot/test/compiler/6857159/Test6857159.sh | 65 ++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 hotspot/test/compiler/6857159/Test6857159.java create mode 100644 hotspot/test/compiler/6857159/Test6857159.sh diff --git a/hotspot/src/share/vm/adlc/formssel.cpp b/hotspot/src/share/vm/adlc/formssel.cpp index 1f80e2d0e16..11bfa14f7e8 100644 --- a/hotspot/src/share/vm/adlc/formssel.cpp +++ b/hotspot/src/share/vm/adlc/formssel.cpp @@ -420,6 +420,13 @@ Form::DataType InstructForm::is_ideal_load() const { return _matrule->is_ideal_load(); } +// Return 'true' if this instruction matches an ideal 'LoadKlass' node +bool InstructForm::skip_antidep_check() const { + if( _matrule == NULL ) return false; + + return _matrule->skip_antidep_check(); +} + // Return 'true' if this instruction matches an ideal 'Load?' node Form::DataType InstructForm::is_ideal_store() const { if( _matrule == NULL ) return Form::none; @@ -567,6 +574,8 @@ bool InstructForm::rematerialize(FormDict &globals, RegisterForm *registers ) { // loads from memory, so must check for anti-dependence bool InstructForm::needs_anti_dependence_check(FormDict &globals) const { + if ( skip_antidep_check() ) return false; + // Machine independent loads must be checked for anti-dependences if( is_ideal_load() != Form::none ) return true; @@ -3957,6 +3966,28 @@ Form::DataType MatchRule::is_ideal_load() const { } +bool MatchRule::skip_antidep_check() const { + // Some loads operate on what is effectively immutable memory so we + // should skip the anti dep computations. For some of these nodes + // the rewritable field keeps the anti dep logic from triggering but + // for certain kinds of LoadKlass it does not since they are + // actually reading memory which could be rewritten by the runtime, + // though never by generated code. This disables it uniformly for + // the nodes that behave like this: LoadKlass, LoadNKlass and + // LoadRange. + if ( _opType && (strcmp(_opType,"Set") == 0) && _rChild ) { + const char *opType = _rChild->_opType; + if (strcmp("LoadKlass", opType) == 0 || + strcmp("LoadNKlass", opType) == 0 || + strcmp("LoadRange", opType) == 0) { + return true; + } + } + + return false; +} + + Form::DataType MatchRule::is_ideal_store() const { Form::DataType ideal_store = Form::none; diff --git a/hotspot/src/share/vm/adlc/formssel.hpp b/hotspot/src/share/vm/adlc/formssel.hpp index 2a7bfbb7934..66583ef1a09 100644 --- a/hotspot/src/share/vm/adlc/formssel.hpp +++ b/hotspot/src/share/vm/adlc/formssel.hpp @@ -158,6 +158,9 @@ public: virtual Form::CallType is_ideal_call() const; // matches ideal 'Call' virtual Form::DataType is_ideal_load() const; // node matches ideal 'LoadXNode' + // Should antidep checks be disabled for this Instruct + // See definition of MatchRule::skip_antidep_check + bool skip_antidep_check() const; virtual Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode' bool is_ideal_mem() const { return is_ideal_load() != Form::none || is_ideal_store() != Form::none; } virtual uint two_address(FormDict &globals); // output reg must match input reg @@ -1003,6 +1006,9 @@ public: bool is_ideal_loopEnd() const; // node matches ideal 'LoopEnd' bool is_ideal_bool() const; // node matches ideal 'Bool' Form::DataType is_ideal_load() const;// node matches ideal 'LoadXNode' + // Should antidep checks be disabled for this rule + // See definition of MatchRule::skip_antidep_check + bool skip_antidep_check() const; Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode' // Check if 'mRule2' is a cisc-spill variant of this MatchRule diff --git a/hotspot/test/compiler/6857159/Test6857159.java b/hotspot/test/compiler/6857159/Test6857159.java new file mode 100644 index 00000000000..638f2a6edb6 --- /dev/null +++ b/hotspot/test/compiler/6857159/Test6857159.java @@ -0,0 +1,68 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +/** + * @test + * @bug 6857159 + * @summary local schedule failed with checkcast of Thread.currentThread() + * + * @run shell Test6857159.sh + */ + +public class Test6857159 extends Thread { + static class ct0 extends Test6857159 { + public void message() { + // System.out.println("message"); + } + + public void run() { + message(); + ct0 ct = (ct0) Thread.currentThread(); + ct.message(); + } + } + static class ct1 extends ct0 { + public void message() { + // System.out.println("message"); + } + } + static class ct2 extends ct0 { + public void message() { + // System.out.println("message"); + } + } + + public static void main(String[] args) throws Exception { + for (int i = 0; i < 100000; i++) { + Thread t = null; + switch (i % 3) { + case 0: t = new ct0(); break; + case 1: t = new ct1(); break; + case 2: t = new ct2(); break; + } + t.start(); + t.join(); + } + } +} diff --git a/hotspot/test/compiler/6857159/Test6857159.sh b/hotspot/test/compiler/6857159/Test6857159.sh new file mode 100644 index 00000000000..da25e4cd2cc --- /dev/null +++ b/hotspot/test/compiler/6857159/Test6857159.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Copyright 2009 Sun Microsystems, Inc. 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# +# + +if [ "${TESTSRC}" = "" ] +then + echo "TESTSRC not set. Test cannot execute. Failed." + exit 1 +fi +echo "TESTSRC=${TESTSRC}" +if [ "${TESTJAVA}" = "" ] +then + echo "TESTJAVA not set. Test cannot execute. Failed." + exit 1 +fi +echo "TESTJAVA=${TESTJAVA}" +if [ "${TESTCLASSES}" = "" ] +then + echo "TESTCLASSES not set. Test cannot execute. Failed." + exit 1 +fi +echo "TESTCLASSES=${TESTCLASSES}" +echo "CLASSPATH=${CLASSPATH}" + +set -x + +cp ${TESTSRC}/Test6857159.java . +cp ${TESTSRC}/Test6857159.sh . + +${TESTJAVA}/bin/javac -d . Test6857159.java + +${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbatch -XX:+PrintCompilation -XX:CompileOnly=Test6857159\$ct.run Test6857159 > test.out 2>&1 + +grep "COMPILE SKIPPED" test.out + +result=$? +if [ $result -eq 1 ] +then + echo "Passed" + exit 0 +else + echo "Failed" + exit 1 +fi From 6515225d49fa262d4d1be086c753381b717c1aad Mon Sep 17 00:00:00 2001 From: John R Rose Date: Tue, 21 Jul 2009 16:56:06 -0700 Subject: [PATCH 16/74] 6862576: vmIntrinsics needs cleanup in order to support JSR 292 intrinsics Remove useless lazy evaluation of intrinsics; add LAST_COMPILER_INLINE to help categorize them Reviewed-by: kvn --- .../share/vm/classfile/classFileParser.cpp | 10 +++++ hotspot/src/share/vm/classfile/vmSymbols.hpp | 24 +++++++---- hotspot/src/share/vm/interpreter/rewriter.cpp | 3 ++ hotspot/src/share/vm/oops/methodKlass.cpp | 2 +- hotspot/src/share/vm/oops/methodOop.cpp | 42 +++++++++++++------ hotspot/src/share/vm/oops/methodOop.hpp | 25 ++++------- hotspot/src/share/vm/opto/compile.cpp | 3 +- hotspot/src/share/vm/opto/library_call.cpp | 24 ++++------- 8 files changed, 75 insertions(+), 58 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 36194f79b32..4e7db3b303a 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -3231,6 +3231,16 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name, this_klass->set_minor_version(minor_version); this_klass->set_major_version(major_version); + // Set up methodOop::intrinsic_id as soon as we know the names of methods. + // (We used to do this lazily, but now we query it in Rewriter, + // which is eagerly done for every method, so we might as well do it now, + // when everything is fresh in memory.) + if (methodOopDesc::klass_id_for_intrinsics(this_klass->as_klassOop()) != vmSymbols::NO_SID) { + for (int j = 0; j < methods->length(); j++) { + ((methodOop)methods->obj_at(j))->init_intrinsic_id(); + } + } + if (cached_class_file_bytes != NULL) { // JVMTI: we have an instanceKlass now, tell it about the cached bytes this_klass->set_cached_class_file(cached_class_file_bytes, diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp index 9c8a205ccd8..04bb9369205 100644 --- a/hotspot/src/share/vm/classfile/vmSymbols.hpp +++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp @@ -513,9 +513,6 @@ // // for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) #define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ - do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ - /* (symbol object_initializer_name defined above) */ \ - \ do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ do_name( hashCode_name, "hashCode") \ do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ @@ -635,9 +632,6 @@ do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ do_signature(equalsC_signature, "([C[C)Z") \ \ - do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_array_object_object_signature, F_R) \ - /* (symbols invoke_name and invoke_signature defined above) */ \ - \ do_intrinsic(_compareTo, java_lang_String, compareTo_name, string_int_signature, F_R) \ do_name( compareTo_name, "compareTo") \ do_intrinsic(_indexOf, java_lang_String, indexOf_name, string_int_signature, F_R) \ @@ -656,8 +650,6 @@ do_name( attemptUpdate_name, "attemptUpdate") \ do_signature(attemptUpdate_signature, "(JJ)Z") \ \ - do_intrinsic(_fillInStackTrace, java_lang_Throwable, fillInStackTrace_name, void_throwable_signature, F_RNY) \ - \ /* support for sun.misc.Unsafe */ \ do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ \ @@ -819,10 +811,22 @@ do_name( prefetchReadStatic_name, "prefetchReadStatic") \ do_intrinsic(_prefetchWriteStatic, sun_misc_Unsafe, prefetchWriteStatic_name, prefetch_signature, F_SN) \ do_name( prefetchWriteStatic_name, "prefetchWriteStatic") \ + /*== LAST_COMPILER_INLINE*/ \ + /*the compiler does have special inlining code for these; bytecode inline is just fine */ \ + \ + do_intrinsic(_fillInStackTrace, java_lang_Throwable, fillInStackTrace_name, void_throwable_signature, F_RNY) \ + \ + do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ + /* (symbol object_initializer_name defined above) */ \ + \ + do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_array_object_object_signature, F_R) \ + /* (symbols invoke_name and invoke_signature defined above) */ \ + \ /*end*/ + // Class vmSymbols class vmSymbols: AllStatic { @@ -935,6 +939,7 @@ class vmIntrinsics: AllStatic { #undef VM_INTRINSIC_ENUM ID_LIMIT, + LAST_COMPILER_INLINE = _prefetchWriteStatic, FIRST_ID = _none + 1 }; @@ -972,4 +977,7 @@ public: static Flags flags_for(ID id); static const char* short_name_as_C_string(ID id, char* buf, int size); + + // Access to intrinsic methods: + static methodOop method_for(ID id); }; diff --git a/hotspot/src/share/vm/interpreter/rewriter.cpp b/hotspot/src/share/vm/interpreter/rewriter.cpp index b2451cd0edd..c70c0c0356f 100644 --- a/hotspot/src/share/vm/interpreter/rewriter.cpp +++ b/hotspot/src/share/vm/interpreter/rewriter.cpp @@ -273,6 +273,7 @@ Rewriter::Rewriter(instanceKlassHandle klass, TRAPS) compute_index_maps(); if (RegisterFinalizersAtInit && _klass->name() == vmSymbols::java_lang_Object()) { + bool did_rewrite = false; int i = _methods->length(); while (i-- > 0) { methodOop method = (methodOop)_methods->obj_at(i); @@ -281,9 +282,11 @@ Rewriter::Rewriter(instanceKlassHandle klass, TRAPS) // object for finalization if needed. methodHandle m(THREAD, method); rewrite_Object_init(m, CHECK); + did_rewrite = true; break; } } + assert(did_rewrite, "must find Object:: to rewrite it"); } // rewrite methods, in two passes diff --git a/hotspot/src/share/vm/oops/methodKlass.cpp b/hotspot/src/share/vm/oops/methodKlass.cpp index 03f59e1b24e..2879529bb9f 100644 --- a/hotspot/src/share/vm/oops/methodKlass.cpp +++ b/hotspot/src/share/vm/oops/methodKlass.cpp @@ -68,7 +68,7 @@ methodOop methodKlass::allocate(constMethodHandle xconst, m->set_constants(NULL); m->set_max_stack(0); m->set_max_locals(0); - m->clear_intrinsic_id_cache(); + m->set_intrinsic_id(vmIntrinsics::_none); m->set_method_data(NULL); m->set_interpreter_throwout_count(0); m->set_vtable_index(methodOopDesc::garbage_vtable_index); diff --git a/hotspot/src/share/vm/oops/methodOop.cpp b/hotspot/src/share/vm/oops/methodOop.cpp index cb9cddac5b5..e68c289510c 100644 --- a/hotspot/src/share/vm/oops/methodOop.cpp +++ b/hotspot/src/share/vm/oops/methodOop.cpp @@ -962,26 +962,39 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod return newm; } -vmIntrinsics::ID methodOopDesc::compute_intrinsic_id() const { - assert(vmIntrinsics::_none == 0, "correct coding of default case"); - const uintptr_t max_cache_uint = right_n_bits((int)(sizeof(_intrinsic_id_cache) * BitsPerByte)); - assert((uintptr_t)vmIntrinsics::ID_LIMIT <= max_cache_uint, "else fix cache size"); +vmSymbols::SID methodOopDesc::klass_id_for_intrinsics(klassOop holder) { // if loader is not the default loader (i.e., != NULL), we can't know the intrinsics // because we are not loading from core libraries - if (instanceKlass::cast(method_holder())->class_loader() != NULL) return vmIntrinsics::_none; + if (instanceKlass::cast(holder)->class_loader() != NULL) + return vmSymbols::NO_SID; // regardless of name, no intrinsics here // see if the klass name is well-known: - symbolOop klass_name = instanceKlass::cast(method_holder())->name(); - vmSymbols::SID klass_id = vmSymbols::find_sid(klass_name); - if (klass_id == vmSymbols::NO_SID) return vmIntrinsics::_none; + symbolOop klass_name = instanceKlass::cast(holder)->name(); + return vmSymbols::find_sid(klass_name); +} + +void methodOopDesc::init_intrinsic_id() { + assert(_intrinsic_id == vmIntrinsics::_none, "do this just once"); + const uintptr_t max_id_uint = right_n_bits((int)(sizeof(_intrinsic_id) * BitsPerByte)); + assert((uintptr_t)vmIntrinsics::ID_LIMIT <= max_id_uint, "else fix size"); + + // the klass name is well-known: + vmSymbols::SID klass_id = klass_id_for_intrinsics(method_holder()); + assert(klass_id != vmSymbols::NO_SID, "caller responsibility"); // ditto for method and signature: vmSymbols::SID name_id = vmSymbols::find_sid(name()); - if (name_id == vmSymbols::NO_SID) return vmIntrinsics::_none; + if (name_id == vmSymbols::NO_SID) return; vmSymbols::SID sig_id = vmSymbols::find_sid(signature()); - if (sig_id == vmSymbols::NO_SID) return vmIntrinsics::_none; + if (sig_id == vmSymbols::NO_SID) return; jshort flags = access_flags().as_short(); + vmIntrinsics::ID id = vmIntrinsics::find_id(klass_id, name_id, sig_id, flags); + if (id != vmIntrinsics::_none) { + set_intrinsic_id(id); + return; + } + // A few slightly irregular cases: switch (klass_id) { case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_StrictMath): @@ -992,15 +1005,18 @@ vmIntrinsics::ID methodOopDesc::compute_intrinsic_id() const { case vmSymbols::VM_SYMBOL_ENUM_NAME(sqrt_name): // pretend it is the corresponding method in the non-strict class: klass_id = vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_Math); + id = vmIntrinsics::find_id(klass_id, name_id, sig_id, flags); break; } } - // return intrinsic id if any - return vmIntrinsics::find_id(klass_id, name_id, sig_id, flags); + if (id != vmIntrinsics::_none) { + // Set up its iid. It is an alias method. + set_intrinsic_id(id); + return; + } } - // These two methods are static since a GC may move the methodOopDesc bool methodOopDesc::load_signature_classes(methodHandle m, TRAPS) { bool sig_is_loaded = true; diff --git a/hotspot/src/share/vm/oops/methodOop.hpp b/hotspot/src/share/vm/oops/methodOop.hpp index 9a0afa85db9..5a79ed62609 100644 --- a/hotspot/src/share/vm/oops/methodOop.hpp +++ b/hotspot/src/share/vm/oops/methodOop.hpp @@ -104,7 +104,7 @@ class methodOopDesc : public oopDesc { u2 _max_stack; // Maximum number of entries on the expression stack u2 _max_locals; // Number of local variables used by this method u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words - u1 _intrinsic_id_cache; // Cache for intrinsic_id; 0 or 1+vmInt::ID + u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) u1 _highest_tier_compile; // Highest compile level this method has ever seen. u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting u2 _number_of_breakpoints; // fullspeed debugging support @@ -224,8 +224,6 @@ class methodOopDesc : public oopDesc { int highest_tier_compile() { return _highest_tier_compile;} void set_highest_tier_compile(int level) { _highest_tier_compile = level;} - void clear_intrinsic_id_cache() { _intrinsic_id_cache = 0; } - // Count of times method was exited via exception while interpreting void interpreter_throwout_increment() { if (_interpreter_throwout_count < 65534) { @@ -571,18 +569,12 @@ class methodOopDesc : public oopDesc { void set_cached_itable_index(int index) { instanceKlass::cast(method_holder())->set_cached_itable_index(method_idnum(), index); } // Support for inlining of intrinsic methods - vmIntrinsics::ID intrinsic_id() const { // returns zero if not an intrinsic - const u1& cache = _intrinsic_id_cache; - if (cache != 0) { - return (vmIntrinsics::ID)(cache - 1); - } else { - vmIntrinsics::ID id = compute_intrinsic_id(); - *(u1*)&cache = ((u1) id) + 1; // force the cache to be non-const - vmIntrinsics::verify_method(id, (methodOop) this); - assert((vmIntrinsics::ID)(cache - 1) == id, "proper conversion"); - return id; - } - } + vmIntrinsics::ID intrinsic_id() const { return (vmIntrinsics::ID) _intrinsic_id; } + void set_intrinsic_id(vmIntrinsics::ID id) { _intrinsic_id = (u1) id; } + + // Helper routines for intrinsic_id() and vmIntrinsics::method(). + void init_intrinsic_id(); // updates from _none if a match + static vmSymbols::SID klass_id_for_intrinsics(klassOop holder); // On-stack replacement support bool has_osr_nmethod() { return instanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci) != NULL; } @@ -635,9 +627,6 @@ class methodOopDesc : public oopDesc { void set_size_of_parameters(int size) { _size_of_parameters = size; } private: - // Helper routine for intrinsic_id(). - vmIntrinsics::ID compute_intrinsic_id() const; - // Inlined elements address* native_function_addr() const { assert(is_native(), "must be native"); return (address*) (this+1); } address* signature_handler_addr() const { return native_function_addr() + 1; } diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp index f3197152194..6b7fd37919e 100644 --- a/hotspot/src/share/vm/opto/compile.cpp +++ b/hotspot/src/share/vm/opto/compile.cpp @@ -101,7 +101,8 @@ CallGenerator* Compile::find_intrinsic(ciMethod* m, bool is_virtual) { } } // Lazily create intrinsics for intrinsic IDs well-known in the runtime. - if (m->intrinsic_id() != vmIntrinsics::_none) { + if (m->intrinsic_id() != vmIntrinsics::_none && + m->intrinsic_id() <= vmIntrinsics::LAST_COMPILER_INLINE) { CallGenerator* cg = make_vm_intrinsic(m, is_virtual); if (cg != NULL) { // Save it for next time: diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp index ec58f71e01b..ecc8abbf287 100644 --- a/hotspot/src/share/vm/opto/library_call.cpp +++ b/hotspot/src/share/vm/opto/library_call.cpp @@ -310,11 +310,6 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) { if (!InlineAtomicLong) return NULL; break; - case vmIntrinsics::_Object_init: - case vmIntrinsics::_invoke: - // We do not intrinsify these; they are marked for other purposes. - return NULL; - case vmIntrinsics::_getCallerClass: if (!UseNewReflection) return NULL; if (!InlineReflectionGetCallerClass) return NULL; @@ -327,6 +322,8 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) { break; default: + assert(id <= vmIntrinsics::LAST_COMPILER_INLINE, "caller responsibility"); + assert(id != vmIntrinsics::_Object_init && id != vmIntrinsics::_invoke, "enum out of order?"); break; } @@ -394,18 +391,11 @@ JVMState* LibraryIntrinsic::generate(JVMState* jvms) { } if (PrintIntrinsics) { - switch (intrinsic_id()) { - case vmIntrinsics::_invoke: - case vmIntrinsics::_Object_init: - // We do not expect to inline these, so do not produce any noise about them. - break; - default: - tty->print("Did not inline intrinsic %s%s at bci:%d in", - vmIntrinsics::name_at(intrinsic_id()), - (is_virtual() ? " (virtual)" : ""), kit.bci()); - kit.caller()->print_short_name(tty); - tty->print_cr(" (%d bytes)", kit.caller()->code_size()); - } + tty->print("Did not inline intrinsic %s%s at bci:%d in", + vmIntrinsics::name_at(intrinsic_id()), + (is_virtual() ? " (virtual)" : ""), kit.bci()); + kit.caller()->print_short_name(tty); + tty->print_cr(" (%d bytes)", kit.caller()->code_size()); } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_failed); return NULL; From f1b3e33db7277a668ccb1e25de308daf7829b1e6 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 22 Jul 2009 16:39:34 +0800 Subject: [PATCH 17/74] 6858589: more changes to Config on system properties Reviewed-by: valeriep --- .../classes/sun/security/krb5/Config.java | 88 +++++------- .../classes/sun/security/krb5/KrbApReq.java | 2 - jdk/test/sun/security/krb5/ConfPlusProp.java | 127 +++++++++++++----- 3 files changed, 124 insertions(+), 93 deletions(-) diff --git a/jdk/src/share/classes/sun/security/krb5/Config.java b/jdk/src/share/classes/sun/security/krb5/Config.java index 8adcba81f53..283e0d28cbf 100644 --- a/jdk/src/share/classes/sun/security/krb5/Config.java +++ b/jdk/src/share/classes/sun/security/krb5/Config.java @@ -70,7 +70,12 @@ public class Config { private static final int BASE16_1 = 16; private static final int BASE16_2 = 16 * 16; private static final int BASE16_3 = 16 * 16 * 16; - private String defaultRealm; // default kdc realm. + + /** + * Specified by system properties. Must be both null or non-null. + */ + private final String defaultRealm; + private final String defaultKDC; // used for native interface private static native String getWindowsDirectory(boolean isSystem); @@ -81,9 +86,8 @@ public class Config { * singleton) is returned. * * @exception KrbException if error occurs when constructing a Config - * instance. Possible causes would be configuration file not - * found, either of java.security.krb5.realm or java.security.krb5.kdc - * not specified, error reading configuration file. + * instance. Possible causes would be either of java.security.krb5.realm or + * java.security.krb5.kdc not specified, error reading configuration file. */ public static synchronized Config getInstance() throws KrbException { if (singleton == null) { @@ -98,9 +102,8 @@ public class Config { * the java.security.krb5.* system properties again. * * @exception KrbException if error occurs when constructing a Config - * instance. Possible causes would be configuration file not - * found, either of java.security.krb5.realm or java.security.krb5.kdc - * not specified, error reading configuration file. + * instance. Possible causes would be either of java.security.krb5.realm or + * java.security.krb5.kdc not specified, error reading configuration file. */ public static synchronized void refresh() throws KrbException { @@ -114,56 +117,37 @@ public class Config { */ private Config() throws KrbException { /* - * If these two system properties are being specified by the user, - * we ignore configuration file. If either one system property is - * specified, we throw exception. If neither of them are specified, - * we load the information from configuration file. + * If either one system property is specified, we throw exception. */ - String kdchost = + String tmp = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction ("java.security.krb5.kdc")); + if (tmp != null) { + // The user can specify a list of kdc hosts separated by ":" + defaultKDC = tmp.replace(':', ' '); + } else { + defaultKDC = null; + } defaultRealm = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction ("java.security.krb5.realm")); - if ((kdchost == null && defaultRealm != null) || - (defaultRealm == null && kdchost != null)) { + if ((defaultKDC == null && defaultRealm != null) || + (defaultRealm == null && defaultKDC != null)) { throw new KrbException ("System property java.security.krb5.kdc and " + "java.security.krb5.realm both must be set or " + "neither must be set."); } - // Read the Kerberos configuration file + // Always read the Kerberos configuration file try { Vector configFile; configFile = loadConfigFile(); stanzaTable = parseStanzaTable(configFile); } catch (IOException ioe) { - // No krb5.conf, no problem. We'll use DNS etc. - } - - if (kdchost != null) { - /* - * If configuration information is only specified by - * properties java.security.krb5.kdc and - * java.security.krb5.realm, we put both in the hashtable - * under [libdefaults]. - */ - if (stanzaTable == null) { - stanzaTable = new Hashtable (); - } - Hashtable kdcs = - (Hashtable)stanzaTable.get("libdefaults"); - if (kdcs == null) { - kdcs = new Hashtable (); - stanzaTable.put("libdefaults", kdcs); - } - kdcs.put("default_realm", defaultRealm); - // The user can specify a list of kdc hosts separated by ":" - kdchost = kdchost.replace(':', ' '); - kdcs.put("kdc", kdchost); + // No krb5.conf, no problem. We'll use DNS or system property etc. } } @@ -295,19 +279,6 @@ public class Config { String result = null; Hashtable subTable; - /* - * In the situation when kdc is specified by - * java.security.krb5.kdc, we get the kdc from [libdefaults] in - * hashtable. - */ - if (name.equalsIgnoreCase("kdc") && - (section.equalsIgnoreCase(getDefault("default_realm", "libdefaults"))) && - (java.security.AccessController.doPrivileged( - new sun.security.action. - GetPropertyAction("java.security.krb5.kdc")) != null)) { - result = getDefault("kdc", "libdefaults"); - return result; - } if (stanzaTable != null) { for (Enumeration e = stanzaTable.keys(); e.hasMoreElements(); ) { stanzaName = (String)e.nextElement(); @@ -1035,13 +1006,13 @@ public class Config { /** * Resets the default kdc realm. * We do not need to synchronize these methods since assignments are atomic + * + * This method was useless. Kept here in case some class still calls it. */ public void resetDefaultRealm(String realm) { - defaultRealm = realm; if (DEBUG) { - System.out.println(">>> Config reset default kdc " + defaultRealm); + System.out.println(">>> Config try resetting default kdc " + realm); } - } /** @@ -1098,6 +1069,9 @@ public class Config { * @return the default realm, always non null */ public String getDefaultRealm() throws KrbException { + if (defaultRealm != null) { + return defaultRealm; + } Exception cause = null; String realm = getDefault("default_realm", "libdefaults"); if ((realm == null) && useDNS_Realm()) { @@ -1142,6 +1116,9 @@ public class Config { if (realm == null) { realm = getDefaultRealm(); } + if (realm.equalsIgnoreCase(defaultRealm)) { + return defaultKDC; + } Exception cause = null; String kdcs = getDefault("kdc", realm); if ((kdcs == null) && useDNS_KDC()) { @@ -1171,6 +1148,9 @@ public class Config { }); } if (kdcs == null) { + if (defaultKDC != null) { + return defaultKDC; + } KrbException ke = new KrbException("Cannot locate KDC"); if (cause != null) { ke.initCause(cause); diff --git a/jdk/src/share/classes/sun/security/krb5/KrbApReq.java b/jdk/src/share/classes/sun/security/krb5/KrbApReq.java index d274b1efbb0..4ed98c5f0cd 100644 --- a/jdk/src/share/classes/sun/security/krb5/KrbApReq.java +++ b/jdk/src/share/classes/sun/security/krb5/KrbApReq.java @@ -294,8 +294,6 @@ public class KrbApReq { apReqMessg.ticket.sname.setRealm(apReqMessg.ticket.realm); enc_ticketPart.cname.setRealm(enc_ticketPart.crealm); - Config.getInstance().resetDefaultRealm(apReqMessg.ticket.realm.toString()); - if (!authenticator.cname.equals(enc_ticketPart.cname)) throw new KrbApErrException(Krb5.KRB_AP_ERR_BADMATCH); diff --git a/jdk/test/sun/security/krb5/ConfPlusProp.java b/jdk/test/sun/security/krb5/ConfPlusProp.java index b1ea2ca5e75..e2c49a237a9 100644 --- a/jdk/test/sun/security/krb5/ConfPlusProp.java +++ b/jdk/test/sun/security/krb5/ConfPlusProp.java @@ -23,31 +23,56 @@ /* * @test * @bug 6857795 + * @buf 6858589 * @summary krb5.conf ignored if system properties on realm and kdc are provided */ import sun.security.krb5.Config; -import sun.security.krb5.KrbException; public class ConfPlusProp { + Config config; public static void main(String[] args) throws Exception { - System.setProperty("java.security.krb5.realm", "R2"); - System.setProperty("java.security.krb5.kdc", "k2"); + new ConfPlusProp().run(); + } + + void refresh() throws Exception { + Config.refresh(); + config = Config.getInstance(); + } + + void checkDefaultRealm(String r) throws Exception { + try { + if (!config.getDefaultRealm().equals(r)) { + throw new AssertionError("Default realm error"); + } + } catch (Exception e) { + if (r != null) throw e; + } + } + + void check(String r, String k) throws Exception { + try { + if (!config.getKDCList(r).equals(k)) { + throw new AssertionError(r + " kdc not " + k); + } + } catch (Exception e) { + if (k != null) throw e; + } + } + + void run() throws Exception { + + // No prop, only conf // Point to a file with existing default_realm System.setProperty("java.security.krb5.conf", System.getProperty("test.src", ".") +"/confplusprop.conf"); - Config config = Config.getInstance(); + refresh(); - if (!config.getDefaultRealm().equals("R2")) { - throw new Exception("Default realm error"); - } - if (!config.getKDCList("R1").equals("k1")) { - throw new Exception("R1 kdc error"); - } - if (!config.getKDCList("R2").equals("k2")) { - throw new Exception("R2 kdc error"); - } + checkDefaultRealm("R1"); + check("R1", "k1"); + check("R2", "old"); + check("R3", null); if (!config.getDefault("forwardable", "libdefaults").equals("well")) { throw new Exception("Extra config error"); } @@ -55,38 +80,66 @@ public class ConfPlusProp { // Point to a file with no libdefaults System.setProperty("java.security.krb5.conf", System.getProperty("test.src", ".") +"/confplusprop2.conf"); - Config.refresh(); + refresh(); - config = Config.getInstance(); + checkDefaultRealm(null); + check("R1", "k12"); + check("R2", "old"); + check("R3", null); - if (!config.getDefaultRealm().equals("R2")) { - throw new Exception("Default realm error again"); + int version = System.getProperty("java.version").charAt(2) - '0'; + System.out.println("JDK version is " + version); + + // Zero-config is supported since 1.7 + if (version >= 7) { + // Point to a non-existing file + System.setProperty("java.security.krb5.conf", "i-am-not-a file"); + refresh(); + + checkDefaultRealm(null); + check("R1", null); + check("R2", null); + check("R3", null); + if (config.getDefault("forwardable", "libdefaults") != null) { + throw new Exception("Extra config error"); + } } - if (!config.getKDCList("R1").equals("k12")) { - throw new Exception("R1 kdc error"); - } - if (!config.getKDCList("R2").equals("k2")) { - throw new Exception("R2 kdc error"); + + // Add prop + System.setProperty("java.security.krb5.realm", "R2"); + System.setProperty("java.security.krb5.kdc", "k2"); + + // Point to a file with existing default_realm + System.setProperty("java.security.krb5.conf", + System.getProperty("test.src", ".") +"/confplusprop.conf"); + refresh(); + + checkDefaultRealm("R2"); + check("R1", "k1"); + check("R2", "k2"); + check("R3", "k2"); + if (!config.getDefault("forwardable", "libdefaults").equals("well")) { + throw new Exception("Extra config error"); } + // Point to a file with no libdefaults + System.setProperty("java.security.krb5.conf", + System.getProperty("test.src", ".") +"/confplusprop2.conf"); + refresh(); + + checkDefaultRealm("R2"); + check("R1", "k12"); + check("R2", "k2"); + check("R3", "k2"); + // Point to a non-existing file System.setProperty("java.security.krb5.conf", "i-am-not-a file"); - Config.refresh(); + refresh(); - config = Config.getInstance(); - - if (!config.getDefaultRealm().equals("R2")) { - throw new Exception("Default realm error"); - } - try { - config.getKDCList("R1"); - throw new Exception("R1 is nowhere"); - } catch (KrbException ke) { - // OK - } - if (!config.getKDCList("R2").equals("k2")) { - throw new Exception("R2 kdc error"); - } + checkDefaultRealm("R2"); + check("R1", "k2"); + check("R2", "k2"); + check("R3", "k2"); if (config.getDefault("forwardable", "libdefaults") != null) { throw new Exception("Extra config error"); } From 20ee77e0d006d665446d3987e56717aadd68335a Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 22 Jul 2009 16:40:04 +0800 Subject: [PATCH 18/74] 6847026: keytool should be able to generate certreq and cert without subject name Reviewed-by: xuelei --- .../classes/sun/security/tools/KeyTool.java | 18 +++-- .../classes/sun/security/util/Resources.java | 1 + .../security/tools/keytool/emptysubject.sh | 68 +++++++++++++++++++ 3 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 jdk/test/sun/security/tools/keytool/emptysubject.sh diff --git a/jdk/src/share/classes/sun/security/tools/KeyTool.java b/jdk/src/share/classes/sun/security/tools/KeyTool.java index 9b4b16fa11d..62d7b3fa464 100644 --- a/jdk/src/share/classes/sun/security/tools/KeyTool.java +++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java @@ -1052,7 +1052,7 @@ public final class KeyTool { X509CertImpl signerCertImpl = new X509CertImpl(encoded); X509CertInfo signerCertInfo = (X509CertInfo)signerCertImpl.get( X509CertImpl.NAME + "." + X509CertImpl.INFO); - X500Name owner = (X500Name)signerCertInfo.get(X509CertInfo.SUBJECT + "." + + X500Name issuer = (X500Name)signerCertInfo.get(X509CertInfo.SUBJECT + "." + CertificateSubjectName.DN_NAME); Date firstDate = getStartDate(startDate); @@ -1068,7 +1068,7 @@ public final class KeyTool { Signature signature = Signature.getInstance(sigAlgName); signature.initSign(privateKey); - X500Signer signer = new X500Signer(signature, owner); + X500Signer signer = new X500Signer(signature, issuer); X509CertInfo info = new X509CertInfo(); info.set(X509CertInfo.VALIDITY, interval); @@ -1102,7 +1102,8 @@ public final class KeyTool { PKCS10 req = new PKCS10(rawReq); info.set(X509CertInfo.KEY, new CertificateX509Key(req.getSubjectPublicKeyInfo())); - info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(req.getSubjectName())); + info.set(X509CertInfo.SUBJECT, new CertificateSubjectName( + dname==null?req.getSubjectName():new X500Name(dname))); CertificateExtensions reqex = null; Iterator attrs = req.getAttributes().getAttributes().iterator(); while (attrs.hasNext()) { @@ -1160,8 +1161,9 @@ public final class KeyTool { Signature signature = Signature.getInstance(sigAlgName); signature.initSign(privKey); - X500Name subject = - new X500Name(((X509Certificate)cert).getSubjectDN().toString()); + X500Name subject = dname == null? + new X500Name(((X509Certificate)cert).getSubjectDN().toString()): + new X500Name(dname); X500Signer signer = new X500Signer(signature, subject); // Sign the request and base-64 encode it @@ -3428,7 +3430,7 @@ public final class KeyTool { int colonpos = name.indexOf(':'); if (colonpos >= 0) { - if (name.substring(colonpos+1).equalsIgnoreCase("critical")) { + if (oneOf(name.substring(colonpos+1), "critical") == 0) { isCritical = true; } name = name.substring(0, colonpos); @@ -3688,6 +3690,8 @@ public final class KeyTool { ("-certreq [-v] [-protected]")); System.err.println(rb.getString ("\t [-alias ] [-sigalg ]")); + System.err.println(rb.getString + ("\t [-dname ]")); System.err.println(rb.getString ("\t [-file ] [-keypass ]")); System.err.println(rb.getString @@ -3770,6 +3774,8 @@ public final class KeyTool { ("\t [-infile ] [-outfile ]")); System.err.println(rb.getString ("\t [-alias ]")); + System.err.println(rb.getString + ("\t [-dname ]")); System.err.println(rb.getString ("\t [-sigalg ]")); System.err.println(rb.getString diff --git a/jdk/src/share/classes/sun/security/util/Resources.java b/jdk/src/share/classes/sun/security/util/Resources.java index c8c5e386de1..d837ae9b0c9 100644 --- a/jdk/src/share/classes/sun/security/util/Resources.java +++ b/jdk/src/share/classes/sun/security/util/Resources.java @@ -301,6 +301,7 @@ public class Resources extends java.util.ListResourceBundle { "-certreq [-v] [-protected]"}, {"\t [-alias ] [-sigalg ]", "\t [-alias ] [-sigalg ]"}, + {"\t [-dname ]", "\t [-dname ]"}, {"\t [-file ] [-keypass ]", "\t [-file ] [-keypass ]"}, {"\t [-keystore ] [-storepass ]", diff --git a/jdk/test/sun/security/tools/keytool/emptysubject.sh b/jdk/test/sun/security/tools/keytool/emptysubject.sh new file mode 100644 index 00000000000..ffe681c42aa --- /dev/null +++ b/jdk/test/sun/security/tools/keytool/emptysubject.sh @@ -0,0 +1,68 @@ +# +# Copyright 2009 Sun Microsystems, Inc. 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# + +# @test +# @bug 6847026 +# @summary keytool should be able to generate certreq and cert without subject name +# +# @run shell emptysubject.sh +# + +if [ "${TESTJAVA}" = "" ] ; then + JAVAC_CMD=`which javac` + TESTJAVA=`dirname $JAVAC_CMD`/.. +fi + +# set platform-dependent variables +OS=`uname -s` +case "$OS" in + Windows_* ) + FS="\\" + ;; + * ) + FS="/" + ;; +esac + +KS=emptysubject.jks +KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit -keystore $KS" + +rm $KS + +$KT -alias ca -dname CN=CA -genkeypair +$KT -alias me -dname CN=Me -genkeypair + +# When -dname is recognized, SAN must be specfied, otherwise, -printcert fails. +$KT -alias me -certreq -dname "" | \ + $KT -alias ca -gencert | $KT -printcert && exit 1 +$KT -alias me -certreq | \ + $KT -alias ca -gencert -dname "" | $KT -printcert && exit 2 +$KT -alias me -certreq -dname "" | \ + $KT -alias ca -gencert -ext san:c=email:me@me.com | \ + $KT -printcert || exit 3 +$KT -alias me -certreq | \ + $KT -alias ca -gencert -dname "" -ext san:c=email:me@me.com | \ + $KT -printcert || exit 4 + +exit 0 + From ee5188c4c3dadc3adecfa173f4c18e40daf962c6 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 22 Jul 2009 16:40:39 +0800 Subject: [PATCH 19/74] 6854308: more ktab options Reviewed-by: mullan --- .../security/krb5/internal/ktab/KeyTab.java | 27 +++- .../security/krb5/internal/tools/Klist.java | 1 + .../security/krb5/internal/tools/Ktab.java | 126 +++++++++++++----- 3 files changed, 112 insertions(+), 42 deletions(-) diff --git a/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java b/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java index 4fd7b3bf4e6..d7c5484ec0c 100644 --- a/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java +++ b/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java @@ -1,5 +1,5 @@ /* - * Portions Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Portions Copyright 2000-2009 Sun Microsystems, Inc. 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 @@ -403,11 +403,11 @@ public class KeyTab implements KeyTabConstants { /** * Retrieves the key table entry with the specified service name. * @param service the service which may have an entry in the key table. + * @param keyType the etype to match, returns the 1st one if -1 provided * @return -1 if the entry is not found, else return the entry index * in the list. */ private int retrieveEntry(PrincipalName service, int keyType) { - int found = -1; KeyTabEntry e; if (entries != null) { for (int i = 0; i < entries.size(); i++) { @@ -418,7 +418,7 @@ public class KeyTab implements KeyTabConstants { } } } - return found; + return -1; } /** @@ -476,12 +476,29 @@ public class KeyTab implements KeyTabConstants { /** * Removes an entry from the key table. * @param service the service PrincipalName. + * @param etype the etype to match, first one if -1 provided + * @return 1 if removed successfully, 0 otherwise */ - public void deleteEntry(PrincipalName service) { - int result = retrieveEntry(service, -1); + public int deleteEntry(PrincipalName service, int etype) { + int result = retrieveEntry(service, etype); if (result != -1) { entries.removeElementAt(result); + return 1; } + return 0; + } + + /** + * Removes an entry from the key table. + * @param service the service PrincipalName. + * @return number of entries removed + */ + public int deleteEntry(PrincipalName service) { + int count = 0; + while (deleteEntry(service, -1) > 0) { + count++; + } + return count; } /** diff --git a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java index c4724fbd382..5cb919b9d52 100644 --- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java +++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java @@ -1,4 +1,5 @@ /* + * Portions Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java index b773189c113..30be1b51405 100644 --- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java +++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java @@ -1,4 +1,5 @@ /* + * Portions Copyright 2003-2009 Sun Microsystems, Inc. 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 @@ -30,16 +31,15 @@ package sun.security.krb5.internal.tools; import sun.security.krb5.*; -import sun.security.krb5.internal.*; import sun.security.krb5.internal.ktab.*; -import sun.security.krb5.KrbCryptoException; -import java.lang.RuntimeException; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; -import java.io.FileOutputStream; import java.io.File; +import java.text.DateFormat; import java.util.Arrays; +import java.util.Date; +import sun.security.krb5.internal.crypto.EType; /** * This class can execute as a command-line tool to help the user manage * entires in the key table. @@ -55,6 +55,9 @@ public class Ktab { char action; String name; // name and directory of key table String principal; + boolean showEType; + boolean showTime; + int etype = -1; char[] password = null; /** @@ -62,13 +65,14 @@ public class Ktab { *
Usage: ktab *
available options to Ktab: *
    - *
  • -l list the keytab name and entries + *
  • -l [-e] [-t] list the keytab name and entries, -e show + * encryption etypes, -t show timestamps. *
  • -a <principal name> * (<password>) add an entry to the keytab. * The entry is added only to the keytab. No changes are made to the * Kerberos database. - *
  • -d <principal name> - * delete an entry from the keytab + *
  • -d <principal name> [<etype>] + * delete an entry from the keytab. * The entry is deleted only from the keytab. No changes are made to the * Kerberos database. *
  • -k <keytab name > @@ -182,6 +186,11 @@ public class Ktab { i++; if ((i < args.length) && (!args[i].startsWith("-"))) { principal = args[i]; + int j = i + 1; + if ((j < args.length) && (!args[j].startsWith("-"))) { + etype = Integer.parseInt(args[j]); + i = j; + } } else { System.out.println("Please specify the principal" + "name of the entry you want to " + @@ -207,6 +216,12 @@ public class Ktab { System.exit(-1); } break; + case 'e': + showEType = true; + break; + case 't': + showTime = true; + break; default: printHelp(); System.exit(-1); @@ -271,25 +286,54 @@ public class Ktab { * Lists key table name and entries in it. */ void listKt() { - int version; - String principal; - // System.out.println("Keytab name: " + admin.getKeyTabName()); - System.out.println("Keytab name: " + table.tabName()); - // KeyTabEntry[] entries = admin.getEntries(); + System.out.println("Keytab name: " + KeyTab.tabName()); KeyTabEntry[] entries = table.getEntries(); if ((entries != null) && (entries.length > 0)) { - System.out.println("KVNO Principal"); + String[][] output = new String[entries.length+1][showTime?3:2]; + int column = 0; + output[0][column++] = "KVNO"; + if (showTime) output[0][column++] = "Timestamp"; + output[0][column++] = "Principal"; for (int i = 0; i < entries.length; i++) { - version = entries[i].getKey().getKeyVersionNumber().intValue(); - principal = entries[i].getService().toString(); - if (i == 0) { - StringBuffer separator = new StringBuffer(); - for (int j = 0; j < 9 + principal.length(); j++) { - separator.append("-"); - } - System.out.println(separator.toString()); + column = 0; + output[i+1][column++] = entries[i].getKey(). + getKeyVersionNumber().toString(); + if (showTime) output[i+1][column++] = + DateFormat.getDateTimeInstance( + DateFormat.SHORT, DateFormat.SHORT).format( + new Date(entries[i].getTimeStamp().getTime())); + String princ = entries[i].getService().toString(); + if (showEType) { + int e = entries[i].getKey().getEType(); + output[i+1][column++] = princ + " (" + e + ":" + + EType.toString(e) + ")"; + } else { + output[i+1][column++] = princ; } - System.out.println(" " + version + " " + principal); + } + int[] width = new int[column]; + for (int j=0; j width[j]) { + width[j] = output[i][j].length(); + } + } + if (j != 0) width[j] = -width[j]; + } + for (int j=0; j"); System.out.println("available options to Ktab:"); - System.out.println("-l\t\t\t\tlist the keytab name and entries"); + System.out.println("-l [-e] [-t]\t\t\tlist the keytab name and entries,\n\t\t\t\t-e with etype, -t with timestamp"); System.out.println("-a ()add an entry " + "to the keytab"); - System.out.println("-d \t\tdelete an entry from "+ - "the keytab"); + System.out.println("-d []\tdelete an "+ + "entry from the keytab"); System.out.println("-k \t\tspecify keytab name and "+ - " path with prefix FILE:"); + "path with prefix FILE:"); } } From 945ec035633cbf1ea0fca2f3148646baa1aaf71d Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 22 Jul 2009 16:41:14 +0800 Subject: [PATCH 20/74] 6561126: keytool should use larger default keysize for keypairs Reviewed-by: mullan --- .../classes/sun/security/tools/JarSigner.java | 4 +- .../classes/sun/security/tools/KeyTool.java | 5 +- .../classes/sun/security/util/Resources.java | 2 +- .../sun/security/tools/jarsigner/newsize7.sh | 73 +++++++++++++++++++ .../sun/security/tools/keytool/NewSize7.java | 56 ++++++++++++++ 5 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 jdk/test/sun/security/tools/jarsigner/newsize7.sh create mode 100644 jdk/test/sun/security/tools/keytool/NewSize7.java diff --git a/jdk/src/share/classes/sun/security/tools/JarSigner.java b/jdk/src/share/classes/sun/security/tools/JarSigner.java index e7ca8bc7508..76a9c403145 100644 --- a/jdk/src/share/classes/sun/security/tools/JarSigner.java +++ b/jdk/src/share/classes/sun/security/tools/JarSigner.java @@ -136,7 +136,7 @@ public class JarSigner { char[] keypass; // private key password String sigfile; // name of .SF file String sigalg; // name of signature algorithm - String digestalg = "SHA1"; // name of digest algorithm + String digestalg = "SHA-256"; // name of digest algorithm String signedjar; // output filename String tsaUrl; // location of the Timestamping Authority String tsaAlias; // alias for the Timestamping Authority's certificate @@ -2205,7 +2205,7 @@ class SignatureFile { if (keyAlgorithm.equalsIgnoreCase("DSA")) digestAlgorithm = "SHA1"; else if (keyAlgorithm.equalsIgnoreCase("RSA")) - digestAlgorithm = "SHA1"; + digestAlgorithm = "SHA256"; else { throw new RuntimeException("private key is not a DSA or " + "RSA key"); diff --git a/jdk/src/share/classes/sun/security/tools/KeyTool.java b/jdk/src/share/classes/sun/security/tools/KeyTool.java index 62d7b3fa464..892e86447e9 100644 --- a/jdk/src/share/classes/sun/security/tools/KeyTool.java +++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java @@ -1318,7 +1318,7 @@ public final class KeyTool { if ("DSA".equalsIgnoreCase(keyAlgName)) { return "SHA1WithDSA"; } else if ("RSA".equalsIgnoreCase(keyAlgName)) { - return "SHA1WithRSA"; + return "SHA256WithRSA"; } else if ("EC".equalsIgnoreCase(keyAlgName)) { return "SHA1withECDSA"; } else { @@ -1336,6 +1336,8 @@ public final class KeyTool { if (keysize == -1) { if ("EC".equalsIgnoreCase(keyAlgName)) { keysize = 256; + } else if ("RSA".equalsIgnoreCase(keyAlgName)) { + keysize = 2048; } else { keysize = 1024; } @@ -2499,6 +2501,7 @@ public final class KeyTool { cert.getNotAfter().toString(), getCertFingerPrint("MD5", cert), getCertFingerPrint("SHA1", cert), + getCertFingerPrint("SHA-256", cert), cert.getSigAlgName(), cert.getVersion() }; diff --git a/jdk/src/share/classes/sun/security/util/Resources.java b/jdk/src/share/classes/sun/security/util/Resources.java index d837ae9b0c9..9b3931b68a1 100644 --- a/jdk/src/share/classes/sun/security/util/Resources.java +++ b/jdk/src/share/classes/sun/security/util/Resources.java @@ -215,7 +215,7 @@ public class Resources extends java.util.ListResourceBundle { {"\t(RETURN if same as for )", "\t(RETURN if same as for <{0}>)"}, {"*PATTERN* printX509Cert", - "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t MD5: {5}\n\t SHA1: {6}\n\t Signature algorithm name: {7}\n\t Version: {8}"}, + "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t MD5: {5}\n\t SHA1: {6}\n\t SHA256: {7}\n\t Signature algorithm name: {8}\n\t Version: {9}"}, {"What is your first and last name?", "What is your first and last name?"}, {"What is the name of your organizational unit?", diff --git a/jdk/test/sun/security/tools/jarsigner/newsize7.sh b/jdk/test/sun/security/tools/jarsigner/newsize7.sh new file mode 100644 index 00000000000..0d719799ecf --- /dev/null +++ b/jdk/test/sun/security/tools/jarsigner/newsize7.sh @@ -0,0 +1,73 @@ +# +# Copyright 2009 Sun Microsystems, Inc. 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# + +# @test +# @bug 6561126 +# @summary keytool should use larger default keysize for keypairs +# +# @run shell newsize7.sh + +# set a few environment variables so that the shell-script can run stand-alone +# in the source directory +if [ "${TESTSRC}" = "" ] ; then + TESTSRC="." +fi + +if [ "${TESTJAVA}" = "" ] ; then + JAVA_CMD=`which java` + TESTJAVA=`dirname $JAVA_CMD`/.. +fi + +# set platform-dependent variables +OS=`uname -s` +case "$OS" in + Windows_* ) + FS="\\" + ;; + * ) + FS="/" + ;; +esac + +KSFILE=ns7.jks + +KT="${TESTJAVA}${FS}bin${FS}keytool -keystore ns7.jks -storepass changeit -keypass changeit" +JAR="${TESTJAVA}${FS}bin${FS}jar" +JS="${TESTJAVA}${FS}bin${FS}jarsigner -keystore ns7.jks -storepass changeit" + +rm ns7.* + +$KT -genkeypair -alias me -dname CN=Me + +touch ns7.txt +$JAR cvf ns7.jar ns7.txt + +$JS ns7.jar me +$JAR xvf ns7.jar + +grep SHA-256 META-INF/MANIFEST.MF || exit 1 +grep SHA-256 META-INF/ME.SF || exit 2 + +#rm -rf META-INF + +exit 0 diff --git a/jdk/test/sun/security/tools/keytool/NewSize7.java b/jdk/test/sun/security/tools/keytool/NewSize7.java new file mode 100644 index 00000000000..6235aaee9cb --- /dev/null +++ b/jdk/test/sun/security/tools/keytool/NewSize7.java @@ -0,0 +1,56 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6561126 + * @summary keytool should use larger default keysize for keypairs + */ + +import java.io.File; +import java.io.FileInputStream; +import java.security.KeyStore; +import java.security.cert.X509Certificate; +import java.security.interfaces.RSAPublicKey; +import sun.security.tools.KeyTool; + +public class NewSize7 { + public static void main(String[] args) throws Exception { + String FILE = "newsize7-ks"; + new File(FILE).delete(); + KeyTool.main(("-debug -genkeypair -keystore " + FILE + + " -alias a -dname cn=c -storepass changeit" + + " -keypass changeit -keyalg rsa").split(" ")); + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(new FileInputStream(FILE), null); + new File(FILE).delete(); + RSAPublicKey r = (RSAPublicKey)ks.getCertificate("a").getPublicKey(); + if (r.getModulus().bitLength() != 2048) { + throw new Exception("Bad keysize"); + } + X509Certificate x = (X509Certificate)ks.getCertificate("a"); + if (!x.getSigAlgName().equals("SHA256withRSA")) { + throw new Exception("Bad sigalg"); + } + } +} From 6293f73bd86a04cf3ab19f580549b1039a3e96ab Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Wed, 22 Jul 2009 13:00:11 +0400 Subject: [PATCH 21/74] 6859935: REGRESSION: Settings are missing in JCP/Advanced tab on windows Reviewed-by: art --- .../windows/classes/sun/awt/windows/WToolkit.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java index 6e12209f94c..9fcf3d67a8b 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java +++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java @@ -886,14 +886,12 @@ public class WToolkit extends SunToolkit implements Runnable { * this should be done in lazilyLoadDesktopProperty() only. */ protected synchronized void initializeDesktopProperties() { - desktopProperties.put("DnD.Autoscroll.initialDelay", Integer.valueOf(50)); - desktopProperties.put("DnD.Autoscroll.interval", Integer.valueOf(50)); - - try { - desktopProperties.put("Shell.shellFolderManager", - Class.forName("sun.awt.shell.Win32ShellFolderManager2")); - } catch (ClassNotFoundException ex) { - } + desktopProperties.put("DnD.Autoscroll.initialDelay", + Integer.valueOf(50)); + desktopProperties.put("DnD.Autoscroll.interval", + Integer.valueOf(50)); + desktopProperties.put("Shell.shellFolderManager", + "sun.awt.shell.Win32ShellFolderManager2"); } /* From 0e783b7554093f332ac898b9215949d8d124d441 Mon Sep 17 00:00:00 2001 From: Andrey Petrusenko Date: Wed, 22 Jul 2009 02:46:55 -0700 Subject: [PATCH 22/74] 6862661: G1: _gc_alloc_region_counts is not updated properly after 6604422 Implementation of RFE 6604422 (G1: re-use half-promoted regions) introduced incorrect _gc_alloc_region_counts updates which effectively disabled survivor spaces. Reviewed-by: johnc, jmasa, tonyp --- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 4f2ef1d5d78..b463b40a7fc 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -2981,6 +2981,7 @@ void G1CollectedHeap::get_gc_alloc_regions() { for (int ap = 0; ap < GCAllocPurposeCount; ++ap) { assert(_gc_alloc_regions[ap] == NULL, "invariant"); + assert(_gc_alloc_region_counts[ap] == 0, "invariant"); // Create new GC alloc regions. HeapRegion* alloc_region = _retained_gc_alloc_regions[ap]; @@ -3009,6 +3010,9 @@ void G1CollectedHeap::get_gc_alloc_regions() { if (alloc_region == NULL) { // we will get a new GC alloc region alloc_region = newAllocRegionWithExpansion(ap, 0); + } else { + // the region was retained from the last collection + ++_gc_alloc_region_counts[ap]; } if (alloc_region != NULL) { @@ -3047,11 +3051,11 @@ void G1CollectedHeap::release_gc_alloc_regions(bool totally) { for (int ap = 0; ap < GCAllocPurposeCount; ++ap) { HeapRegion* r = _gc_alloc_regions[ap]; _retained_gc_alloc_regions[ap] = NULL; + _gc_alloc_region_counts[ap] = 0; if (r != NULL) { // we retain nothing on _gc_alloc_regions between GCs set_gc_alloc_region(ap, NULL); - _gc_alloc_region_counts[ap] = 0; if (r->is_empty()) { // we didn't actually allocate anything in it; let's just put From 7cfb301baa86bc40ae0c90060843b57a4025d08b Mon Sep 17 00:00:00 2001 From: Poonam Bajaj Date: Wed, 22 Jul 2009 07:49:57 -0700 Subject: [PATCH 23/74] 6814140: deadlock due to synchronized demandLogger() code that locks ServerLogManager Making demandLogger() non-synchronized resolves the deadlock. Reviewed-by: dcubed --- jdk/src/share/classes/java/util/logging/LogManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/util/logging/LogManager.java b/jdk/src/share/classes/java/util/logging/LogManager.java index fc8f080eb71..e6412565a87 100644 --- a/jdk/src/share/classes/java/util/logging/LogManager.java +++ b/jdk/src/share/classes/java/util/logging/LogManager.java @@ -338,7 +338,7 @@ public class LogManager { // already been created with the given name it is returned. // Otherwise a new logger instance is created and registered // in the LogManager global namespace. - synchronized Logger demandLogger(String name) { + Logger demandLogger(String name) { Logger result = getLogger(name); if (result == null) { result = new Logger(name, null); From b0f75657c5b97f267ac40e4962b3f8034c4dfc68 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Wed, 22 Jul 2009 15:48:51 -0700 Subject: [PATCH 24/74] 6826736: CMS: core dump with -XX:+UseCompressedOops Fix deoptimization code and OopMapSet::all_do() to check for oop = narrow_oop_base. Reviewed-by: jcoomes, phh, ysr, never --- hotspot/src/share/vm/compiler/oopMap.cpp | 21 +++++- hotspot/src/share/vm/compiler/oopMap.hpp | 4 ++ hotspot/src/share/vm/memory/universe.hpp | 1 + hotspot/src/share/vm/runtime/stackValue.cpp | 12 +++- hotspot/test/compiler/6826736/Test.java | 75 +++++++++++++++++++++ 5 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 hotspot/test/compiler/6826736/Test.java diff --git a/hotspot/src/share/vm/compiler/oopMap.cpp b/hotspot/src/share/vm/compiler/oopMap.cpp index 22b4b9438cd..87751ab5bf3 100644 --- a/hotspot/src/share/vm/compiler/oopMap.cpp +++ b/hotspot/src/share/vm/compiler/oopMap.cpp @@ -379,7 +379,15 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map, if ( loc != NULL ) { oop *base_loc = fr->oopmapreg_to_location(omv.content_reg(), reg_map); oop *derived_loc = loc; - derived_oop_fn(base_loc, derived_loc); + oop val = *base_loc; + if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) { + // Ignore NULL oops and decoded NULL narrow oops which + // equal to Universe::narrow_oop_base when a narrow oop + // implicit null check is used in compiled code. + // The narrow_oop_base could be NULL or be the address + // of the page below heap depending on compressed oops mode. + } else + derived_oop_fn(base_loc, derived_loc); } oms.next(); } while (!oms.is_done()); @@ -394,6 +402,15 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map, oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map); if ( loc != NULL ) { if ( omv.type() == OopMapValue::oop_value ) { + oop val = *loc; + if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) { + // Ignore NULL oops and decoded NULL narrow oops which + // equal to Universe::narrow_oop_base when a narrow oop + // implicit null check is used in compiled code. + // The narrow_oop_base could be NULL or be the address + // of the page below heap depending on compressed oops mode. + continue; + } #ifdef ASSERT if ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) || !Universe::heap()->is_in_or_null(*loc)) { @@ -410,6 +427,8 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map, #endif // ASSERT oop_fn->do_oop(loc); } else if ( omv.type() == OopMapValue::value_value ) { + assert((*loc) == (oop)NULL || !Universe::is_narrow_oop_base(*loc), + "found invalid value pointer"); value_fn->do_oop(loc); } else if ( omv.type() == OopMapValue::narrowoop_value ) { narrowOop *nl = (narrowOop*)loc; diff --git a/hotspot/src/share/vm/compiler/oopMap.hpp b/hotspot/src/share/vm/compiler/oopMap.hpp index 72f9a83a9c2..ff72fb20bee 100644 --- a/hotspot/src/share/vm/compiler/oopMap.hpp +++ b/hotspot/src/share/vm/compiler/oopMap.hpp @@ -233,6 +233,10 @@ class OopMapSet : public ResourceObj { int heap_size() const; void copy_to(address addr); + // Methods oops_do() and all_do() filter out NULL oops and + // oop == Universe::narrow_oop_base() before passing oops + // to closures. + // Iterates through frame for a compiled method static void oops_do (const frame* fr, const RegisterMap* reg_map, OopClosure* f); diff --git a/hotspot/src/share/vm/memory/universe.hpp b/hotspot/src/share/vm/memory/universe.hpp index 9e17a184450..eedb021c42f 100644 --- a/hotspot/src/share/vm/memory/universe.hpp +++ b/hotspot/src/share/vm/memory/universe.hpp @@ -343,6 +343,7 @@ class Universe: AllStatic { // For UseCompressedOops static address* narrow_oop_base_addr() { return &_narrow_oop._base; } static address narrow_oop_base() { return _narrow_oop._base; } + static bool is_narrow_oop_base(void* addr) { return (narrow_oop_base() == (address)addr); } static int narrow_oop_shift() { return _narrow_oop._shift; } static void set_narrow_oop_base(address base) { _narrow_oop._base = base; } static void set_narrow_oop_shift(int shift) { _narrow_oop._shift = shift; } diff --git a/hotspot/src/share/vm/runtime/stackValue.cpp b/hotspot/src/share/vm/runtime/stackValue.cpp index 9f3fb0f0ec3..8225467c8ac 100644 --- a/hotspot/src/share/vm/runtime/stackValue.cpp +++ b/hotspot/src/share/vm/runtime/stackValue.cpp @@ -104,7 +104,17 @@ StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* r } #endif case Location::oop: { - Handle h(*(oop *)value_addr); // Wrap a handle around the oop + oop val = *(oop *)value_addr; +#ifdef _LP64 + if (Universe::is_narrow_oop_base(val)) { + // Compiled code may produce decoded oop = narrow_oop_base + // when a narrow oop implicit null check is used. + // The narrow_oop_base could be NULL or be the address + // of the page below heap. Use NULL value for both cases. + val = (oop)NULL; + } +#endif + Handle h(val); // Wrap a handle around the oop return new StackValue(h); } case Location::addr: { diff --git a/hotspot/test/compiler/6826736/Test.java b/hotspot/test/compiler/6826736/Test.java new file mode 100644 index 00000000000..02d0b2a9de7 --- /dev/null +++ b/hotspot/test/compiler/6826736/Test.java @@ -0,0 +1,75 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +/** + * @test + * @bug 6826736 + * @summary CMS: core dump with -XX:+UseCompressedOops + * + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:+ScavengeALot -XX:+UseCompressedOops -XX:HeapBaseMinAddress=32g -XX:CompileThreshold=100 -XX:CompileOnly=Test.test -XX:-BlockLayoutRotateLoops -XX:LoopUnrollLimit=0 Test + */ + +public class Test { + int[] arr; + int[] arr2; + int test(int r) { + for (int i = 0; i < 100; i++) { + for (int j = i; j < 100; j++) { + int a = 0; + for (long k = 0; k < 100; k++) { + a += k; + } + if (arr != null) + a = arr[j]; + r += a; + } + } + return r; + } + + public static void main(String[] args) { + int r = 0; + Test t = new Test(); + for (int i = 0; i < 100; i++) { + t.arr = new int[100]; + r = t.test(r); + } + System.out.println("Warmup 1 is done."); + for (int i = 0; i < 100; i++) { + t.arr = null; + r = t.test(r); + } + System.out.println("Warmup 2 is done."); + for (int i = 0; i < 100; i++) { + t.arr = new int[100]; + r = t.test(r); + } + System.out.println("Warmup is done."); + for (int i = 0; i < 100; i++) { + t.arr = new int[1000000]; + t.arr = null; + r = t.test(r); + } + } +} From 2ea2c4b650aa436805251f1539ea57e592f2a095 Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Wed, 22 Jul 2009 17:52:21 -0700 Subject: [PATCH 25/74] 6823905: crash in sun.security.pkcs11.wrapper.PKCS11.C_Sign during stress-test Initialize relevant return value to NULL Reviewed-by: vinnie --- .../sun/security/pkcs11/wrapper/p11_general.c | 4 ++-- .../sun/security/pkcs11/wrapper/p11_keymgmt.c | 12 ++++-------- .../sun/security/pkcs11/wrapper/p11_objmgmt.c | 14 +++++--------- .../native/sun/security/pkcs11/wrapper/p11_sign.c | 2 +- .../native/sun/security/pkcs11/wrapper/p11_util.c | 10 ++++------ .../sun/security/pkcs11/wrapper/pkcs11wrapper.h | 2 +- 6 files changed, 17 insertions(+), 27 deletions(-) diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_general.c b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_general.c index e6cbe2b6d91..8e80a59077c 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_general.c +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_general.c @@ -337,7 +337,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotList CK_ULONG ckTokenNumber; CK_SLOT_ID_PTR ckpSlotList; CK_BBOOL ckTokenPresent; - jlongArray jSlotList; + jlongArray jSlotList = NULL; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -637,7 +637,7 @@ Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismList CK_SLOT_ID ckSlotID; CK_ULONG ckMechanismNumber; CK_MECHANISM_TYPE_PTR ckpMechanismList; - jlongArray jMechanismList; + jlongArray jMechanismList = NULL; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c index aab0491a30e..501ead98c42 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c @@ -73,9 +73,8 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKey CK_MECHANISM ckMechanism; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - CK_OBJECT_HANDLE ckKeyHandle; + CK_OBJECT_HANDLE ckKeyHandle = 0; jlong jKeyHandle = 0L; - CK_ULONG i; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -151,8 +150,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Generate CK_OBJECT_HANDLE_PTR ckpPublicKeyHandle; /* pointer to Public Key */ CK_OBJECT_HANDLE_PTR ckpPrivateKeyHandle; /* pointer to Private Key */ CK_OBJECT_HANDLE_PTR ckpKeyHandles; /* pointer to array with Public and Private Key */ - jlongArray jKeyHandles; - CK_ULONG i; + jlongArray jKeyHandles = NULL; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -299,9 +297,8 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1UnwrapKey CK_ULONG ckWrappedKeyLength; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - CK_OBJECT_HANDLE ckKeyHandle; + CK_OBJECT_HANDLE ckKeyHandle = 0; jlong jKeyHandle = 0L; - CK_ULONG i; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -478,8 +475,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; CK_OBJECT_HANDLE ckKeyHandle = 0; - jlong jKeyHandle; - CK_ULONG i; + jlong jKeyHandle = 0L; CK_RV rv; CK_OBJECT_HANDLE_PTR phKey = &ckKeyHandle; diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c index a72f20d2719..307f2ee7310 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_objmgmt.c @@ -72,8 +72,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1CreateObject CK_OBJECT_HANDLE ckObjectHandle; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - jlong jObjectHandle; - CK_ULONG i; + jlong jObjectHandle = 0L; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -114,8 +113,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1CopyObject CK_OBJECT_HANDLE ckNewObjectHandle; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - jlong jNewObjectHandle; - CK_ULONG i; + jlong jNewObjectHandle = 0L; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -180,7 +178,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetObjectSize CK_SESSION_HANDLE ckSessionHandle; CK_OBJECT_HANDLE ckObjectHandle; CK_ULONG ckObjectSize; - jlong jObjectSize; + jlong jObjectSize = 0L; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -217,7 +215,7 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetAttributeVa CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; CK_ULONG ckBufferLength; - CK_ULONG i, j; + CK_ULONG i; jobject jAttribute; CK_RV rv; @@ -307,7 +305,6 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetAttributeVa CK_OBJECT_HANDLE ckObjectHandle; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - CK_ULONG i; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -342,7 +339,6 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsIni CK_SESSION_HANDLE ckSessionHandle; CK_ATTRIBUTE_PTR ckpAttributes = NULL_PTR; CK_ULONG ckAttributesLength; - CK_ULONG i; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); @@ -385,7 +381,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObje CK_ULONG ckMaxObjectLength; CK_OBJECT_HANDLE_PTR ckpObjectHandleArray; CK_ULONG ckActualObjectCount; - jlongArray jObjectHandleArray; + jlongArray jObjectHandleArray = NULL; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); if (ckpFunctions == NULL) { return NULL; } diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_sign.c b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_sign.c index e55755d1cf0..6c60fddd940 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_sign.c +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_sign.c @@ -110,7 +110,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_C_1Sign CK_BYTE_PTR ckpSignature; CK_ULONG ckDataLength; CK_ULONG ckSignatureLength = 0; - jbyteArray jSignature; + jbyteArray jSignature = NULL; CK_RV rv; CK_FUNCTION_LIST_PTR ckpFunctions = getFunctionList(env, obj); diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_util.c b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_util.c index d4c12a06baa..98ec9c3b2e6 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_util.c +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_util.c @@ -194,16 +194,14 @@ jlong ckAssertReturnValueOK(JNIEnv *env, CK_RV returnValue) jclass jPKCS11ExceptionClass; jmethodID jConstructor; jthrowable jPKCS11Exception; - jlong jErrorCode; + jlong jErrorCode = 0L; - if (returnValue == CKR_OK) { - return 0L ; - } else { + if (returnValue != CKR_OK) { + jErrorCode = ckULongToJLong(returnValue); jPKCS11ExceptionClass = (*env)->FindClass(env, CLASS_PKCS11EXCEPTION); if (jPKCS11ExceptionClass != NULL) { jConstructor = (*env)->GetMethodID(env, jPKCS11ExceptionClass, "", "(J)V"); if (jConstructor != NULL) { - jErrorCode = ckULongToJLong(returnValue); jPKCS11Exception = (jthrowable) (*env)->NewObject(env, jPKCS11ExceptionClass, jConstructor, jErrorCode); if (jPKCS11Exception != NULL) { (*env)->Throw(env, jPKCS11Exception); @@ -211,8 +209,8 @@ jlong ckAssertReturnValueOK(JNIEnv *env, CK_RV returnValue) } } (*env)->DeleteLocalRef(env, jPKCS11ExceptionClass); - return jErrorCode ; } + return jErrorCode ; } /* diff --git a/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h b/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h index 9dd90c30466..78a73f15f3a 100644 --- a/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h +++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h @@ -300,7 +300,7 @@ void jAttributeArrayToCKAttributeArray(JNIEnv *env, jobjectArray jAArray, CK_ATT /* funktions to convert a CK-type array and the array length to a Java array */ -jcharArray ckByteArrayToJByteArray(JNIEnv *env, const CK_BYTE_PTR ckpArray, CK_ULONG ckLength); +jbyteArray ckByteArrayToJByteArray(JNIEnv *env, const CK_BYTE_PTR ckpArray, CK_ULONG ckLength); jlongArray ckULongArrayToJLongArray(JNIEnv *env, const CK_ULONG_PTR ckpArray, CK_ULONG ckLength); jcharArray ckCharArrayToJCharArray(JNIEnv *env, const CK_CHAR_PTR ckpArray, CK_ULONG length); jcharArray ckUTF8CharArrayToJCharArray(JNIEnv *env, const CK_UTF8CHAR_PTR ckpArray, CK_ULONG ckLength); From 759881b511e9d5417c5f8e0e8c4c987d25f26e03 Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Wed, 22 Jul 2009 18:25:00 -0700 Subject: [PATCH 26/74] 6863216: Clean up debugging debris inadvertently pushed with 6700789 Anti-delta for debugging debris that was inadvertently pushed. Reviewed-by: kvn, tonyp --- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 5 ++--- hotspot/src/share/vm/opto/cfgnode.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index b463b40a7fc..ac236fb2191 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1655,9 +1655,8 @@ void G1CollectedHeap::iterate_dirty_card_closure(bool concurrent, // Computes the sum of the storage used by the various regions. size_t G1CollectedHeap::used() const { - // Temporarily, until 6859911 is fixed. XXX - // assert(Heap_lock->owner() != NULL, - // "Should be owned on this thread's behalf."); + assert(Heap_lock->owner() != NULL, + "Should be owned on this thread's behalf."); size_t result = _summary_bytes_used; // Read only once in case it is set to NULL concurrently HeapRegion* hr = _cur_alloc_region; diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index a81859cf83c..e48c15e7914 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -1789,7 +1789,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { #ifdef _LP64 // Push DecodeN down through phi. // The rest of phi graph will transform by split EncodeP node though phis up. - if (UseNewCode && UseCompressedOops && can_reshape && progress == NULL) { + if (UseCompressedOops && can_reshape && progress == NULL) { bool may_push = true; bool has_decodeN = false; Node* in_decodeN = NULL; From 8440a8dba3b2f7c732b12d8bcaaec3a7c91db207 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Thu, 23 Jul 2009 13:46:23 +0400 Subject: [PATCH 27/74] 6848424: java/awt/Frame/FrameSize/TestFrameSize.java needs improvement The test now thoroughly verifies the pack() method Reviewed-by: art, dcherepanov --- .../awt/Frame/FrameSize/TestFrameSize.java | 74 +++++++++++++------ 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/jdk/test/java/awt/Frame/FrameSize/TestFrameSize.java b/jdk/test/java/awt/Frame/FrameSize/TestFrameSize.java index b220ec5cc01..29a4399a609 100644 --- a/jdk/test/java/awt/Frame/FrameSize/TestFrameSize.java +++ b/jdk/test/java/awt/Frame/FrameSize/TestFrameSize.java @@ -1,5 +1,6 @@ /* * Copyright 2009 Red Hat, Inc. All Rights Reserved. + * Portions Copyright 2009 Sun Microsystems, Inc. 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 @@ -37,35 +38,62 @@ * Test fails if size of window is wrong */ -import java.awt.Dimension; -import java.awt.Frame; +import java.awt.*; public class TestFrameSize { - static Dimension desiredDimensions = new Dimension(200, 200); - static int ERROR_MARGIN = 15; - static Frame mainWindow; + static Dimension desiredDimensions = new Dimension(200, 200); + static Frame mainWindow; - public static void drawGui() { - mainWindow = new Frame(""); - mainWindow.setPreferredSize(desiredDimensions); - mainWindow.pack(); + private static Dimension getClientSize(Frame window) { + Dimension size = window.getSize(); + Insets insets = window.getInsets(); - Dimension actualDimensions = mainWindow.getSize(); - System.out.println("Desired dimensions: " + desiredDimensions.toString()); - System.out.println("Actual dimensions: " + actualDimensions.toString()); - if (Math.abs(actualDimensions.height - desiredDimensions.height) > ERROR_MARGIN) { - throw new RuntimeException("Incorrect widow size"); - } + System.out.println("getClientSize() for " + window); + System.out.println(" size: " + size); + System.out.println(" insets: " + insets); + + return new Dimension( + size.width - insets.left - insets.right, + size.height - insets.top - insets.bottom); + } + + public static void drawGui() { + mainWindow = new Frame(""); + mainWindow.setPreferredSize(desiredDimensions); + mainWindow.pack(); + + Dimension actualDimensions = mainWindow.getSize(); + System.out.println("Desired dimensions: " + desiredDimensions.toString()); + System.out.println("Actual dimensions: " + actualDimensions.toString()); + if (!actualDimensions.equals(desiredDimensions)) { + throw new RuntimeException("Incorrect widow size"); } - public static void main(String[] args) { - try { - drawGui(); - } finally { - if (mainWindow != null) { - mainWindow.dispose(); - } - } + // pack() guarantees to preserve the size of the client area after + // showing the window. + Dimension clientSize1 = getClientSize(mainWindow); + System.out.println("Client size before showing: " + clientSize1); + + mainWindow.setVisible(true); + + ((sun.awt.SunToolkit)Toolkit.getDefaultToolkit()).realSync(); + + Dimension clientSize2 = getClientSize(mainWindow); + System.out.println("Client size after showing: " + clientSize2); + + if (!clientSize2.equals(clientSize1)) { + throw new RuntimeException("Incorrect client area size."); } + } + + public static void main(String[] args) { + try { + drawGui(); + } finally { + if (mainWindow != null) { + mainWindow.dispose(); + } + } + } } From 193cf2ead145d9da98ec0c3fbeb4b06895effee5 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 23 Jul 2009 14:06:51 +0100 Subject: [PATCH 28/74] 6863110: Newly connected/accepted SctpChannel should fire OP_READ if registered with a Selector Reviewed-by: jccollet --- .../classes/sun/nio/ch/SctpChannelImpl.java | 30 +- .../sun/nio/ch/SctpMultiChannelImpl.java | 12 +- .../native/sun/nio/ch/SctpChannelImpl.c | 9 +- .../com/sun/nio/sctp/SctpChannel/CommUp.java | 364 ++++++++++++++++++ .../sun/nio/sctp/SctpMultiChannel/Branch.java | 1 - .../SctpMultiChannel/SocketOptionTests.java | 2 +- 6 files changed, 390 insertions(+), 28 deletions(-) create mode 100644 jdk/test/com/sun/nio/sctp/SctpChannel/CommUp.java diff --git a/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java index 366ccc52cec..d7842570a2c 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java @@ -127,8 +127,6 @@ public class SctpChannelImpl extends SctpChannel /* -- End of fields protected by stateLock -- */ - private SctpResultContainer commUpResultContainer; /* null */ - /** * Constructor for normal connecting sockets */ @@ -761,12 +759,6 @@ public class SctpChannelImpl extends SctpChannel if (!ensureReceiveOpen()) return null; - if (commUpResultContainer != null) { - resultContainer = commUpResultContainer; - commUpResultContainer = null; - continue; - } - int n = 0; try { begin(); @@ -778,7 +770,7 @@ public class SctpChannelImpl extends SctpChannel } do { - n = receive(fdVal, buffer, resultContainer); + n = receive(fdVal, buffer, resultContainer, fromConnect); } while ((n == IOStatus.INTERRUPTED) && isOpen()); } finally { receiverCleanup(); @@ -809,9 +801,9 @@ public class SctpChannelImpl extends SctpChannel if (fromConnect) { /* If we reach here, then it was connect that invoked - * receive an received the COMM_UP. Save it and allow - * the user handler to process it upon next receive. */ - commUpResultContainer = resultContainer; + * receive and received the COMM_UP. We have already + * handled the COMM_UP with the internal notification + * handler. Simply return. */ return null; } } /* receiveLock */ @@ -827,20 +819,21 @@ public class SctpChannelImpl extends SctpChannel private int receive(int fd, ByteBuffer dst, - SctpResultContainer resultContainer) + SctpResultContainer resultContainer, + boolean peek) throws IOException { int pos = dst.position(); int lim = dst.limit(); assert (pos <= lim); int rem = (pos <= lim ? lim - pos : 0); if (dst instanceof DirectBuffer && rem > 0) - return receiveIntoNativeBuffer(fd, resultContainer, dst, rem, pos); + return receiveIntoNativeBuffer(fd, resultContainer, dst, rem, pos, peek); /* Substitute a native buffer */ int newSize = Math.max(rem, 1); ByteBuffer bb = Util.getTemporaryDirectBuffer(newSize); try { - int n = receiveIntoNativeBuffer(fd, resultContainer, bb, newSize, 0); + int n = receiveIntoNativeBuffer(fd, resultContainer, bb, newSize, 0, peek); bb.flip(); if (n > 0 && rem > 0) dst.put(bb); @@ -854,10 +847,11 @@ public class SctpChannelImpl extends SctpChannel SctpResultContainer resultContainer, ByteBuffer bb, int rem, - int pos) + int pos, + boolean peek) throws IOException { - int n = receive0(fd, resultContainer, ((DirectBuffer)bb).address() + pos, rem); + int n = receive0(fd, resultContainer, ((DirectBuffer)bb).address() + pos, rem, peek); if (n > 0) bb.position(pos + n); @@ -1089,7 +1083,7 @@ public class SctpChannelImpl extends SctpChannel private static native void initIDs(); static native int receive0(int fd, SctpResultContainer resultContainer, - long address, int length) throws IOException; + long address, int length, boolean peek) throws IOException; static native int send0(int fd, long address, int length, SocketAddress target, int assocId, int streamNumber, diff --git a/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java index 555ce0e5971..b8457fdba27 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java @@ -31,6 +31,8 @@ import java.net.InetSocketAddress; import java.io.FileDescriptor; import java.io.IOException; import java.util.Collections; +import java.util.Map.Entry; +import java.util.Iterator; import java.util.Set; import java.util.HashSet; import java.util.HashMap; @@ -702,7 +704,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel int assocId = association.associationID(); Set addresses = null; - try { + try { addresses = SctpNet.getRemoteAddresses(fdVal, assocId); } catch (IOException unused) { /* OK, determining connected addresses may not be possible @@ -723,9 +725,11 @@ public class SctpMultiChannelImpl extends SctpMultiChannel /* We cannot determine the connected addresses */ Set> addrAssocs = addressMap.entrySet(); - for (java.util.Map.Entry entry : addrAssocs) { + Iterator> iterator = addrAssocs.iterator(); + while (iterator.hasNext()) { + Entry entry = iterator.next(); if (entry.getValue().equals(association)) { - addressMap.remove(entry.getKey()); + iterator.remove(); } } } @@ -957,7 +961,7 @@ public class SctpMultiChannelImpl extends SctpMultiChannel int length) throws IOException{ return SctpChannelImpl.receive0(fd, resultContainer, address, - length); + length, false /*peek */); } private static int send0(int fd, diff --git a/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c b/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c index 7bb312a6ba5..0cc1b6bf626 100644 --- a/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c +++ b/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c @@ -417,11 +417,11 @@ void handleMessage /* * Class: sun_nio_ch_SctpChannelImpl * Method: receive0 - * Signature: (ILsun/nio/ch/SctpResultContainer;JI)I + * Signature: (ILsun/nio/ch/SctpResultContainer;JIZ)I */ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_receive0 (JNIEnv *env, jclass klass, jint fd, jobject resultContainerObj, - jlong address, jint length) { + jlong address, jint length, jboolean peek) { SOCKADDR sa; int sa_len = sizeof(sa); ssize_t rv = 0; @@ -429,6 +429,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_receive0 struct iovec iov[1]; struct msghdr msg[1]; char cbuf[CMSG_SPACE(sizeof (struct sctp_sndrcvinfo))]; + int flags = peek == JNI_TRUE ? MSG_PEEK : 0; /* Set up the msghdr structure for receiving */ memset(msg, 0, sizeof (*msg)); @@ -443,7 +444,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_receive0 msg->msg_flags = 0; do { - if ((rv = recvmsg(fd, msg, 0)) < 0) { + if ((rv = recvmsg(fd, msg, flags)) < 0) { if (errno == EWOULDBLOCK) { return IOS_UNAVAILABLE; } else if (errno == EINTR) { @@ -473,7 +474,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_SctpChannelImpl_receive0 memcpy(buf, addr, rv); iov->iov_base = buf + rv; iov->iov_len = NOTIFICATION_BUFFER_SIZE - rv; - if ((rv = recvmsg(fd, msg, 0)) < 0) { + if ((rv = recvmsg(fd, msg, flags)) < 0) { handleSocketError(env, errno); return 0; } diff --git a/jdk/test/com/sun/nio/sctp/SctpChannel/CommUp.java b/jdk/test/com/sun/nio/sctp/SctpChannel/CommUp.java new file mode 100644 index 00000000000..ec2e68ac4d2 --- /dev/null +++ b/jdk/test/com/sun/nio/sctp/SctpChannel/CommUp.java @@ -0,0 +1,364 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* @test + * @bug 6863110 + * @summary Newly connected/accepted SctpChannel should fire OP_READ if registered with a Selector + * @author chegar + */ + +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.io.IOException; +import java.util.Iterator; +import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.nio.ByteBuffer; +import java.nio.channels.Selector; +import java.nio.channels.SelectionKey; +import com.sun.nio.sctp.AbstractNotificationHandler; +import com.sun.nio.sctp.AssociationChangeNotification; +import com.sun.nio.sctp.AssociationChangeNotification.AssocChangeEvent; +import com.sun.nio.sctp.HandlerResult; +import com.sun.nio.sctp.Notification; +import com.sun.nio.sctp.SctpChannel; +import com.sun.nio.sctp.SctpServerChannel; +import com.sun.nio.sctp.ShutdownNotification; +import static java.lang.System.out; +import static java.lang.System.err; +import static java.nio.channels.SelectionKey.OP_CONNECT; +import static java.nio.channels.SelectionKey.OP_READ; + +public class CommUp { + static CountDownLatch acceptLatch = new CountDownLatch(1); + static final int TIMEOUT = 10000; + + CommUpNotificationHandler clientHandler = new CommUpNotificationHandler(); + CommUpNotificationHandler serverHandler = new CommUpNotificationHandler(); + CommUpServer server; + Thread clientThread; + + void test(String[] args) { + SocketAddress address = null; + + if (!Util.isSCTPSupported()) { + out.println("SCTP protocol is not supported"); + out.println("Test cannot be run"); + return; + } + + if (args.length == 2) { + /* requested to connecct to a specific address */ + try { + int port = Integer.valueOf(args[1]); + address = new InetSocketAddress(args[0], port); + } catch (NumberFormatException nfe) { + err.println(nfe); + } + } else { + /* start server on local machine, default */ + try { + server = new CommUpServer(); + server.start(); + address = server.address(); + debug("Server started and listening on " + address); + } catch (IOException ioe) { + ioe.printStackTrace(); + return; + } + } + + /* store the main thread so that the server can interrupt it, if necessary */ + clientThread = Thread.currentThread(); + + doClient(address); + } + + void doClient(SocketAddress peerAddress) { + SctpChannel sc = null; + try { + debug("connecting to " + peerAddress); + sc = SctpChannel.open(); + sc.configureBlocking(false); + check(sc.isBlocking() == false, "Should be in non-blocking mode"); + sc.connect(peerAddress); + + Selector selector = Selector.open(); + SelectionKey selectiontKey = sc.register(selector, OP_CONNECT); + + /* Expect two interest Ops */ + boolean opConnectReceived = false; + boolean opReadReceived = false; + for (int z=0; z<2; z++) { + debug("select " + z); + int keysAdded = selector.select(TIMEOUT); + debug("returned " + keysAdded + " keys"); + if (keysAdded > 0) { + Set keys = selector.selectedKeys(); + Iterator i = keys.iterator(); + while(i.hasNext()) { + SelectionKey sk = i.next(); + i.remove(); + SctpChannel readyChannel = + (SctpChannel)sk.channel(); + + /* OP_CONNECT */ + if (sk.isConnectable()) { + /* some trivial checks */ + check(opConnectReceived == false, + "should only received one OP_CONNECT"); + check(opReadReceived == false, + "should not receive OP_READ before OP_CONNECT"); + check(readyChannel.equals(sc), + "channels should be equal"); + check(!sk.isAcceptable(), + "key should not be acceptable"); + check(!sk.isReadable(), + "key should not be readable"); + check(!sk.isWritable(), + "key should not be writable"); + + /* now process the OP_CONNECT */ + opConnectReceived = true; + check((sk.interestOps() & OP_CONNECT) == OP_CONNECT, + "selection key interest ops should contain OP_CONNECT"); + sk.interestOps(OP_READ); + check((sk.interestOps() & OP_CONNECT) != OP_CONNECT, + "selection key interest ops should not contain OP_CONNECT"); + check(sc.finishConnect(), + "finishConnect should return true"); + } /* OP_READ */ + else if (sk.isReadable()) { + /* some trivial checks */ + check(opConnectReceived == true, + "should receive one OP_CONNECT before OP_READ"); + check(opReadReceived == false, + "should not receive OP_READ before OP_CONNECT"); + check(readyChannel.equals(sc), + "channels should be equal"); + check(!sk.isAcceptable(), + "key should not be acceptable"); + check(sk.isReadable(), + "key should be readable"); + check(!sk.isWritable(), + "key should not be writable"); + check(!sk.isConnectable(), + "key should not be connectable"); + + /* now process the OP_READ */ + opReadReceived = true; + selectiontKey.cancel(); + + /* try with small buffer to see if native + * implementation can handle this */ + ByteBuffer buffer = ByteBuffer.allocateDirect(1); + readyChannel.receive(buffer, null, clientHandler); + check(clientHandler.receivedCommUp(), + "Client should have received COMM_UP"); + + /* dont close (or put anything on) the channel until + * we check that the server's accepted channel also + * received COMM_UP */ + serverHandler.waitForCommUp(); + } else { + fail("Unexpected selection key"); + } + } + } else { + fail("Client selector returned 0 ready keys"); + /* stop the server */ + server.thread().interrupt(); + } + } //for + + } catch (IOException ioe) { + unexpected(ioe); + } catch (InterruptedException ie) { + unexpected(ie); + } + } + + class CommUpServer implements Runnable + { + final InetSocketAddress serverAddr; + private SctpServerChannel ssc; + private Thread serverThread; + + public CommUpServer() throws IOException { + ssc = SctpServerChannel.open().bind(null); + java.util.Set addrs = ssc.getAllLocalAddresses(); + if (addrs.isEmpty()) + debug("addrs should not be empty"); + + serverAddr = (InetSocketAddress) addrs.iterator().next(); + } + + void start() { + serverThread = new Thread(this, "CommUpServer-" + + serverAddr.getPort()); + serverThread.start(); + } + + InetSocketAddress address () { + return serverAddr; + } + + Thread thread() { + return serverThread; + } + + @Override + public void run() { + Selector selector = null; + SctpChannel sc = null; + SelectionKey readKey = null; + try { + sc = ssc.accept(); + debug("accepted " + sc); + + selector = Selector.open(); + sc.configureBlocking(false); + check(sc.isBlocking() == false, "Should be in non-blocking mode"); + readKey = sc.register(selector, SelectionKey.OP_READ); + + debug("select"); + int keysAdded = selector.select(TIMEOUT); + debug("returned " + keysAdded + " keys"); + if (keysAdded > 0) { + Set keys = selector.selectedKeys(); + Iterator i = keys.iterator(); + while(i.hasNext()) { + SelectionKey sk = i.next(); + i.remove(); + SctpChannel readyChannel = + (SctpChannel)sk.channel(); + check(readyChannel.equals(sc), + "channels should be equal"); + check(!sk.isAcceptable(), + "key should not be acceptable"); + check(sk.isReadable(), + "key should be readable"); + check(!sk.isWritable(), + "key should not be writable"); + check(!sk.isConnectable(), + "key should not be connectable"); + + /* block until we check if the client has received its COMM_UP*/ + clientHandler.waitForCommUp(); + + ByteBuffer buffer = ByteBuffer.allocateDirect(1); + sc.receive(buffer, null, serverHandler); + check(serverHandler.receivedCommUp(), + "Accepted channel should have received COMM_UP"); + } + } else { + fail("Server selector returned 0 ready keys"); + /* stop the client */ + clientThread.interrupt(); + } + } catch (IOException ioe) { + ioe.printStackTrace(); + } catch (InterruptedException unused) { + } finally { + if (readKey != null) readKey.cancel(); + try { if (selector != null) selector.close(); } + catch (IOException ioe) { unexpected(ioe); } + try { if (ssc != null) ssc.close(); } + catch (IOException ioe) { unexpected(ioe); } + try { if (sc != null) sc.close(); } + catch (IOException ioe) { unexpected(ioe); } + } + } + } + + class CommUpNotificationHandler extends AbstractNotificationHandler + { + private boolean receivedCommUp; // false + + public synchronized boolean receivedCommUp() { + return receivedCommUp; + } + + public synchronized boolean waitForCommUp() throws InterruptedException { + while (receivedCommUp == false) { + wait(); + } + + return false; + } + + @Override + public HandlerResult handleNotification( + Notification notification, Object attachment) { + fail("Unknown notification type"); + return HandlerResult.CONTINUE; + } + + @Override + public synchronized HandlerResult handleNotification( + AssociationChangeNotification notification, Object attachment) { + AssocChangeEvent event = notification.event(); + debug("AssociationChangeNotification"); + debug(" Association: " + notification.association()); + debug(" Event: " + event); + + if (event.equals(AssocChangeEvent.COMM_UP)) { + receivedCommUp = true; + notifyAll(); + } + + return HandlerResult.RETURN; + } + + @Override + public HandlerResult handleNotification( + ShutdownNotification notification, Object attachment) { + debug("ShutdownNotification"); + debug(" Association: " + notification.association()); + return HandlerResult.RETURN; + } + } + + //--------------------- Infrastructure --------------------------- + boolean debug = true; + volatile int passed = 0, failed = 0; + void pass() {passed++;} + void fail() {failed++; Thread.dumpStack();} + void fail(String msg) {err.println(msg); fail();} + void unexpected(Throwable t) {failed++; t.printStackTrace();} + void check(boolean cond) {if (cond) pass(); else fail();} + void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} + void debug(String message) {if(debug) { out.println(Thread.currentThread().getName() + ": " + message); } } + void sleep(long millis) { try { Thread.currentThread().sleep(millis); } + catch(InterruptedException ie) { unexpected(ie); }} + public static void main(String[] args) throws Throwable { + Class k = new Object(){}.getClass().getEnclosingClass(); + try {k.getMethod("instanceMain",String[].class) + .invoke( k.newInstance(), (Object) args);} + catch (Throwable e) {throw e.getCause();}} + public void instanceMain(String[] args) throws Throwable { + try {test(args);} catch (Throwable t) {unexpected(t);} + out.printf("%nPassed = %d, failed = %d%n%n", passed, failed); + if (failed > 0) throw new AssertionError("Some tests failed");} + +} diff --git a/jdk/test/com/sun/nio/sctp/SctpMultiChannel/Branch.java b/jdk/test/com/sun/nio/sctp/SctpMultiChannel/Branch.java index eb75415614f..7db79e341d1 100644 --- a/jdk/test/com/sun/nio/sctp/SctpMultiChannel/Branch.java +++ b/jdk/test/com/sun/nio/sctp/SctpMultiChannel/Branch.java @@ -115,7 +115,6 @@ public class Branch { /* Receive the COMM_UP */ buffer.clear(); BranchNotificationHandler handler = new BranchNotificationHandler(); - channel.configureBlocking(false); info = channel.receive(buffer, null, handler); check(handler.receivedCommUp(), "COMM_UP no received"); Set associations = channel.associations(); diff --git a/jdk/test/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java b/jdk/test/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java index 1495f5399e3..e4292dd2339 100644 --- a/jdk/test/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java +++ b/jdk/test/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java @@ -181,7 +181,6 @@ public class SocketOptionTests { /* Receive the COMM_UP */ buffer.clear(); SOTNotificationHandler handler = new SOTNotificationHandler(); - smc.configureBlocking(false); info = smc.receive(buffer, null, handler); check(handler.receivedCommUp(), "COMM_UP no received"); Set associations = smc.associations(); @@ -220,6 +219,7 @@ public class SocketOptionTests { } check(found, "SCTP_PRIMARY_ADDR returned bogus address!"); + System.out.println("Try SCTP_PRIMARY_ADDR set to: " + addrToSet); smc.setOption(SCTP_PRIMARY_ADDR, addrToSet, assoc); System.out.println("SCTP_PRIMARY_ADDR set to: " + addrToSet); primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); From b1c83646db18c63426a5a81aa8e31bee79ca5d52 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Thu, 23 Jul 2009 11:37:44 -0700 Subject: [PATCH 29/74] 6863814: javap crashes when facing array class literals Reviewed-by: jjg --- .../tools/classfile/ExtendedAnnotation.java | 1 + .../typeAnnotations/ArrayClassLiterals.java | 182 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java index 252754884a2..85e49d6c926 100644 --- a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java +++ b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java @@ -357,6 +357,7 @@ public class ExtendedAnnotation { sb.append(type_index); break; case CLASS_LITERAL: + case CLASS_LITERAL_GENERIC_OR_ARRAY: sb.append(", offset = "); sb.append(offset); break; diff --git a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java new file mode 100644 index 00000000000..ec93fb64aae --- /dev/null +++ b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java @@ -0,0 +1,182 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; +import com.sun.tools.classfile.*; + +/* + * @test ArrayClassLiterals + * @summary test that class literals array doesn't crash javap + */ + +public class ArrayClassLiterals { + public static void main(String[] args) throws Exception { + new ArrayClassLiterals().run(); + } + + public void run() throws Exception { + File javaFile = writeTestFile(); + File classFile = compileTestFile(javaFile); + + ClassFile cf = ClassFile.read(classFile); + test(cf); + for (Field f : cf.fields) { + test(cf, f); + } + for (Method m: cf.methods) { + test(cf, m); + } + + countAnnotations(); + + if (errors > 0) + throw new Exception(errors + " errors found"); + System.out.println("PASSED"); + } + + void test(ClassFile cf) { + test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + void test(ClassFile cf, Method m) { + test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + void test(ClassFile cf, Field m) { + test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); + test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, String name, boolean visible) { + int index = cf.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = cf.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, Method m, String name, boolean visible) { + int index = m.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = m.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + // test the result of Attributes.getIndex according to expectations + // encoded in the method's name + void test(ClassFile cf, Field m, String name, boolean visible) { + int index = m.attributes.getIndex(cf.constant_pool, name); + if (index != -1) { + Attribute attr = m.attributes.get(index); + assert attr instanceof RuntimeTypeAnnotations_attribute; + RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; + all += tAttr.annotations.length; + if (visible) + visibles += tAttr.annotations.length; + else + invisibles += tAttr.annotations.length; + + for (ExtendedAnnotation anno : tAttr.annotations) + anno.position.toString(); + } + } + + File writeTestFile() throws IOException { + File f = new File("Testa.java"); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); + out.println("import java.util.*;"); + out.println("class Testa { "); + out.println(" @interface A { }"); + + out.println(" void test() {"); + out.println(" Object a = @A String.class;"); + out.println(" Object b = @A String @A [] @A [].class;"); + out.println(" }"); + out.println("}"); + + out.close(); + return f; + } + + File compileTestFile(File f) { + int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); + if (rc != 0) + throw new Error("compilation failed. rc=" + rc); + String path = f.getPath(); + return new File(path.substring(0, path.length() - 5) + ".class"); + } + + void countAnnotations() { + int expected_visibles = 0, expected_invisibles = 4; + int expected_all = expected_visibles + expected_invisibles; + + if (expected_all != all) { + errors++; + System.err.println("expected " + expected_all + + " annotations but found " + all); + } + + if (expected_visibles != visibles) { + errors++; + System.err.println("expected " + expected_visibles + + " visibles annotations but found " + visibles); + } + + if (expected_invisibles != invisibles) { + errors++; + System.err.println("expected " + expected_invisibles + + " invisibles annotations but found " + invisibles); + } + + } + + int errors; + int all; + int visibles; + int invisibles; +} From ae71131125c53f70d3469b49bdb72872dd048863 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 23 Jul 2009 14:15:58 -0700 Subject: [PATCH 30/74] 6863914: bug number missing from test Reviewed-by: tbell --- .../test/tools/javap/typeAnnotations/ArrayClassLiterals.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java index ec93fb64aae..f77480f3bb0 100644 --- a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java +++ b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 Sun Microsystems, Inc. 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 @@ -26,6 +26,7 @@ import com.sun.tools.classfile.*; /* * @test ArrayClassLiterals + * @bug 6863814 * @summary test that class literals array doesn't crash javap */ From 8dd34cd52f9869dc2d5cfd1b37eca18f24c2b26f Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 23 Jul 2009 14:53:56 -0700 Subject: [PATCH 31/74] 6860599: nodes limit could be reached during Output phase Bailout compilation if nodes limit could be reached during Output phase. Reviewed-by: never, twisti --- hotspot/src/share/vm/opto/compile.cpp | 63 +++++++++++++++++---------- hotspot/src/share/vm/opto/compile.hpp | 10 +++-- hotspot/src/share/vm/opto/output.cpp | 11 +++-- 3 files changed, 54 insertions(+), 30 deletions(-) diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp index 6b7fd37919e..0db21631f2c 100644 --- a/hotspot/src/share/vm/opto/compile.cpp +++ b/hotspot/src/share/vm/opto/compile.cpp @@ -441,6 +441,8 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr _orig_pc_slot_offset_in_bytes(0), _node_bundling_limit(0), _node_bundling_base(NULL), + _java_calls(0), + _inner_loops(0), #ifndef PRODUCT _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), _printer(IdealGraphPrinter::printer()), @@ -711,6 +713,8 @@ Compile::Compile( ciEnv* ci_env, _code_buffer("Compile::Fill_buffer"), _node_bundling_limit(0), _node_bundling_base(NULL), + _java_calls(0), + _inner_loops(0), #ifndef PRODUCT _trace_opto_output(TraceOptoOutput), _printer(NULL), @@ -1851,22 +1855,26 @@ struct Final_Reshape_Counts : public StackObj { int _float_count; // count float ops requiring 24-bit precision int _double_count; // count double ops requiring more precision int _java_call_count; // count non-inlined 'java' calls + int _inner_loop_count; // count loops which need alignment VectorSet _visited; // Visitation flags Node_List _tests; // Set of IfNodes & PCTableNodes Final_Reshape_Counts() : - _call_count(0), _float_count(0), _double_count(0), _java_call_count(0), + _call_count(0), _float_count(0), _double_count(0), + _java_call_count(0), _inner_loop_count(0), _visited( Thread::current()->resource_area() ) { } void inc_call_count () { _call_count ++; } void inc_float_count () { _float_count ++; } void inc_double_count() { _double_count++; } void inc_java_call_count() { _java_call_count++; } + void inc_inner_loop_count() { _inner_loop_count++; } int get_call_count () const { return _call_count ; } int get_float_count () const { return _float_count ; } int get_double_count() const { return _double_count; } int get_java_call_count() const { return _java_call_count; } + int get_inner_loop_count() const { return _inner_loop_count; } }; static bool oop_offset_is_sane(const TypeInstPtr* tp) { @@ -1878,7 +1886,7 @@ static bool oop_offset_is_sane(const TypeInstPtr* tp) { //------------------------------final_graph_reshaping_impl---------------------- // Implement items 1-5 from final_graph_reshaping below. -static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { +static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) { if ( n->outcnt() == 0 ) return; // dead node uint nop = n->Opcode(); @@ -1920,13 +1928,13 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { case Op_CmpF: case Op_CmpF3: // case Op_ConvL2F: // longs are split into 32-bit halves - fpu.inc_float_count(); + frc.inc_float_count(); break; case Op_ConvF2D: case Op_ConvD2F: - fpu.inc_float_count(); - fpu.inc_double_count(); + frc.inc_float_count(); + frc.inc_double_count(); break; // Count all double operations that may use FPU @@ -1943,7 +1951,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { case Op_ConD: case Op_CmpD: case Op_CmpD3: - fpu.inc_double_count(); + frc.inc_double_count(); break; case Op_Opaque1: // Remove Opaque Nodes before matching case Op_Opaque2: // Remove Opaque Nodes before matching @@ -1952,7 +1960,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { case Op_CallStaticJava: case Op_CallJava: case Op_CallDynamicJava: - fpu.inc_java_call_count(); // Count java call site; + frc.inc_java_call_count(); // Count java call site; case Op_CallRuntime: case Op_CallLeaf: case Op_CallLeafNoFP: { @@ -1963,7 +1971,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { // uncommon_trap, _complete_monitor_locking, _complete_monitor_unlocking, // _new_Java, _new_typeArray, _new_objArray, _rethrow_Java, ... if( !call->is_CallStaticJava() || !call->as_CallStaticJava()->_name ) { - fpu.inc_call_count(); // Count the call site + frc.inc_call_count(); // Count the call site } else { // See if uncommon argument is shared Node *n = call->in(TypeFunc::Parms); int nop = n->Opcode(); @@ -1984,11 +1992,11 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { case Op_StoreD: case Op_LoadD: case Op_LoadD_unaligned: - fpu.inc_double_count(); + frc.inc_double_count(); goto handle_mem; case Op_StoreF: case Op_LoadF: - fpu.inc_float_count(); + frc.inc_float_count(); goto handle_mem; case Op_StoreB: @@ -2325,6 +2333,12 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { n->subsume_by(btp); } break; + case Op_Loop: + case Op_CountedLoop: + if (n->as_Loop()->is_inner_loop()) { + frc.inc_inner_loop_count(); + } + break; default: assert( !n->is_Call(), "" ); assert( !n->is_Mem(), "" ); @@ -2333,17 +2347,17 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) { // Collect CFG split points if (n->is_MultiBranch()) - fpu._tests.push(n); + frc._tests.push(n); } //------------------------------final_graph_reshaping_walk--------------------- // Replacing Opaque nodes with their input in final_graph_reshaping_impl(), // requires that the walk visits a node's inputs before visiting the node. -static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &fpu ) { +static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) { ResourceArea *area = Thread::current()->resource_area(); Unique_Node_List sfpt(area); - fpu._visited.set(root->_idx); // first, mark node as visited + frc._visited.set(root->_idx); // first, mark node as visited uint cnt = root->req(); Node *n = root; uint i = 0; @@ -2352,7 +2366,7 @@ static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Re // Place all non-visited non-null inputs onto stack Node* m = n->in(i); ++i; - if (m != NULL && !fpu._visited.test_set(m->_idx)) { + if (m != NULL && !frc._visited.test_set(m->_idx)) { if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) sfpt.push(m); cnt = m->req(); @@ -2362,7 +2376,7 @@ static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Re } } else { // Now do post-visit work - final_graph_reshaping_impl( n, fpu ); + final_graph_reshaping_impl( n, frc ); if (nstack.is_empty()) break; // finished n = nstack.node(); // Get node from stack @@ -2443,16 +2457,16 @@ bool Compile::final_graph_reshaping() { return true; } - Final_Reshape_Counts fpu; + Final_Reshape_Counts frc; // Visit everybody reachable! // Allocate stack of size C->unique()/2 to avoid frequent realloc Node_Stack nstack(unique() >> 1); - final_graph_reshaping_walk(nstack, root(), fpu); + final_graph_reshaping_walk(nstack, root(), frc); // Check for unreachable (from below) code (i.e., infinite loops). - for( uint i = 0; i < fpu._tests.size(); i++ ) { - MultiBranchNode *n = fpu._tests[i]->as_MultiBranch(); + for( uint i = 0; i < frc._tests.size(); i++ ) { + MultiBranchNode *n = frc._tests[i]->as_MultiBranch(); // Get number of CFG targets. // Note that PCTables include exception targets after calls. uint required_outcnt = n->required_outcnt(); @@ -2498,7 +2512,7 @@ bool Compile::final_graph_reshaping() { // Check that I actually visited all kids. Unreached kids // must be infinite loops. for (DUIterator_Fast jmax, j = n->fast_outs(jmax); j < jmax; j++) - if (!fpu._visited.test(n->fast_out(j)->_idx)) { + if (!frc._visited.test(n->fast_out(j)->_idx)) { record_method_not_compilable("infinite loop"); return true; // Found unvisited kid; must be unreach } @@ -2507,13 +2521,14 @@ bool Compile::final_graph_reshaping() { // If original bytecodes contained a mixture of floats and doubles // check if the optimizer has made it homogenous, item (3). if( Use24BitFPMode && Use24BitFP && - fpu.get_float_count() > 32 && - fpu.get_double_count() == 0 && - (10 * fpu.get_call_count() < fpu.get_float_count()) ) { + frc.get_float_count() > 32 && + frc.get_double_count() == 0 && + (10 * frc.get_call_count() < frc.get_float_count()) ) { set_24_bit_selection_and_mode( false, true ); } - set_has_java_calls(fpu.get_java_call_count() > 0); + set_java_calls(frc.get_java_call_count()); + set_inner_loops(frc.get_inner_loop_count()); // No infinite loops, no reason to bail out. return false; diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp index dcd6813a893..bad984ff65d 100644 --- a/hotspot/src/share/vm/opto/compile.hpp +++ b/hotspot/src/share/vm/opto/compile.hpp @@ -223,7 +223,8 @@ class Compile : public Phase { PhaseCFG* _cfg; // Results of CFG finding bool _select_24_bit_instr; // We selected an instruction with a 24-bit result bool _in_24_bit_fp_mode; // We are emitting instructions with 24-bit results - bool _has_java_calls; // True if the method has java calls + int _java_calls; // Number of java calls in the method + int _inner_loops; // Number of inner loops in the method Matcher* _matcher; // Engine to map ideal to machine instructions PhaseRegAlloc* _regalloc; // Results of register allocation. int _frame_slots; // Size of total frame in stack slots @@ -505,7 +506,9 @@ class Compile : public Phase { PhaseCFG* cfg() { return _cfg; } bool select_24_bit_instr() const { return _select_24_bit_instr; } bool in_24_bit_fp_mode() const { return _in_24_bit_fp_mode; } - bool has_java_calls() const { return _has_java_calls; } + bool has_java_calls() const { return _java_calls > 0; } + int java_calls() const { return _java_calls; } + int inner_loops() const { return _inner_loops; } Matcher* matcher() { return _matcher; } PhaseRegAlloc* regalloc() { return _regalloc; } int frame_slots() const { return _frame_slots; } @@ -532,7 +535,8 @@ class Compile : public Phase { _in_24_bit_fp_mode = mode; } - void set_has_java_calls(bool z) { _has_java_calls = z; } + void set_java_calls(int z) { _java_calls = z; } + void set_inner_loops(int z) { _inner_loops = z; } // Instruction bits passed off to the VM int code_size() { return _method_size; } diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp index 3c8af599142..1bc5361c7a1 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -50,6 +50,13 @@ void Compile::Output() { init_scratch_buffer_blob(); if (failing()) return; // Out of memory + // The number of new nodes (mostly MachNop) is proportional to + // the number of java calls and inner loops which are aligned. + if ( C->check_node_count((NodeLimitFudgeFactor + C->java_calls()*3 + + C->inner_loops()*(OptoLoopAlignment-1)), + "out of nodes before code generation" ) ) { + return; + } // Make sure I can find the Start Node Block_Array& bbs = _cfg->_bbs; Block *entry = _cfg->_blocks[1]; @@ -1105,7 +1112,7 @@ void Compile::Fill_buffer() { uint *call_returns = NEW_RESOURCE_ARRAY(uint, _cfg->_num_blocks+1); uint return_offset = 0; - MachNode *nop = new (this) MachNopNode(); + int nop_size = (new (this) MachNopNode())->size(_regalloc); int previous_offset = 0; int current_offset = 0; @@ -1188,7 +1195,6 @@ void Compile::Fill_buffer() { } // align the instruction if necessary - int nop_size = nop->size(_regalloc); int padding = mach->compute_padding(current_offset); // Make sure safepoint node for polling is distinct from a call's // return by adding a nop if needed. @@ -1372,7 +1378,6 @@ void Compile::Fill_buffer() { // If the next block is the top of a loop, pad this block out to align // the loop top a little. Helps prevent pipe stalls at loop back branches. - int nop_size = (new (this) MachNopNode())->size(_regalloc); if( i<_cfg->_num_blocks-1 ) { Block *nb = _cfg->_blocks[i+1]; uint padding = nb->alignment_padding(current_offset); From 608d9bf61e7052fb4146d7b0b1d298e90acb72d3 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:46 -0700 Subject: [PATCH 32/74] Added tag jdk7-b66 for changeset 3e00e9de363a --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 3b501dece9d..6681557af03 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -40,3 +40,4 @@ c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62 57f7e028c7ad1806500ae89eb3f4cd9a51b10e18 jdk7-b63 269c1ec4435dfb7b452ae6e3bdde005d55c5c830 jdk7-b64 e01380cd1de4ce048b87d059d238e5ab5e341947 jdk7-b65 +6bad5e3fe50337d95b1416d744780d65bc570da6 jdk7-b66 From b0029d3ebcc276e14b69cd30864107835692c8ff Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:48 -0700 Subject: [PATCH 33/74] Added tag jdk7-b66 for changeset ec9f33978e19 --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index e9712d235d3..55f6338adba 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -40,3 +40,4 @@ e906b16a12a9a63b615898afa5d9673cbd1c5ab8 jdk7-b61 d20e45cd539f20405ff843652069cfd7550c5ab3 jdk7-b63 047dd27fddb607f8135296b3754131f6e13cb8c7 jdk7-b64 97fd9b42f5c2d342b90d18f0a2b57e4117e39415 jdk7-b65 +a821e059a961bcb02830280d51f6dd030425c066 jdk7-b66 From 7084283bfa35806a2dfa30240ef5167f2bdf5572 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:51 -0700 Subject: [PATCH 34/74] Added tag jdk7-b66 for changeset f367b7c24c74 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 82f00b1c160..e805fe0c0aa 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -40,3 +40,4 @@ a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62 32c83fb84370a35344676991a48440378e6b6c8a jdk7-b63 ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64 ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65 +57c71ad0341b8b64ed20f81151eb7f06324f8894 jdk7-b66 From 7548a15ae9b0e27629f86a27081ec8592b408c0d Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:56 -0700 Subject: [PATCH 35/74] Added tag jdk7-b66 for changeset fe07d1599221 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 2713e5f9d70..9b724960f39 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -40,3 +40,4 @@ a97dd57a62604c35c79bc2fa77a612ed547f6135 jdk7-b62 ae449e9c04c1fe651bd30f0f4d4cc24ba794e0c4 jdk7-b63 a10eec7a1edf536f39b5828d8623054dbc62c2b7 jdk7-b64 008c662e0ee9a91aebb75e46b97de979083d5c1c jdk7-b65 +22f9d5d5b5fe0f47048f41e6c6e54fee5edad0ec jdk7-b66 From fd6571fe2e59f12464c5d7ab12775f91c7d30f4f Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:58 -0700 Subject: [PATCH 36/74] Added tag jdk7-b66 for changeset 0d64f3a8ed0b --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index d85a9e3d5f0..a5dc8fecee0 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -40,3 +40,4 @@ aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61 b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63 aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64 aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65 +fa8712c099edd5c9a6b3ed9729353738004d388f jdk7-b66 From c3a06b2ebe4ffa9111f601fe4549d374e5fbee13 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:40:15 -0700 Subject: [PATCH 37/74] Added tag jdk7-b66 for changeset dc62947a6e47 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 4d03a266a98..23d21f876dc 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -40,3 +40,4 @@ dbdeb4a7581b2a8699644b91cae6793cb01953f7 jdk7-b53 5c2c8112055565b4980b6756e001e45eb7b88d6e jdk7-b63 d8f23a81d46f47a4186f1044dd9e44841bbeab84 jdk7-b64 7e0056ded28c802609d2bd79bfcda551d72a3fec jdk7-b65 +634f519d6f9a602b16bba1c7cd4a17242a8f6889 jdk7-b66 From 604fce4d26065e49f6d997eba6b88273a7854066 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Fri, 24 Jul 2009 14:47:01 -0700 Subject: [PATCH 38/74] 6863746: javap should not scan ct.sym by default Reviewed-by: mcimadamore --- .../com/sun/tools/javap/JavapFileManager.java | 1 + .../com/sun/tools/javap/JavapTask.java | 9 ---- .../classes/com/sun/tools/javap/Options.java | 1 - langtools/test/tools/javap/T6863746.java | 52 +++++++++++++++++++ 4 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 langtools/test/tools/javap/T6863746.java diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java index 2a9e87e0476..85c40921e85 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java @@ -44,6 +44,7 @@ import com.sun.tools.javac.util.Context; class JavapFileManager extends JavacFileManager { private JavapFileManager(Context context, Charset charset) { super(context, true, charset); + setIgnoreSymbolFile(true); } static JavapFileManager create(final DiagnosticListener dl, PrintWriter log, Options options) { diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java index 77e88b79ab3..285f1b48347 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java +++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java @@ -235,12 +235,6 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { } }, - new Option(false, "-XDignore.symbol.file") { - void process(JavapTask task, String opt, String arg) { - task.options.ignoreSymbolFile = true; - } - }, - new Option(false, "-XDdetails") { void process(JavapTask task, String opt, String arg) { task.options.details = EnumSet.allOf(InstructionDetailWriter.Kind.class); @@ -477,9 +471,6 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages { throw new BadArgs("err.incompatible.options", sb); } - if (options.ignoreSymbolFile && fileManager instanceof JavapFileManager) - ((JavapFileManager) fileManager).setIgnoreSymbolFile(true); - if ((classes == null || classes.size() == 0) && !(noArgs || options.help || options.version || options.fullVersion)) { throw new BadArgs("err.no.classes.specified"); diff --git a/langtools/src/share/classes/com/sun/tools/javap/Options.java b/langtools/src/share/classes/com/sun/tools/javap/Options.java index ee70afa8a50..70f76060ebc 100644 --- a/langtools/src/share/classes/com/sun/tools/javap/Options.java +++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java @@ -88,5 +88,4 @@ public class Options { public boolean compat; // bug-for-bug compatibility mode with old javap public boolean jsr277; - public boolean ignoreSymbolFile; // file manager should ignore ct.sym } diff --git a/langtools/test/tools/javap/T6863746.java b/langtools/test/tools/javap/T6863746.java new file mode 100644 index 00000000000..cceaf0dc3be --- /dev/null +++ b/langtools/test/tools/javap/T6863746.java @@ -0,0 +1,52 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.io.*; + +/* + * @test + * @bug 6863746 + * @summary javap should not scan ct.sym by default + */ + +public class T6863746 { + public static void main(String... args) throws Exception{ + new T6863746().run(); + } + + public void run() throws Exception { + String[] args = { "-c", "java.lang.Object" }; + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + int rc = com.sun.tools.javap.Main.run(args, pw); + pw.close(); + String out = sw.toString(); + System.out.println(out); + String[] lines = out.split("\n"); + // If ct.sym is being read, the output does not include + // Code attributes, so check for Code attributes as a + // way of detecting that ct.sym is not being used. + if (lines.length < 50 || out.indexOf("Code:") == -1) + throw new Exception("unexpected output from javap"); + } +} From d911e41fe74afe7336154bbcc105bfb4b9d3f15b Mon Sep 17 00:00:00 2001 From: Erik Trimble Date: Fri, 24 Jul 2009 16:41:16 -0700 Subject: [PATCH 39/74] 6864901: Bump the HS16 build number to 07 Update the HS16 build number to 07 Reviewed-by: jcoomes --- hotspot/make/hotspot_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index cdac48030fa..bbcda0a80e3 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009 HS_MAJOR_VER=16 HS_MINOR_VER=0 -HS_BUILD_NUMBER=06 +HS_BUILD_NUMBER=07 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 From 7ac7d3079f6ef6bad2cbab109c8aa72f61d9c3d5 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Fri, 24 Jul 2009 18:16:14 -0700 Subject: [PATCH 40/74] 6639443: Character.toCodePoint and Character.toSurrogates can be optimized Rearranging code saves 5 bytes of bytecode Reviewed-by: sherman --- jdk/src/share/classes/java/lang/Character.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/classes/java/lang/Character.java b/jdk/src/share/classes/java/lang/Character.java index 9b9c938fa1e..f20f8e3d3b9 100644 --- a/jdk/src/share/classes/java/lang/Character.java +++ b/jdk/src/share/classes/java/lang/Character.java @@ -2784,8 +2784,13 @@ class Character extends Object implements java.io.Serializable, Comparable>> 10) + MIN_HIGH_SURROGATE); + // We write elements "backwards" to guarantee all-or-nothing + dst[index+1] = (char)((codePoint & 0x3ff) + MIN_LOW_SURROGATE); + dst[index] = (char)((codePoint >>> 10) + + (MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT >>> 10))); } /** From 4d07a8cfb952e8551c46f5fd489a032c72483391 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Fri, 24 Jul 2009 18:24:02 -0700 Subject: [PATCH 41/74] 6639458: Improvements to Surrogate.java Optimize Surrogate.java Reviewed-by: sherman --- .../share/classes/sun/nio/cs/Surrogate.java | 92 +++++++++---------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/jdk/src/share/classes/sun/nio/cs/Surrogate.java b/jdk/src/share/classes/sun/nio/cs/Surrogate.java index 369af3a96eb..9e036c8fd09 100644 --- a/jdk/src/share/classes/sun/nio/cs/Surrogate.java +++ b/jdk/src/share/classes/sun/nio/cs/Surrogate.java @@ -30,7 +30,6 @@ import java.nio.charset.CoderResult; import java.nio.charset.MalformedInputException; import java.nio.charset.UnmappableCharacterException; - /** * Utility class for dealing with surrogates. * @@ -41,19 +40,15 @@ public class Surrogate { private Surrogate() { } - // UTF-16 surrogate-character ranges - // - public static final char MIN_HIGH = '\uD800'; - public static final char MAX_HIGH = '\uDBFF'; - public static final char MIN_LOW = '\uDC00'; - public static final char MAX_LOW = '\uDFFF'; - public static final char MIN = MIN_HIGH; - public static final char MAX = MAX_LOW; - - // Range of UCS-4 values that need surrogates in UTF-16 - // - public static final int UCS4_MIN = 0x10000; - public static final int UCS4_MAX = (1 << 20) + UCS4_MIN - 1; + // TODO: Deprecate/remove the following redundant definitions + public static final char MIN_HIGH = Character.MIN_HIGH_SURROGATE; + public static final char MAX_HIGH = Character.MAX_HIGH_SURROGATE; + public static final char MIN_LOW = Character.MIN_LOW_SURROGATE; + public static final char MAX_LOW = Character.MAX_LOW_SURROGATE; + public static final char MIN = Character.MIN_SURROGATE; + public static final char MAX = Character.MAX_SURROGATE; + public static final int UCS4_MIN = Character.MIN_SUPPLEMENTARY_CODE_POINT; + public static final int UCS4_MAX = Character.MAX_CODE_POINT; /** * Tells whether or not the given UTF-16 value is a high surrogate. @@ -76,36 +71,46 @@ public class Surrogate { return (MIN <= c) && (c <= MAX); } + /** + * Tells whether or not the given UCS-4 character is in the Basic + * Multilingual Plane, and can be represented using a single char. + */ + public static boolean isBMP(int uc) { + return (int) (char) uc == uc; + } + /** * Tells whether or not the given UCS-4 character must be represented as a * surrogate pair in UTF-16. */ public static boolean neededFor(int uc) { - return (uc >= UCS4_MIN) && (uc <= UCS4_MAX); + return Character.isSupplementaryCodePoint(uc); } /** * Returns the high UTF-16 surrogate for the given UCS-4 character. */ public static char high(int uc) { - assert neededFor(uc); - return (char)(0xd800 | (((uc - UCS4_MIN) >> 10) & 0x3ff)); + assert Character.isSupplementaryCodePoint(uc); + return (char)((uc >> 10) + + (Character.MIN_HIGH_SURROGATE + - (Character.MIN_SUPPLEMENTARY_CODE_POINT >> 10))); } /** * Returns the low UTF-16 surrogate for the given UCS-4 character. */ public static char low(int uc) { - assert neededFor(uc); - return (char)(0xdc00 | ((uc - UCS4_MIN) & 0x3ff)); + assert Character.isSupplementaryCodePoint(uc); + return (char)((uc & 0x3ff) + Character.MIN_LOW_SURROGATE); } /** * Converts the given surrogate pair into a 32-bit UCS-4 character. */ public static int toUCS4(char c, char d) { - assert isHigh(c) && isLow(d); - return (((c & 0x3ff) << 10) | (d & 0x3ff)) + 0x10000; + assert Character.isHighSurrogate(c) && Character.isLowSurrogate(d); + return Character.toCodePoint(c, d); } /** @@ -178,14 +183,14 @@ public class Surrogate { * object */ public int parse(char c, CharBuffer in) { - if (Surrogate.isHigh(c)) { + if (Character.isHighSurrogate(c)) { if (!in.hasRemaining()) { error = CoderResult.UNDERFLOW; return -1; } char d = in.get(); - if (Surrogate.isLow(d)) { - character = toUCS4(c, d); + if (Character.isLowSurrogate(d)) { + character = Character.toCodePoint(c, d); isPair = true; error = null; return character; @@ -193,7 +198,7 @@ public class Surrogate { error = CoderResult.malformedForLength(1); return -1; } - if (Surrogate.isLow(c)) { + if (Character.isLowSurrogate(c)) { error = CoderResult.malformedForLength(1); return -1; } @@ -220,14 +225,14 @@ public class Surrogate { */ public int parse(char c, char[] ia, int ip, int il) { assert (ia[ip] == c); - if (Surrogate.isHigh(c)) { + if (Character.isHighSurrogate(c)) { if (il - ip < 2) { error = CoderResult.UNDERFLOW; return -1; } char d = ia[ip + 1]; - if (Surrogate.isLow(d)) { - character = toUCS4(c, d); + if (Character.isLowSurrogate(d)) { + character = Character.toCodePoint(c, d); isPair = true; error = null; return character; @@ -235,7 +240,7 @@ public class Surrogate { error = CoderResult.malformedForLength(1); return -1; } - if (Surrogate.isLow(c)) { + if (Character.isLowSurrogate(c)) { error = CoderResult.malformedForLength(1); return -1; } @@ -282,7 +287,7 @@ public class Surrogate { * error() will return a descriptive result object */ public int generate(int uc, int len, CharBuffer dst) { - if (uc <= 0xffff) { + if (Surrogate.isBMP(uc)) { if (Surrogate.is(uc)) { error = CoderResult.malformedForLength(len); return -1; @@ -294,12 +299,7 @@ public class Surrogate { dst.put((char)uc); error = null; return 1; - } - if (uc < Surrogate.UCS4_MIN) { - error = CoderResult.malformedForLength(len); - return -1; - } - if (uc <= Surrogate.UCS4_MAX) { + } else if (Character.isSupplementaryCodePoint(uc)) { if (dst.remaining() < 2) { error = CoderResult.OVERFLOW; return -1; @@ -308,9 +308,10 @@ public class Surrogate { dst.put(Surrogate.low(uc)); error = null; return 2; + } else { + error = CoderResult.unmappableForLength(len); + return -1; } - error = CoderResult.unmappableForLength(len); - return -1; } /** @@ -330,7 +331,7 @@ public class Surrogate { * error() will return a descriptive result object */ public int generate(int uc, int len, char[] da, int dp, int dl) { - if (uc <= 0xffff) { + if (Surrogate.isBMP(uc)) { if (Surrogate.is(uc)) { error = CoderResult.malformedForLength(len); return -1; @@ -342,12 +343,7 @@ public class Surrogate { da[dp] = (char)uc; error = null; return 1; - } - if (uc < Surrogate.UCS4_MIN) { - error = CoderResult.malformedForLength(len); - return -1; - } - if (uc <= Surrogate.UCS4_MAX) { + } else if (Character.isSupplementaryCodePoint(uc)) { if (dl - dp < 2) { error = CoderResult.OVERFLOW; return -1; @@ -356,11 +352,11 @@ public class Surrogate { da[dp + 1] = Surrogate.low(uc); error = null; return 2; + } else { + error = CoderResult.unmappableForLength(len); + return -1; } - error = CoderResult.unmappableForLength(len); - return -1; } - } } From 55dc8eb040a6a08b64747f49ab40505b89bbf9db Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Sun, 26 Jul 2009 21:27:11 -0700 Subject: [PATCH 42/74] 6381698: Warn of decommissioning of apt Reviewed-by: jjg --- langtools/make/build.properties | 2 +- .../sun/mirror/apt/AnnotationProcessor.java | 8 +++- .../apt/AnnotationProcessorEnvironment.java | 9 +++- .../apt/AnnotationProcessorFactory.java | 8 +++- .../apt/AnnotationProcessorListener.java | 7 +++ .../sun/mirror/apt/AnnotationProcessors.java | 6 +++ .../classes/com/sun/mirror/apt/Filer.java | 14 +++++- .../classes/com/sun/mirror/apt/Messager.java | 10 +++-- .../sun/mirror/apt/RoundCompleteEvent.java | 7 +++ .../sun/mirror/apt/RoundCompleteListener.java | 7 +++ .../com/sun/mirror/apt/RoundState.java | 7 +++ .../com/sun/mirror/apt/package-info.java | 38 ++++++++++++++++ .../classes/com/sun/mirror/apt/package.html | 42 ------------------ .../mirror/declaration/AnnotationMirror.java | 8 +++- .../AnnotationTypeDeclaration.java | 8 +++- .../AnnotationTypeElementDeclaration.java | 8 +++- .../mirror/declaration/AnnotationValue.java | 8 +++- .../mirror/declaration/ClassDeclaration.java | 8 +++- .../declaration/ConstructorDeclaration.java | 8 +++- .../sun/mirror/declaration/Declaration.java | 8 +++- .../declaration/EnumConstantDeclaration.java | 8 +++- .../mirror/declaration/EnumDeclaration.java | 8 +++- .../declaration/ExecutableDeclaration.java | 8 +++- .../mirror/declaration/FieldDeclaration.java | 8 +++- .../declaration/InterfaceDeclaration.java | 8 +++- .../mirror/declaration/MemberDeclaration.java | 8 +++- .../mirror/declaration/MethodDeclaration.java | 8 +++- .../com/sun/mirror/declaration/Modifier.java | 7 ++- .../declaration/PackageDeclaration.java | 8 +++- .../declaration/ParameterDeclaration.java | 8 +++- .../mirror/declaration/TypeDeclaration.java | 8 +++- .../declaration/TypeParameterDeclaration.java | 8 +++- .../sun/mirror/declaration/package-info.java | 40 +++++++++++++++++ .../com/sun/mirror/declaration/package.html | 44 ------------------- .../com/sun/mirror/type/AnnotationType.java | 8 +++- .../com/sun/mirror/type/ArrayType.java | 8 +++- .../com/sun/mirror/type/ClassType.java | 8 +++- .../com/sun/mirror/type/DeclaredType.java | 8 +++- .../classes/com/sun/mirror/type/EnumType.java | 8 +++- .../com/sun/mirror/type/InterfaceType.java | 8 +++- .../mirror/type/MirroredTypeException.java | 7 +++ .../mirror/type/MirroredTypesException.java | 7 +++ .../com/sun/mirror/type/PrimitiveType.java | 14 +++++- .../com/sun/mirror/type/ReferenceType.java | 8 +++- .../com/sun/mirror/type/TypeMirror.java | 8 +++- .../com/sun/mirror/type/TypeVariable.java | 8 +++- .../classes/com/sun/mirror/type/VoidType.java | 8 +++- .../com/sun/mirror/type/WildcardType.java | 8 +++- .../com/sun/mirror/type/package-info.java | 37 ++++++++++++++++ .../classes/com/sun/mirror/type/package.html | 42 ------------------ .../sun/mirror/util/DeclarationFilter.java | 8 +++- .../sun/mirror/util/DeclarationScanner.java | 8 +++- .../sun/mirror/util/DeclarationVisitor.java | 8 +++- .../sun/mirror/util/DeclarationVisitors.java | 7 +++ .../com/sun/mirror/util/Declarations.java | 8 +++- .../mirror/util/SimpleDeclarationVisitor.java | 8 +++- .../sun/mirror/util/SimpleTypeVisitor.java | 8 +++- .../mirror/util/SourceOrderDeclScanner.java | 7 +++ .../com/sun/mirror/util/SourcePosition.java | 11 ++++- .../com/sun/mirror/util/TypeVisitor.java | 8 +++- .../classes/com/sun/mirror/util/Types.java | 8 +++- .../com/sun/mirror/util/package-info.java | 37 ++++++++++++++++ .../classes/com/sun/mirror/util/package.html | 42 ------------------ .../classes/com/sun/tools/apt/comp/Apt.java | 1 + .../com/sun/tools/apt/comp/BootstrapAPF.java | 1 + .../com/sun/tools/apt/comp/PrintAP.java | 1 + .../com/sun/tools/apt/main/JavaCompiler.java | 1 + .../classes/com/sun/tools/apt/main/Main.java | 7 ++- .../com/sun/tools/apt/mirror/AptEnv.java | 2 +- .../AnnotationProcessorEnvironmentImpl.java | 1 + .../sun/tools/apt/mirror/apt/FilerImpl.java | 2 +- .../tools/apt/mirror/apt/MessagerImpl.java | 2 +- .../mirror/apt/RoundCompleteEventImpl.java | 1 + .../tools/apt/mirror/apt/RoundStateImpl.java | 1 + .../declaration/AnnotationMirrorImpl.java | 2 +- .../declaration/AnnotationProxyMaker.java | 2 +- .../AnnotationTypeDeclarationImpl.java | 2 +- .../AnnotationTypeElementDeclarationImpl.java | 2 +- .../declaration/AnnotationValueImpl.java | 2 +- .../declaration/ClassDeclarationImpl.java | 2 +- .../apt/mirror/declaration/Constants.java | 1 + .../ConstructorDeclarationImpl.java | 2 +- .../mirror/declaration/DeclarationImpl.java | 2 +- .../mirror/declaration/DeclarationMaker.java | 2 +- .../EnumConstantDeclarationImpl.java | 2 +- .../declaration/EnumDeclarationImpl.java | 2 +- .../ExecutableDeclarationImpl.java | 2 +- .../declaration/FieldDeclarationImpl.java | 2 +- .../declaration/InterfaceDeclarationImpl.java | 2 +- .../declaration/MemberDeclarationImpl.java | 2 +- .../declaration/MethodDeclarationImpl.java | 2 +- .../declaration/PackageDeclarationImpl.java | 2 +- .../declaration/ParameterDeclarationImpl.java | 2 +- .../declaration/TypeDeclarationImpl.java | 2 +- .../TypeParameterDeclarationImpl.java | 2 +- .../apt/mirror/type/AnnotationTypeImpl.java | 2 +- .../tools/apt/mirror/type/ArrayTypeImpl.java | 2 +- .../tools/apt/mirror/type/ClassTypeImpl.java | 2 +- .../apt/mirror/type/DeclaredTypeImpl.java | 2 +- .../tools/apt/mirror/type/EnumTypeImpl.java | 2 +- .../apt/mirror/type/InterfaceTypeImpl.java | 2 +- .../apt/mirror/type/PrimitiveTypeImpl.java | 2 +- .../sun/tools/apt/mirror/type/TypeMaker.java | 2 +- .../tools/apt/mirror/type/TypeMirrorImpl.java | 2 +- .../apt/mirror/type/TypeVariableImpl.java | 2 +- .../tools/apt/mirror/type/VoidTypeImpl.java | 2 +- .../apt/mirror/type/WildcardTypeImpl.java | 2 +- .../apt/mirror/util/DeclarationsImpl.java | 2 +- .../apt/mirror/util/SourcePositionImpl.java | 2 +- .../sun/tools/apt/mirror/util/TypesImpl.java | 2 +- .../sun/tools/apt/resources/apt.properties | 8 ++++ langtools/test/tools/apt/Basics/apt.sh | 3 +- langtools/test/tools/apt/Compile/compile.sh | 2 +- 113 files changed, 607 insertions(+), 260 deletions(-) create mode 100644 langtools/src/share/classes/com/sun/mirror/apt/package-info.java delete mode 100644 langtools/src/share/classes/com/sun/mirror/apt/package.html create mode 100644 langtools/src/share/classes/com/sun/mirror/declaration/package-info.java delete mode 100644 langtools/src/share/classes/com/sun/mirror/declaration/package.html create mode 100644 langtools/src/share/classes/com/sun/mirror/type/package-info.java delete mode 100644 langtools/src/share/classes/com/sun/mirror/type/package.html create mode 100644 langtools/src/share/classes/com/sun/mirror/util/package-info.java delete mode 100644 langtools/src/share/classes/com/sun/mirror/util/package.html diff --git a/langtools/make/build.properties b/langtools/make/build.properties index 52df7e9acd0..53dd569ebd6 100644 --- a/langtools/make/build.properties +++ b/langtools/make/build.properties @@ -68,7 +68,7 @@ javac.no.jdk.warnings = -XDignore.symbol.file=true # set the following to -version to verify the versions of javac being used javac.version.opt = # in time, there should be no exceptions to -Xlint:all -javac.lint.opts = -Xlint:all -Werror +javac.lint.opts = -Xlint:all,-deprecation -Werror # options for the task for javac javadoc.jls3.url=http://java.sun.com/docs/books/jls/ diff --git a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java index 591793d8e0a..5175fd2fcaa 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessor.java @@ -50,11 +50,17 @@ import java.util.Collection; * annotations of those types. It may freely examine any other program * elements in the course of its processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Processor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessor { /** diff --git a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java index bdd8277da88..0cd7db8770d 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorEnvironment.java @@ -48,11 +48,17 @@ import com.sun.mirror.util.*; * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.ProcessingEnvironment}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorEnvironment { /** @@ -87,7 +93,6 @@ public interface AnnotationProcessorEnvironment { Filer getFiler(); - /** * Returns the declarations of the types specified when the * annotation processing tool was invoked. diff --git a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java index a2169b1117c..b2b700635b6 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorFactory.java @@ -42,11 +42,17 @@ import com.sun.mirror.declaration.AnnotationTypeDeclaration; * must provide a public no-argument constructor to be used by tools to * instantiate the factory. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Processor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorFactory { /** diff --git a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java index 89b1e82a168..3c040e6be22 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessorListener.java @@ -28,8 +28,15 @@ package com.sun.mirror.apt; /** * Superinterface for all annotation processor event listeners. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This interface has no + * direct analog in the standardized API because the different round + * model renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationProcessorListener extends java.util.EventListener {} diff --git a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java index c3e8f9496e2..19885c315fa 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/AnnotationProcessors.java @@ -31,10 +31,16 @@ import java.util.*; /** * Utilities to create specialized annotation processors. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct analog + * of the functionality of this class in the standardized API. + * * @since 1.5 * @author Joseph D. Darcy * @author Scott Seligman */ +@Deprecated +@SuppressWarnings("deprecation") public class AnnotationProcessors { static class NoOpAP implements AnnotationProcessor { NoOpAP() {} diff --git a/langtools/src/share/classes/com/sun/mirror/apt/Filer.java b/langtools/src/share/classes/com/sun/mirror/apt/Filer.java index 4053a0e0dc6..e85bcda6d3b 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/Filer.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/Filer.java @@ -51,11 +51,17 @@ import java.io.*; * be deleted. Any subsequent attempt to create the same file during * a run will fail. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Filer}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Filer { /** @@ -140,7 +146,13 @@ public interface Filer { /** * Locations (subtrees within the file system) where new files are created. + * + * @deprecated All components of this API have been superseded by + * the standardized annotation processing API. The replacement + * for the functionality of this enum is {@link + * javax.tools.StandardLocation}. */ + @Deprecated enum Location { /** The location of new source files. */ SOURCE_TREE, diff --git a/langtools/src/share/classes/com/sun/mirror/apt/Messager.java b/langtools/src/share/classes/com/sun/mirror/apt/Messager.java index 37ab26ae2f2..e25e352436c 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/Messager.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/Messager.java @@ -25,20 +25,24 @@ package com.sun.mirror.apt; - import com.sun.mirror.util.SourcePosition; - /** * A Messager provides the way for * an annotation processor to report error messages, warnings, and * other notices. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.Messager}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Messager { /** diff --git a/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java b/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java index a163b9d3f1a..aa94151a0ab 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteEvent.java @@ -32,10 +32,17 @@ package com.sun.mirror.apt; * cannot meaningfully be serialized because all of the annotation * processing tool's internal state would potentially be needed. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This class has no direct + * analog in the standardized API because the different round model + * renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public abstract class RoundCompleteEvent extends java.util.EventObject { private RoundState rs; diff --git a/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java b/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java index ae460d8f4c9..caefe36b1df 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/RoundCompleteListener.java @@ -28,10 +28,17 @@ package com.sun.mirror.apt; /** * Listener for the completion of a round of annotation processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. This interface has no + * direct analog in the standardized API because the different round + * model renders it unnecessary. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface RoundCompleteListener extends AnnotationProcessorListener { /** * Invoked after all processors for a round have run to completion. diff --git a/langtools/src/share/classes/com/sun/mirror/apt/RoundState.java b/langtools/src/share/classes/com/sun/mirror/apt/RoundState.java index 956899d8574..b39bae2a174 100644 --- a/langtools/src/share/classes/com/sun/mirror/apt/RoundState.java +++ b/langtools/src/share/classes/com/sun/mirror/apt/RoundState.java @@ -28,10 +28,17 @@ package com.sun.mirror.apt; /** * Represents the status of a completed round of annotation processing. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.annotation.processing.RoundEnvironment}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public interface RoundState { /** * Returns true if this was the last round of annotation diff --git a/langtools/src/share/classes/com/sun/mirror/apt/package-info.java b/langtools/src/share/classes/com/sun/mirror/apt/package-info.java new file mode 100644 index 00000000000..b98d789189e --- /dev/null +++ b/langtools/src/share/classes/com/sun/mirror/apt/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Classes used to communicate information between {@linkplain + * com.sun.mirror.apt.AnnotationProcessor annotation processors} and + * an annotation processing tool. + * + *

    The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link + * javax.annotation.processing}. + * + * @since 1.5 + */ +package com.sun.mirror.apt; diff --git a/langtools/src/share/classes/com/sun/mirror/apt/package.html b/langtools/src/share/classes/com/sun/mirror/apt/package.html deleted file mode 100644 index 8330decfd8b..00000000000 --- a/langtools/src/share/classes/com/sun/mirror/apt/package.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - -Classes used to communicate information between -{@linkplain com.sun.mirror.apt.AnnotationProcessor annotation processors} -and an annotation processing tool. - -

    Note that the apt tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 - - diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java index 03b65de8600..f05e7c62cf2 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java @@ -38,11 +38,17 @@ import com.sun.mirror.util.SourcePosition; * ("=="). There is no guarantee that any particular * annotation will always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.AnnotationMirror}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationMirror { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java index ed7c14e94cb..dda20902bf5 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeDeclaration.java @@ -32,11 +32,17 @@ import java.util.Collection; /** * Represents the declaration of an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationTypeDeclaration extends InterfaceDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java index 1864e36b845..2eae91e4335 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationTypeElementDeclaration.java @@ -29,11 +29,17 @@ package com.sun.mirror.declaration; /** * Represents an element of an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationTypeElementDeclaration extends MethodDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java index b4f9593262f..a71ae6d5de8 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/AnnotationValue.java @@ -30,11 +30,17 @@ import com.sun.mirror.util.SourcePosition; /** * Represents a value of an annotation type element. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.AnnotationValue}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationValue { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java index 8d86c528314..08168036d7a 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/ClassDeclaration.java @@ -46,13 +46,19 @@ import com.sun.mirror.type.ClassType; * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see ClassType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ClassDeclaration extends TypeDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java index 11391f8f8a3..240f45d8165 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/ConstructorDeclaration.java @@ -29,10 +29,16 @@ package com.sun.mirror.declaration; /** * Represents a constructor of a class or interface. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ConstructorDeclaration extends ExecutableDeclaration { } diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/Declaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/Declaration.java index 1cffc6427d7..8c9e8d652dd 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/Declaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/Declaration.java @@ -44,6 +44,11 @@ import com.sun.mirror.util.*; * method. There is no guarantee that any particular declaration will * always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.Element}. + * * @author Joseph D. Darcy * @author Scott Seligman * @@ -51,7 +56,8 @@ import com.sun.mirror.util.*; * @see TypeMirror * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Declaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java index 60f45b5e460..58db4fa437e 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/EnumConstantDeclaration.java @@ -29,11 +29,17 @@ package com.sun.mirror.declaration; /** * Represents an enum constant declaration. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumConstantDeclaration extends FieldDeclaration { /** * {@inheritDoc} diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java index c1026830a1d..96fa36b5944 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/EnumDeclaration.java @@ -32,11 +32,17 @@ import java.util.Collection; /** * Represents the declaration of an enum type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumDeclaration extends ClassDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java index e3b1b3d15ed..1a5d26c78f4 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/ExecutableDeclaration.java @@ -34,11 +34,17 @@ import com.sun.mirror.type.ReferenceType; /** * Represents a method or constructor of a class or interface. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ExecutableDeclaration extends MemberDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java index 656dd89eab5..eb45a08e326 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/FieldDeclaration.java @@ -32,11 +32,17 @@ import com.sun.mirror.type.TypeMirror; /** * Represents a field of a type declaration. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface FieldDeclaration extends MemberDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java index 253371acb25..2f69d6d3e68 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/InterfaceDeclaration.java @@ -40,12 +40,18 @@ import com.sun.mirror.type.InterfaceType; * represents an interface type. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see InterfaceType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface InterfaceDeclaration extends TypeDeclaration { } diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java index 8d5feda5524..ec8f1aa6284 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/MemberDeclaration.java @@ -31,11 +31,17 @@ package com.sun.mirror.declaration; * type. This includes fields, constructors, methods, and (since they * may be nested) declared types themselves. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.Element}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface MemberDeclaration extends Declaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java index d2abeff5c30..d2fc63b7a31 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/MethodDeclaration.java @@ -36,11 +36,17 @@ import com.sun.mirror.type.VoidType; * {@linkplain AnnotationTypeElementDeclaration annotation type element} * is a kind of method. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.ExecutableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface MethodDeclaration extends ExecutableDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/Modifier.java b/langtools/src/share/classes/com/sun/mirror/declaration/Modifier.java index ccd63b4032b..a00563bcbd8 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/Modifier.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/Modifier.java @@ -35,11 +35,16 @@ package com.sun.mirror.declaration; * then it is customary, though not required, that they appear in the same * order as the constants listed in the detail section below. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this enum is {@link javax.lang.model.element.Modifier}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public enum Modifier { // See JLS2 sections 8.1.1, 8.3.1, 8.4.3, 8.8.3, and 9.1.1. diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java index 40c09c8611f..88af259e0d2 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/PackageDeclaration.java @@ -37,11 +37,17 @@ import java.util.Collection; * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.PackageElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface PackageDeclaration extends Declaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java index 28cc7f82b6d..23f9fa82406 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/ParameterDeclaration.java @@ -32,11 +32,17 @@ import com.sun.mirror.type.TypeMirror; /** * Represents a formal parameter of a method or constructor. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.VariableElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ParameterDeclaration extends Declaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java index b3d1db54746..5b722db67e6 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/TypeDeclaration.java @@ -54,13 +54,19 @@ import com.sun.mirror.type.*; * provides a simple way to select just the items of interest * when a method returns a collection of declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.element.TypeElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * * @see DeclaredType * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeDeclaration extends MemberDeclaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java b/langtools/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java index 458b39f4312..33f65f90ea2 100644 --- a/langtools/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java +++ b/langtools/src/share/classes/com/sun/mirror/declaration/TypeParameterDeclaration.java @@ -36,11 +36,17 @@ import com.sun.mirror.type.*; * or constructor declaration. * A type parameter declares a {@link TypeVariable}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.TypeParameterElement}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeParameterDeclaration extends Declaration { /** diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/package-info.java b/langtools/src/share/classes/com/sun/mirror/declaration/package-info.java new file mode 100644 index 00000000000..362b1e78a6b --- /dev/null +++ b/langtools/src/share/classes/com/sun/mirror/declaration/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Interfaces used to model program element declarations. A + * declaration is represented by the appropriate subinterface of + * {@link com.sun.mirror.declaration.Declaration}, and an annotation + * is represented as an {@link + * com.sun.mirror.declaration.AnnotationMirror}. + * + *

    The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link + * javax.lang.model.element}. + * + * @since 1.5 + */ +package com.sun.mirror.declaration; diff --git a/langtools/src/share/classes/com/sun/mirror/declaration/package.html b/langtools/src/share/classes/com/sun/mirror/declaration/package.html deleted file mode 100644 index 1920d4dbc7b..00000000000 --- a/langtools/src/share/classes/com/sun/mirror/declaration/package.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - -Interfaces used to model program element declarations. -A declaration is represented by the appropriate subinterface of -{@link com.sun.mirror.declaration.Declaration}, -and an annotation is represented as an -{@link com.sun.mirror.declaration.AnnotationMirror}. - -

    Note that the apt tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 - - diff --git a/langtools/src/share/classes/com/sun/mirror/type/AnnotationType.java b/langtools/src/share/classes/com/sun/mirror/type/AnnotationType.java index 22db4ca7aca..3d8eca4221c 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/AnnotationType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/AnnotationType.java @@ -32,11 +32,17 @@ import com.sun.mirror.declaration.AnnotationTypeDeclaration; /** * Represents an annotation type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface AnnotationType extends InterfaceType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/ArrayType.java b/langtools/src/share/classes/com/sun/mirror/type/ArrayType.java index 4de386ea7b0..56fdfb7d869 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/ArrayType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/ArrayType.java @@ -31,11 +31,17 @@ package com.sun.mirror.type; * A multidimensional array type is represented as an array type * whose component type is also an array type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.ArrayType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ArrayType extends ReferenceType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/ClassType.java b/langtools/src/share/classes/com/sun/mirror/type/ClassType.java index 051fd590dda..fbfc86757fd 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/ClassType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/ClassType.java @@ -38,11 +38,17 @@ import com.sun.mirror.declaration.*; * of a class, a ClassType represents a class type. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ClassType extends DeclaredType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/DeclaredType.java b/langtools/src/share/classes/com/sun/mirror/type/DeclaredType.java index d473b61a9b8..59aaf7e194e 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/DeclaredType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/DeclaredType.java @@ -48,11 +48,17 @@ import com.sun.mirror.declaration.TypeDeclaration; * Other method invocations on such an unknown type will not, in general, * return meaningful results. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface DeclaredType extends ReferenceType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/EnumType.java b/langtools/src/share/classes/com/sun/mirror/type/EnumType.java index 90113a9d53b..758cdddca9f 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/EnumType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/EnumType.java @@ -32,11 +32,17 @@ import com.sun.mirror.declaration.EnumDeclaration; /** * Represents an enum type. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface EnumType extends ClassType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/InterfaceType.java b/langtools/src/share/classes/com/sun/mirror/type/InterfaceType.java index 8b9068d3f6a..48ec1a23f12 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/InterfaceType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/InterfaceType.java @@ -39,11 +39,17 @@ import com.sun.mirror.declaration.*; * represents an interface type. * See {@link TypeDeclaration} for more on this distinction. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.DeclaredType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface InterfaceType extends DeclaredType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/MirroredTypeException.java b/langtools/src/share/classes/com/sun/mirror/type/MirroredTypeException.java index a0048d9e729..93b22bacc9d 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/MirroredTypeException.java +++ b/langtools/src/share/classes/com/sun/mirror/type/MirroredTypeException.java @@ -35,9 +35,16 @@ import com.sun.mirror.declaration.Declaration; * Thrown when an application attempts to access the {@link Class} object * corresponding to a {@link TypeMirror}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this exception is {@link + * javax.lang.model.type.MirroredTypeException}. + * * @see MirroredTypesException * @see Declaration#getAnnotation(Class) */ +@Deprecated +@SuppressWarnings("deprecation") public class MirroredTypeException extends RuntimeException { private static final long serialVersionUID = 1; diff --git a/langtools/src/share/classes/com/sun/mirror/type/MirroredTypesException.java b/langtools/src/share/classes/com/sun/mirror/type/MirroredTypesException.java index 8d44ec14e96..f4647e52ffc 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/MirroredTypesException.java +++ b/langtools/src/share/classes/com/sun/mirror/type/MirroredTypesException.java @@ -38,9 +38,16 @@ import com.sun.mirror.declaration.Declaration; * Thrown when an application attempts to access a sequence of {@link Class} * objects each corresponding to a {@link TypeMirror}. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this exception is {@link + * javax.lang.model.type.MirroredTypesException}. + * * @see MirroredTypeException * @see Declaration#getAnnotation(Class) */ +@Deprecated +@SuppressWarnings("deprecation") public class MirroredTypesException extends RuntimeException { private static final long serialVersionUID = 1; diff --git a/langtools/src/share/classes/com/sun/mirror/type/PrimitiveType.java b/langtools/src/share/classes/com/sun/mirror/type/PrimitiveType.java index d9ec2f30fab..aee889e409e 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/PrimitiveType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/PrimitiveType.java @@ -31,11 +31,17 @@ package com.sun.mirror.type; * boolean, byte, short, int, * long, char, float, and double. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.PrimitiveType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface PrimitiveType extends TypeMirror { /** @@ -47,7 +53,13 @@ public interface PrimitiveType extends TypeMirror { /** * An enumeration of the different kinds of primitive types. + * + * @deprecated All components of this API have been superseded by + * the standardized annotation processing API. The replacement + * for the functionality of this enum is {@link + * javax.lang.model.type.TypeKind}. */ + @Deprecated enum Kind { /** The primitive type boolean */ BOOLEAN, /** The primitive type byte */ BYTE, diff --git a/langtools/src/share/classes/com/sun/mirror/type/ReferenceType.java b/langtools/src/share/classes/com/sun/mirror/type/ReferenceType.java index 862eb87caec..c8df04911d2 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/ReferenceType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/ReferenceType.java @@ -30,10 +30,16 @@ package com.sun.mirror.type; * Represents a reference type. * These include class and interface types, array types, and type variables. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.ReferenceType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface ReferenceType extends TypeMirror { } diff --git a/langtools/src/share/classes/com/sun/mirror/type/TypeMirror.java b/langtools/src/share/classes/com/sun/mirror/type/TypeMirror.java index 6b3033935b8..9816f00e4d6 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/TypeMirror.java +++ b/langtools/src/share/classes/com/sun/mirror/type/TypeMirror.java @@ -43,6 +43,11 @@ import com.sun.mirror.util.TypeVisitor; * There is no guarantee that any particular type will * always be represented by the same object. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.TypeMirror}. + * * @author Joseph D. Darcy * @author Scott Seligman * @@ -50,7 +55,8 @@ import com.sun.mirror.util.TypeVisitor; * @see Types * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeMirror { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/TypeVariable.java b/langtools/src/share/classes/com/sun/mirror/type/TypeVariable.java index 0c5c097b0f5..8626a2d4332 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/TypeVariable.java +++ b/langtools/src/share/classes/com/sun/mirror/type/TypeVariable.java @@ -35,11 +35,17 @@ import com.sun.mirror.declaration.*; * {@linkplain TypeParameterDeclaration type parameter} of a * type, method, or constructor. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.TypeVariable}. + * * @author Joe Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeVariable extends ReferenceType { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/VoidType.java b/langtools/src/share/classes/com/sun/mirror/type/VoidType.java index b913e7fdb25..9db96fac7c4 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/VoidType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/VoidType.java @@ -35,9 +35,15 @@ import com.sun.mirror.declaration.MethodDeclaration; * @author Joseph D. Darcy * @author Scott Seligman * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is included in {@link + * javax.lang.model.type.NoType}. + * * @see MethodDeclaration#getReturnType() * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface VoidType extends TypeMirror { } diff --git a/langtools/src/share/classes/com/sun/mirror/type/WildcardType.java b/langtools/src/share/classes/com/sun/mirror/type/WildcardType.java index fc0fa48f767..6cf2141c453 100644 --- a/langtools/src/share/classes/com/sun/mirror/type/WildcardType.java +++ b/langtools/src/share/classes/com/sun/mirror/type/WildcardType.java @@ -41,11 +41,17 @@ import java.util.Collection; * extends clause, its lower bound explicitly set by a * super clause, or neither (but not both). * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.type.WildcardType}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface WildcardType extends TypeMirror { /** diff --git a/langtools/src/share/classes/com/sun/mirror/type/package-info.java b/langtools/src/share/classes/com/sun/mirror/type/package-info.java new file mode 100644 index 00000000000..d45a71dd0a8 --- /dev/null +++ b/langtools/src/share/classes/com/sun/mirror/type/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Interfaces used to model types. A type is represented by the + * appropriate subinterface of {@link com.sun.mirror.type.TypeMirror}. + * + *

    The {@code apt} tool and its associated API have been + * superseded by the standardized annotation processing API. The + * replacement for the functionality in this package is {@link + * javax.lang.model.type}. + * + * @since 1.5 + */ +package com.sun.mirror.type; diff --git a/langtools/src/share/classes/com/sun/mirror/type/package.html b/langtools/src/share/classes/com/sun/mirror/type/package.html deleted file mode 100644 index cb83900545d..00000000000 --- a/langtools/src/share/classes/com/sun/mirror/type/package.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - -Interfaces used to model types. -A type is represented by the appropriate subinterface of -{@link com.sun.mirror.type.TypeMirror}. - -

    Note that the apt tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 - - diff --git a/langtools/src/share/classes/com/sun/mirror/util/DeclarationFilter.java b/langtools/src/share/classes/com/sun/mirror/util/DeclarationFilter.java index 83936dd4e2c..3a64927a3f7 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/DeclarationFilter.java +++ b/langtools/src/share/classes/com/sun/mirror/util/DeclarationFilter.java @@ -69,11 +69,17 @@ import static com.sun.mirror.declaration.Modifier.*; * }; * result = nameFilter.filter(decls); * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.ElementFilter}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class DeclarationFilter { // Predefined filters for convenience. diff --git a/langtools/src/share/classes/com/sun/mirror/util/DeclarationScanner.java b/langtools/src/share/classes/com/sun/mirror/util/DeclarationScanner.java index 6dbb275a538..269a5b58f4d 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/DeclarationScanner.java +++ b/langtools/src/share/classes/com/sun/mirror/util/DeclarationScanner.java @@ -39,11 +39,17 @@ import com.sun.mirror.declaration.*; * are scanned; the postprocessing visitor is called after the * contained declarations are scanned. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.ElementScanner6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") class DeclarationScanner implements DeclarationVisitor { protected DeclarationVisitor pre; protected DeclarationVisitor post; diff --git a/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java b/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java index 4b3806efefe..56401d4f23c 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java +++ b/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java @@ -37,11 +37,17 @@ import com.sun.mirror.declaration.*; * visitXxx method applicable to that declaration is * invoked. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.ElementVisitor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface DeclarationVisitor { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java b/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java index 9188be76ae1..f8e0171d7b0 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java +++ b/langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java @@ -28,10 +28,17 @@ package com.sun.mirror.util; /** * Utilities to create specialized DeclarationVisitor instances. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct + * replacement for the functionality of this class in the standardized + * API due to that API's different visitor structure. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") public class DeclarationVisitors { private DeclarationVisitors(){} // do not instantiate. diff --git a/langtools/src/share/classes/com/sun/mirror/util/Declarations.java b/langtools/src/share/classes/com/sun/mirror/util/Declarations.java index fe87fa5a9fa..ec8c9eb6a7c 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/Declarations.java +++ b/langtools/src/share/classes/com/sun/mirror/util/Declarations.java @@ -32,11 +32,17 @@ import com.sun.mirror.declaration.*; /** * Utility methods for operating on declarations. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.util.Elements}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Declarations { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java b/langtools/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java index 7b0ed87e894..6be5d834ae0 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java +++ b/langtools/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java @@ -37,11 +37,17 @@ import com.sun.mirror.declaration.*; * methods that correspond to the kinds of declarations on which it * will operate. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleElementVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class SimpleDeclarationVisitor implements DeclarationVisitor { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java b/langtools/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java index eaa37b3dbef..2bea63de137 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java +++ b/langtools/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java @@ -37,11 +37,17 @@ import com.sun.mirror.type.*; * methods that correspond to the kinds of types on which it will * operate. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleTypeVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public class SimpleTypeVisitor implements TypeVisitor { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java b/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java index 3b6e62bec12..62b7209dde4 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java +++ b/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java @@ -42,10 +42,17 @@ import java.util.TreeSet; * are scanned; the postprocessing visitor is called after the * contained declarations are scanned. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this class is {@link + * javax.lang.model.util.SimpleElementVisitor6}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ +@Deprecated +@SuppressWarnings("deprecation") class SourceOrderDeclScanner extends DeclarationScanner { static class SourceOrderComparator implements java.util.Comparator { SourceOrderComparator(){} diff --git a/langtools/src/share/classes/com/sun/mirror/util/SourcePosition.java b/langtools/src/share/classes/com/sun/mirror/util/SourcePosition.java index f300d3c19ab..766cae4f645 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/SourcePosition.java +++ b/langtools/src/share/classes/com/sun/mirror/util/SourcePosition.java @@ -32,11 +32,20 @@ import java.io.File; /** * Represents a position in a source file. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. There is no direct + * replacement for the functionality of this interface since the + * standardized {@link javax.annotation.processing.Messager Messager} + * API implicitly takes a source position argument via any element, + * annotation mirror, or annotation value passed along with the + * message. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface SourcePosition { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/TypeVisitor.java b/langtools/src/share/classes/com/sun/mirror/util/TypeVisitor.java index 4df15f551d6..4216617d4f3 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/TypeVisitor.java +++ b/langtools/src/share/classes/com/sun/mirror/util/TypeVisitor.java @@ -38,11 +38,17 @@ import com.sun.mirror.type.*; * the most specific visitXxx method applicable to * that type is invoked. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.element.TypeVisitor}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface TypeVisitor { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/Types.java b/langtools/src/share/classes/com/sun/mirror/util/Types.java index 8bb2512105f..4324f59b035 100644 --- a/langtools/src/share/classes/com/sun/mirror/util/Types.java +++ b/langtools/src/share/classes/com/sun/mirror/util/Types.java @@ -35,11 +35,17 @@ import com.sun.mirror.type.*; /** * Utility methods for operating on types. * + * @deprecated All components of this API have been superseded by the + * standardized annotation processing API. The replacement for the + * functionality of this interface is {@link + * javax.lang.model.util.Types}. + * * @author Joseph D. Darcy * @author Scott Seligman * @since 1.5 */ - +@Deprecated +@SuppressWarnings("deprecation") public interface Types { /** diff --git a/langtools/src/share/classes/com/sun/mirror/util/package-info.java b/langtools/src/share/classes/com/sun/mirror/util/package-info.java new file mode 100644 index 00000000000..9a74f19a7d1 --- /dev/null +++ b/langtools/src/share/classes/com/sun/mirror/util/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright 2004 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * Utilities to assist in the processing of {@linkplain + * com.sun.mirror.declaration declarations} and {@linkplain + * com.sun.mirror.type types}. + * + *

    The {@code apt} tool and its associated API have been superseded + * by the standardized annotation processing API. The replacement for + * the functionality in this package is {@link javax.lang.model.util}. + * + * @since 1.5 + */ +package com.sun.mirror.util; diff --git a/langtools/src/share/classes/com/sun/mirror/util/package.html b/langtools/src/share/classes/com/sun/mirror/util/package.html deleted file mode 100644 index ef3e71d8dea..00000000000 --- a/langtools/src/share/classes/com/sun/mirror/util/package.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - -Utilities to assist in the processing of {@linkplain -com.sun.mirror.declaration declarations} and {@linkplain -com.sun.mirror.type types}. - -

    Note that the apt tool and its associated APIs may be -changed or superseded in future j2se releases. - -@since 1.5 - - diff --git a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java index 68d5a458a66..fcdf29d461a 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java +++ b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java @@ -65,6 +65,7 @@ import static com.sun.tools.apt.mirror.declaration.DeclarationMaker.isJavaIdenti * risk. This code and its internal interfaces are subject to change * or deletion without notice. */ +@SuppressWarnings("deprecation") public class Apt extends ListBuffer> { java.util.Set genSourceFileNames = new java.util.LinkedHashSet(); public java.util.Set getSourceFileNames() { diff --git a/langtools/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java b/langtools/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java index edc71a269f2..2753d734f89 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java +++ b/langtools/src/share/classes/com/sun/tools/apt/comp/BootstrapAPF.java @@ -29,6 +29,7 @@ import java.util.*; import com.sun.mirror.apt.*; import com.sun.mirror.declaration.AnnotationTypeDeclaration; +@SuppressWarnings("deprecation") public class BootstrapAPF implements AnnotationProcessorFactory { static final Collection supportedOptions = diff --git a/langtools/src/share/classes/com/sun/tools/apt/comp/PrintAP.java b/langtools/src/share/classes/com/sun/tools/apt/comp/PrintAP.java index 59f9e7bdd80..a2715b2ff85 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/comp/PrintAP.java +++ b/langtools/src/share/classes/com/sun/tools/apt/comp/PrintAP.java @@ -36,6 +36,7 @@ import com.sun.mirror.util.*; /** * Class used to implement "-print" option. */ +@SuppressWarnings("deprecation") public class PrintAP implements AnnotationProcessor { diff --git a/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java index 219cd8acb09..cc6aada5508 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java +++ b/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java @@ -50,6 +50,7 @@ import com.sun.tools.javac.parser.DocCommentScanner; * risk. This code and its internal interfaces are subject to change * or deletion without notice. */ +@SuppressWarnings("deprecation") public class JavaCompiler extends com.sun.tools.javac.main.JavaCompiler { /** The context key for the compiler. */ protected static final Context.Key compilerKey = diff --git a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java index 7783652979d..d8e9aac768e 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java +++ b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java @@ -64,6 +64,7 @@ import com.sun.mirror.apt.AnnotationProcessorFactory; * risk. This code and its internal interfaces are subject to change * or deletion without notice. */ +@SuppressWarnings("deprecation") public class Main { /** For testing: enter any options you want to be set implicitly @@ -780,7 +781,6 @@ public class Main { // prefixed to command line arguments. processArgs(forcedOpts); - /* * A run of apt only gets passed the most recently generated * files; the initial run of apt gets passed the files from @@ -792,6 +792,11 @@ public class Main { // assign args the result of parse to capture results of // '@file' expansion origFilenames = processArgs((args=CommandLine.parse(args))); + + if (options.get("suppress-tool-api-removal-message") == null) { + Bark.printLines(out, getLocalizedString("misc.Deprecation")); + } + if (origFilenames == null) { return EXIT_CMDERR; } else if (origFilenames.size() == 0) { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java index f5e5b1a8ffd..4279a970da4 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/AptEnv.java @@ -39,7 +39,7 @@ import com.sun.tools.javac.util.Names; /** * The environment for a run of apt. */ - +@SuppressWarnings("deprecation") public class AptEnv { public Names names; // javac's name table diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java index 974d464a330..0e3730332e0 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/AnnotationProcessorEnvironmentImpl.java @@ -47,6 +47,7 @@ import static com.sun.mirror.util.DeclarationVisitors.*; /* * Annotation Processor Environment implementation. */ +@SuppressWarnings("deprecation") public class AnnotationProcessorEnvironmentImpl implements AnnotationProcessorEnvironment { Collection spectypedecls; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java index fb01d6b33d5..983eea0f7ca 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/FilerImpl.java @@ -45,7 +45,7 @@ import static com.sun.mirror.apt.Filer.Location.*; /** * Implementation of Filer. */ - +@SuppressWarnings("deprecation") public class FilerImpl implements Filer { /* * The Filer class must maintain a number of constraints. First, diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java index 12808476d51..903793f0c5f 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/MessagerImpl.java @@ -38,7 +38,7 @@ import com.sun.tools.apt.util.Bark; /** * Implementation of Messager. */ - +@SuppressWarnings("deprecation") public class MessagerImpl implements Messager { private final Bark bark; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java index 4a4988af516..7046b1a7c5c 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundCompleteEventImpl.java @@ -29,6 +29,7 @@ import com.sun.mirror.apt.AnnotationProcessorEnvironment; import com.sun.mirror.apt.RoundCompleteEvent; import com.sun.mirror.apt.RoundState; +@SuppressWarnings("deprecation") public class RoundCompleteEventImpl extends RoundCompleteEvent { private static final long serialVersionUID = 7067621446720784300L; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java index 28edfde00a3..70dbc271ef1 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/apt/RoundStateImpl.java @@ -28,6 +28,7 @@ package com.sun.tools.apt.mirror.apt; import com.sun.mirror.apt.RoundState; import java.util.Map; +@SuppressWarnings("deprecation") public class RoundStateImpl implements RoundState { private final boolean finalRound; private final boolean errorRaised; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java index acde7c6cdd7..226908a8d61 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationMirrorImpl.java @@ -42,7 +42,7 @@ import com.sun.tools.javac.util.Pair; /** * Implementation of AnnotationMirror */ - +@SuppressWarnings("deprecation") public class AnnotationMirrorImpl implements AnnotationMirror { protected final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java index 40eb0d68e12..e1b5ba80918 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java @@ -49,7 +49,7 @@ import com.sun.tools.javac.util.Pair; *

    The "dynamic proxy return form" of an attribute element value is * the form used by sun.reflect.annotation.AnnotationInvocationHandler. */ - +@SuppressWarnings("deprecation") class AnnotationProxyMaker { private final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java index 59a9e6f834f..494522a6bef 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeDeclarationImpl.java @@ -37,7 +37,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of AnnotationTypeDeclaration */ - +@SuppressWarnings("deprecation") public class AnnotationTypeDeclarationImpl extends InterfaceDeclarationImpl implements AnnotationTypeDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java index c6086385aa8..d63ddc37006 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationTypeElementDeclarationImpl.java @@ -35,7 +35,7 @@ import com.sun.tools.javac.code.Symbol.MethodSymbol; /** * Implementation of AnnotationTypeElementDeclaration */ - +@SuppressWarnings("deprecation") public class AnnotationTypeElementDeclarationImpl extends MethodDeclarationImpl implements AnnotationTypeElementDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java index a217393c375..b99bb8a2db6 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationValueImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.code.TypeTags; /** * Implementation of AnnotationValue */ - +@SuppressWarnings("deprecation") public class AnnotationValueImpl implements AnnotationValue { protected final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java index 600be2906b7..1359d16ea12 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ClassDeclarationImpl.java @@ -42,7 +42,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of ClassDeclaration */ - +@SuppressWarnings("deprecation") public class ClassDeclarationImpl extends TypeDeclarationImpl implements ClassDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java index ba2afd8b47e..63ed3cfa325 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java @@ -39,6 +39,7 @@ import static com.sun.tools.javac.code.TypeTags.*; /** * Utility class for operating on constant expressions. */ +@SuppressWarnings("deprecation") class Constants { /** diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java index 936dfd8145e..3943100bf0f 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ConstructorDeclarationImpl.java @@ -39,7 +39,7 @@ import com.sun.tools.javac.code.Symbol.MethodSymbol; /** * Implementation of ConstructorDeclaration */ - +@SuppressWarnings("deprecation") public class ConstructorDeclarationImpl extends ExecutableDeclarationImpl implements ConstructorDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java index bb2b097aba8..e441424073b 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationImpl.java @@ -52,7 +52,7 @@ import static com.sun.tools.javac.code.Kinds.*; /** * Implementation of Declaration */ - +@SuppressWarnings("deprecation") public abstract class DeclarationImpl implements Declaration { protected final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java index 09eeee29ab2..cd90a964ba9 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/DeclarationMaker.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.main.JavaCompiler; /** * Utilities for constructing and caching declarations. */ - +@SuppressWarnings("deprecation") public class DeclarationMaker { private AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java index 7d4ae315bf3..17191cc8b9f 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumConstantDeclarationImpl.java @@ -35,7 +35,7 @@ import com.sun.tools.javac.code.Symbol.VarSymbol; /** * Implementation of EnumConstantDeclaration */ - +@SuppressWarnings("deprecation") public class EnumConstantDeclarationImpl extends FieldDeclarationImpl implements EnumConstantDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java index 2a498d24a77..ed882d43d35 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/EnumDeclarationImpl.java @@ -37,7 +37,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of EnumDeclaration */ - +@SuppressWarnings("deprecation") public class EnumDeclarationImpl extends ClassDeclarationImpl implements EnumDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java index b5d758fef51..ae4d92fc80f 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ExecutableDeclarationImpl.java @@ -39,7 +39,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of ExecutableDeclaration */ - +@SuppressWarnings("deprecation") public abstract class ExecutableDeclarationImpl extends MemberDeclarationImpl implements ExecutableDeclaration { public MethodSymbol sym; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java index 2ab22fdea4f..14eaefe3024 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/FieldDeclarationImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.code.TypeTags; /** * Implementation of FieldDeclaration */ - +@SuppressWarnings("deprecation") class FieldDeclarationImpl extends MemberDeclarationImpl implements FieldDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java index 866c66d9dc8..ee251c30f35 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/InterfaceDeclarationImpl.java @@ -35,7 +35,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of InterfaceDeclaration */ - +@SuppressWarnings("deprecation") public class InterfaceDeclarationImpl extends TypeDeclarationImpl implements InterfaceDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java index e47d706332e..3da4b4313c7 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MemberDeclarationImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of MemberDeclaration */ - +@SuppressWarnings("deprecation") public abstract class MemberDeclarationImpl extends DeclarationImpl implements MemberDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java index fff004122b7..29c16b2116e 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/MethodDeclarationImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.code.Symbol.MethodSymbol; /** * Implementation of MethodDeclaration */ - +@SuppressWarnings("deprecation") public class MethodDeclarationImpl extends ExecutableDeclarationImpl implements MethodDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java index 2edbeb4314b..1f11b1d5729 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/PackageDeclarationImpl.java @@ -39,7 +39,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of PackageDeclaration. */ - +@SuppressWarnings("deprecation") public class PackageDeclarationImpl extends DeclarationImpl implements PackageDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java index 9016b8073fd..66890da2b63 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/ParameterDeclarationImpl.java @@ -39,7 +39,7 @@ import com.sun.tools.javac.code.Symbol.VarSymbol; /** * Implementation of ParameterDeclaration */ - +@SuppressWarnings("deprecation") public class ParameterDeclarationImpl extends DeclarationImpl implements ParameterDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java index d67d6f21e10..7deeb7cf112 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeDeclarationImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.util.Name; /** * Implementation of TypeDeclaration */ - +@SuppressWarnings("deprecation") public class TypeDeclarationImpl extends MemberDeclarationImpl implements TypeDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java index b169f47509f..765a11e7487 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/TypeParameterDeclarationImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of TypeParameterDeclaration */ - +@SuppressWarnings("deprecation") public class TypeParameterDeclarationImpl extends DeclarationImpl implements TypeParameterDeclaration { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java index e39a30dabeb..495bc138b01 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/AnnotationTypeImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of AnnotationType */ - +@SuppressWarnings("deprecation") public class AnnotationTypeImpl extends InterfaceTypeImpl implements AnnotationType { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java index 8c1458be77f..5d62c01445c 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ArrayTypeImpl.java @@ -35,7 +35,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of ArrayType */ - +@SuppressWarnings("deprecation") public class ArrayTypeImpl extends TypeMirrorImpl implements ArrayType { protected Type.ArrayType type; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java index a4b9fd230b3..dd824191499 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/ClassTypeImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of ClassType */ - +@SuppressWarnings("deprecation") public class ClassTypeImpl extends DeclaredTypeImpl implements ClassType { ClassTypeImpl(AptEnv env, Type.ClassType type) { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java index 81683248c4a..b5a815dc864 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/DeclaredTypeImpl.java @@ -38,7 +38,7 @@ import com.sun.tools.javac.code.Symbol.ClassSymbol; /** * Implementation of DeclaredType */ - +@SuppressWarnings("deprecation") abstract class DeclaredTypeImpl extends TypeMirrorImpl implements DeclaredType { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java index 883a3ec1ec8..c2d634678e1 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/EnumTypeImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of EnumType */ - +@SuppressWarnings("deprecation") public class EnumTypeImpl extends ClassTypeImpl implements EnumType { EnumTypeImpl(AptEnv env, Type.ClassType type) { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java index 3e056deeef8..167ea9b50d2 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/InterfaceTypeImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of InterfaceType */ - +@SuppressWarnings("deprecation") public class InterfaceTypeImpl extends DeclaredTypeImpl implements InterfaceType { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java index e176d5b487e..bf186620a11 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/PrimitiveTypeImpl.java @@ -38,7 +38,7 @@ import static com.sun.mirror.type.PrimitiveType.Kind.*; /** * Implementation of PrimitiveType. */ - +@SuppressWarnings("deprecation") class PrimitiveTypeImpl extends TypeMirrorImpl implements PrimitiveType { private final Kind kind; // the kind of primitive diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java index 70d322b5371..d9829784100 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMaker.java @@ -41,7 +41,7 @@ import static com.sun.tools.javac.code.TypeTags.*; /** * Utilities for constructing type objects. */ - +@SuppressWarnings("deprecation") public class TypeMaker { private final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java index 964cd8abdea..2fa704a053c 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeMirrorImpl.java @@ -35,7 +35,7 @@ import com.sun.tools.javac.code.*; /** * Implementation of TypeMirror */ - +@SuppressWarnings("deprecation") public abstract class TypeMirrorImpl implements TypeMirror { protected final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java index 9e65c82f8e8..43119bd7d94 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/TypeVariableImpl.java @@ -40,7 +40,7 @@ import com.sun.tools.javac.code.Type; /** * Implementation of TypeVariable */ - +@SuppressWarnings("deprecation") public class TypeVariableImpl extends TypeMirrorImpl implements TypeVariable { protected Type.TypeVar type; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java index 7f9a7bc2989..41e9ca1dbca 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/VoidTypeImpl.java @@ -34,7 +34,7 @@ import com.sun.tools.apt.mirror.AptEnv; /** * Implementation of VoidType. */ - +@SuppressWarnings("deprecation") class VoidTypeImpl extends TypeMirrorImpl implements VoidType { VoidTypeImpl(AptEnv env) { diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java index 9bda06f994d..6221e8ce7a7 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/type/WildcardTypeImpl.java @@ -41,7 +41,7 @@ import com.sun.tools.javac.code.Symbol.*; /** * Implementation of WildcardType */ - +@SuppressWarnings("deprecation") public class WildcardTypeImpl extends TypeMirrorImpl implements WildcardType { protected Type.WildcardType type; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java index f6008e0618d..106c7136d70 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/DeclarationsImpl.java @@ -42,7 +42,7 @@ import static com.sun.tools.javac.code.Kinds.*; /** * Implementation of Declarations utility methods for annotation processors */ - +@SuppressWarnings("deprecation") public class DeclarationsImpl implements Declarations { private final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java index d76d0eb3968..7da66d6faa7 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/SourcePositionImpl.java @@ -36,7 +36,7 @@ import com.sun.tools.javac.util.Position; /** * Implementation of SourcePosition */ - +@SuppressWarnings("deprecation") public class SourcePositionImpl implements SourcePosition { private JavaFileObject sourcefile; diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java index 8ada36ded5f..237bd58bf30 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/util/TypesImpl.java @@ -44,7 +44,7 @@ import com.sun.tools.javac.util.ListBuffer; /** * Implementation of Types utility methods for annotation processors */ - +@SuppressWarnings("deprecation") public class TypesImpl implements Types { private final AptEnv env; diff --git a/langtools/src/share/classes/com/sun/tools/apt/resources/apt.properties b/langtools/src/share/classes/com/sun/tools/apt/resources/apt.properties index 80446a08931..97605c32fa2 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/resources/apt.properties +++ b/langtools/src/share/classes/com/sun/tools/apt/resources/apt.properties @@ -111,6 +111,14 @@ apt.err.Messager=\ ## miscellaneous strings ## +apt.misc.Deprecation=\ + \nwarning:\u0020The apt tool and its associated API are planned to be\n\ + removed in the next major JDK release. These features have been\n\ + superseded by javac and the standardized annotation processing API,\n\ + javax.annotation.processing and javax.lang.model. Users are\n\ + recommended to migrate to the annotation processing features of\n\ + javac; see the javac man page for more information.\n + apt.misc.Problem=\ Problem encountered during annotation processing; \nsee stacktrace below for more information. diff --git a/langtools/test/tools/apt/Basics/apt.sh b/langtools/test/tools/apt/Basics/apt.sh index a040241ec33..b34d9e0afbb 100644 --- a/langtools/test/tools/apt/Basics/apt.sh +++ b/langtools/test/tools/apt/Basics/apt.sh @@ -43,7 +43,7 @@ case "${OS}" in esac # Construct path to apt executable -APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS}" +APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " printf "%s\n" "-classpath ${TESTCLASSES}" > options printf "%s\n" "-factorypath ./nullap.jar" >> options @@ -58,6 +58,7 @@ printf "%s\n" "-nocompile" >> options1 printf "%s\n" "-XListAnnotationTypes" >> options1 printf "%s\n" "-XclassesAsDecls" >> options1 + # Construct path to javac executable JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . " JAR="${TESTJAVA}/bin/jar " diff --git a/langtools/test/tools/apt/Compile/compile.sh b/langtools/test/tools/apt/Compile/compile.sh index 8e42ea3b180..d93e5d92a31 100644 --- a/langtools/test/tools/apt/Compile/compile.sh +++ b/langtools/test/tools/apt/Compile/compile.sh @@ -67,7 +67,7 @@ case "${OS}" in esac -APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} " +APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message " JAVA="${TESTJAVA}/bin/java ${TESTVMOPTS} " JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} " From 642a5040a09d4bdecbd0d600b4518c35864341df Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Mon, 27 Jul 2009 15:37:39 +0400 Subject: [PATCH 43/74] 6856929: Frame is not getting resized using Robot in OpenSolaris and Ubuntu Reviewed-by: art, dav --- .../classes/sun/awt/X11/XRobotPeer.java | 6 ++++-- jdk/src/solaris/native/sun/awt/awt_Robot.c | 21 ++++++++----------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java index 663c0ed8a04..82e226363b9 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java @@ -27,6 +27,7 @@ package sun.awt.X11; import java.awt.*; import java.awt.peer.*; import sun.awt.X11GraphicsConfig; +import sun.awt.SunToolkit; class XRobotPeer implements RobotPeer { private X11GraphicsConfig xgc = null; @@ -38,7 +39,8 @@ class XRobotPeer implements RobotPeer { XRobotPeer(GraphicsConfiguration gc) { this.xgc = (X11GraphicsConfig)gc; - setup(); + SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit(); + setup(tk.getNumberOfButtons()); } public void dispose() { @@ -81,7 +83,7 @@ class XRobotPeer implements RobotPeer { return pixelArray; } - private static native synchronized void setup(); + private static native synchronized void setup(int numberOfButtons); private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y); private static native synchronized void mousePressImpl(int buttons); diff --git a/jdk/src/solaris/native/sun/awt/awt_Robot.c b/jdk/src/solaris/native/sun/awt/awt_Robot.c index 18aa1554b98..dbeebfe44fb 100644 --- a/jdk/src/solaris/native/sun/awt/awt_Robot.c +++ b/jdk/src/solaris/native/sun/awt/awt_Robot.c @@ -51,9 +51,8 @@ extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs; -extern int32_t getNumButtons(); - static jint * masks; +static jint num_buttons; static int32_t isXTestAvailable() { int32_t major_opcode, first_event, first_error; @@ -164,34 +163,34 @@ static XImage *getWindowImage(Display * display, Window window, /*********************************************************************************************/ +// this should be called from XRobotPeer constructor JNIEXPORT void JNICALL -Java_sun_awt_X11_XRobotPeer_setup (JNIEnv * env, jclass cls) { +Java_sun_awt_X11_XRobotPeer_setup (JNIEnv * env, jclass cls, jint numberOfButtons) { int32_t xtestAvailable; -// this should be called from XRobotPeer constructor + DTRACE_PRINTLN("RobotPeer: setup()"); + + num_buttons = numberOfButtons; + jclass inputEventClazz = (*env)->FindClass(env, "java/awt/event/InputEvent"); jmethodID getButtonDownMasksID = (*env)->GetStaticMethodID(env, inputEventClazz, "getButtonDownMasks", "()[I"); jintArray obj = (jintArray)(*env)->CallStaticObjectMethod(env, inputEventClazz, getButtonDownMasksID); - jsize len = (*env)->GetArrayLength(env, obj); jint * tmp = (*env)->GetIntArrayElements(env, obj, JNI_FALSE); - masks = (jint *)malloc(sizeof(jint)*len); + masks = (jint *)malloc(sizeof(jint) * num_buttons); if (masks == (jint *) NULL) { JNU_ThrowOutOfMemoryError((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2), NULL); goto finally; } int i; - for (i = 0; i < len; i++) { + for (i = 0; i < num_buttons; i++) { masks[i] = tmp[i]; } (*env)->ReleaseIntArrayElements(env, obj, tmp, 0); (*env)->DeleteLocalRef(env, obj); - DTRACE_PRINTLN("RobotPeer: setup()"); - AWT_LOCK(); - xtestAvailable = isXTestAvailable(); DTRACE_PRINTLN1("RobotPeer: XTest available = %d", xtestAvailable); if (!xtestAvailable) { @@ -338,8 +337,6 @@ void mouseAction(JNIEnv *env, { AWT_LOCK(); - int32_t num_buttons = getNumButtons(); //from XToolkit.c - DTRACE_PRINTLN1("RobotPeer: mouseAction(%i)", buttonMask); DTRACE_PRINTLN1("RobotPeer: mouseAction, press = %d", isMousePress); From a51137d9425967a3966b097ed42b190acd94822a Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Mon, 27 Jul 2009 22:04:07 +0800 Subject: [PATCH 44/74] 6449574: Invalid ldap filter is accepted and processed Reviewed-by: vinnie --- .../classes/com/sun/jndi/ldap/Filter.java | 18 +- .../sun/jndi/ldap/BalancedParentheses.java | 236 ++++++++++++++++++ 2 files changed, 248 insertions(+), 6 deletions(-) create mode 100644 jdk/test/com/sun/jndi/ldap/BalancedParentheses.java diff --git a/jdk/src/share/classes/com/sun/jndi/ldap/Filter.java b/jdk/src/share/classes/com/sun/jndi/ldap/Filter.java index 6a002190fda..17f5eb22038 100644 --- a/jdk/src/share/classes/com/sun/jndi/ldap/Filter.java +++ b/jdk/src/share/classes/com/sun/jndi/ldap/Filter.java @@ -93,9 +93,7 @@ final class Filter { int filtOffset[] = new int[1]; - for (filtOffset[0] = filterStart; - filtOffset[0] < filterEnd; - filtOffset[0]++) { + for (filtOffset[0] = filterStart; filtOffset[0] < filterEnd;) { switch (filter[filtOffset[0]]) { case '(': filtOffset[0]++; @@ -104,18 +102,21 @@ final class Filter { case '&': encodeComplexFilter(ber, filter, LDAP_FILTER_AND, filtOffset, filterEnd); + // filtOffset[0] has pointed to char after right paren parens--; break; case '|': encodeComplexFilter(ber, filter, LDAP_FILTER_OR, filtOffset, filterEnd); + // filtOffset[0] has pointed to char after right paren parens--; break; case '!': encodeComplexFilter(ber, filter, LDAP_FILTER_NOT, filtOffset, filterEnd); + // filtOffset[0] has pointed to char after right paren parens--; break; @@ -143,8 +144,8 @@ final class Filter { encodeSimpleFilter(ber, filter, filtOffset[0], nextOffset); - // points to right parens; for loop will increment beyond parens - filtOffset[0] = nextOffset; + // points to the char after right paren. + filtOffset[0] = nextOffset + 1; parens--; break; @@ -170,9 +171,14 @@ final class Filter { filtOffset[0] = filterEnd; // force break from outer break; } + + if (parens < 0) { + throw new InvalidSearchFilterException( + "Unbalanced parenthesis"); + } } - if (parens > 0) { + if (parens != 0) { throw new InvalidSearchFilterException("Unbalanced parenthesis"); } diff --git a/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java b/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java new file mode 100644 index 00000000000..60bb7275677 --- /dev/null +++ b/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java @@ -0,0 +1,236 @@ +/** + * @test + * @bug 6449574 + * @summary Invalid ldap filter is accepted and processed + */ + +import java.io.*; +import javax.naming.*; +import javax.naming.directory.*; +import java.util.Properties; +import java.util.Hashtable; + +import java.net.Socket; +import java.net.ServerSocket; + +public class BalancedParentheses { + // Should we run the client or server in a separate thread? + // + // Both sides can throw exceptions, but do you have a preference + // as to which side should be the main thread. + static boolean separateServerThread = true; + + // use any free port by default + volatile int serverPort = 0; + + // Is the server ready to serve? + volatile static boolean serverReady = false; + + // Define the server side of the test. + // + // If the server prematurely exits, serverReady will be set to true + // to avoid infinite hangs. + void doServerSide() throws Exception { + ServerSocket serverSock = new ServerSocket(serverPort); + + // signal client, it's ready to accecpt connection + serverPort = serverSock.getLocalPort(); + serverReady = true; + + // accept a connection + Socket socket = serverSock.accept(); + System.out.println("Server: Connection accepted"); + + InputStream is = socket.getInputStream(); + OutputStream os = socket.getOutputStream(); + + // read the bindRequest + while (is.read() != -1) { + // ignore + is.skip(is.available()); + break; + } + + byte[] bindResponse = {0x30, 0x0C, 0x02, 0x01, 0x01, 0x61, 0x07, 0x0A, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00}; + // write bindResponse + os.write(bindResponse); + os.flush(); + + // ignore any more request. + while (is.read() != -1) { + // ignore + is.skip(is.available()); + } + + is.close(); + os.close(); + socket.close(); + serverSock.close(); + } + + // Define the client side of the test. + // + // If the server prematurely exits, serverReady will be set to true + // to avoid infinite hangs. + void doClientSide() throws Exception { + // Wait for server to get started. + while (!serverReady) { + Thread.sleep(50); + } + + // set up the environment for creating the initial context + Hashtable env = new Hashtable(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + env.put(Context.PROVIDER_URL, "ldap://localhost:" + serverPort); + env.put("com.sun.jndi.ldap.read.timeout", "1000"); + + // env.put(Context.SECURITY_AUTHENTICATION, "simple"); + // env.put(Context.SECURITY_PRINCIPAL,"cn=root"); + // env.put(Context.SECURITY_CREDENTIALS,"root"); + + // create initial context + DirContext context = new InitialDirContext(env); + + // searching + SearchControls scs = new SearchControls(); + scs.setSearchScope(SearchControls.SUBTREE_SCOPE); + + try { + NamingEnumeration answer = context.search( + "o=sun,c=us", "(&(cn=Bob)))", scs); + } catch (InvalidSearchFilterException isfe) { + // ignore, it is the expected filter exception. + System.out.println("Expected exception: " + isfe.getMessage()); + } catch (NamingException ne) { + // maybe a read timeout exception, as the server does not response. + throw new Exception("Expect a InvalidSearchFilterException", ne); + } + + try { + NamingEnumeration answer = context.search( + "o=sun,c=us", ")(&(cn=Bob)", scs); + } catch (InvalidSearchFilterException isfe) { + // ignore, it is the expected filter exception. + System.out.println("Expected exception: " + isfe.getMessage()); + } catch (NamingException ne) { + // maybe a read timeout exception, as the server does not response. + throw new Exception("Expect a InvalidSearchFilterException", ne); + } + + try { + NamingEnumeration answer = context.search( + "o=sun,c=us", "(&(cn=Bob))", scs); + } catch (InvalidSearchFilterException isfe) { + // ignore, it is the expected filter exception. + throw new Exception("Unexpected ISFE", isfe); + } catch (NamingException ne) { + // maybe a read timeout exception, as the server does not response. + System.out.println("Expected exception: " + ne.getMessage()); + } + + context.close(); + } + + /* + * ============================================================ + * The remainder is just support stuff + */ + + // client and server thread + Thread clientThread = null; + Thread serverThread = null; + + // client and server exceptions + volatile Exception serverException = null; + volatile Exception clientException = null; + + void startServer(boolean newThread) throws Exception { + if (newThread) { + serverThread = new Thread() { + public void run() { + try { + doServerSide(); + } catch (Exception e) { + /* + * Our server thread just died. + * + * Release the client, if not active already... + */ + System.err.println("Server died..."); + System.err.println(e); + serverReady = true; + serverException = e; + } + } + }; + serverThread.start(); + } else { + doServerSide(); + } + } + + void startClient(boolean newThread) throws Exception { + if (newThread) { + clientThread = new Thread() { + public void run() { + try { + doClientSide(); + } catch (Exception e) { + /* + * Our client thread just died. + */ + System.err.println("Client died..."); + clientException = e; + } + } + }; + clientThread.start(); + } else { + doClientSide(); + } + } + + // Primary constructor, used to drive remainder of the test. + BalancedParentheses() throws Exception { + if (separateServerThread) { + startServer(true); + startClient(false); + } else { + startClient(true); + startServer(false); + } + + /* + * Wait for other side to close down. + */ + if (separateServerThread) { + serverThread.join(); + } else { + clientThread.join(); + } + + /* + * When we get here, the test is pretty much over. + * + * If the main thread excepted, that propagates back + * immediately. If the other thread threw an exception, we + * should report back. + */ + if (serverException != null) { + System.out.print("Server Exception:"); + throw serverException; + } + if (clientException != null) { + System.out.print("Client Exception:"); + throw clientException; + } + } + + public static void main(String[] args) throws Exception { + // start the test + new BalancedParentheses(); + } + +} From 22fac524b1bafb3f4c3510db4dc43c03625e8091 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Mon, 27 Jul 2009 18:44:42 +0100 Subject: [PATCH 45/74] 6863864: (fs) Path.createSymbolicLink doesn't set directory flag when creating sym link to directory (win) Reviewed-by: sherman --- .../classes/sun/nio/fs/WindowsPath.java | 16 +++-- jdk/test/java/nio/file/Path/Links.java | 62 ++++++++++++++++++- 2 files changed, 70 insertions(+), 8 deletions(-) diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java b/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java index 029431faa0f..dcfc50e5956 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java @@ -1177,14 +1177,20 @@ class WindowsPath extends AbstractPath { /* * Windows treates symbolic links to directories differently than it - * does to other file types. For that reason we check if the exists and - * is a directory. + * does to other file types. For that reason we need to check if the + * target is a directory (or a directory junction). */ + WindowsPath resolvedTarget; + if (target.type == WindowsPathType.RELATIVE) { + WindowsPath parent = getParent(); + resolvedTarget = (parent == null) ? target : parent.resolve(target); + } else { + resolvedTarget = resolve(target); + } int flags = 0; - WindowsPath resolvedTarget = - WindowsPath.createFromNormalizedPath(getFileSystem(), resolve(target).path); try { - if (WindowsFileAttributes.get(resolvedTarget, true).isDirectory()) + WindowsFileAttributes wattrs = WindowsFileAttributes.get(resolvedTarget, false); + if (wattrs.isDirectory() || wattrs.isDirectoryLink()) flags |= SYMBOLIC_LINK_FLAG_DIRECTORY; } catch (WindowsException x) { // unable to access target so assume target is not a directory diff --git a/jdk/test/java/nio/file/Path/Links.java b/jdk/test/java/nio/file/Path/Links.java index a6f85beb7cd..8ffd89fb691 100644 --- a/jdk/test/java/nio/file/Path/Links.java +++ b/jdk/test/java/nio/file/Path/Links.java @@ -22,7 +22,7 @@ */ /* @test - * @bug 4313887 6838333 + * @bug 4313887 6838333 6863864 * @summary Unit test for java.nio.file.Path createSymbolicLink, * readSymbolicLink, and createLink methods * @library .. @@ -31,7 +31,6 @@ import java.nio.file.*; import java.nio.file.attribute.*; import java.io.*; -import java.util.*; public class Links { @@ -47,7 +46,7 @@ public class Links { * Exercise createSymbolicLink and readLink methods */ static void testSymLinks(Path dir) throws IOException { - Path link = dir.resolve("link"); + final Path link = dir.resolve("link"); // Check if sym links are supported try { @@ -76,6 +75,63 @@ public class Links { link.delete(); } } + + // Test links to directory + Path mydir = dir.resolve("mydir"); + Path myfile = mydir.resolve("myfile"); + try { + mydir.createDirectory(); + myfile.createFile(); + + // link -> "mydir" + link.createSymbolicLink(mydir.getName()); + assertTrue(link.readSymbolicLink().equals(mydir.getName())); + + // Test access to directory via link + DirectoryStream stream = link.newDirectoryStream(); + try { + boolean found = false; + for (Path entry: stream) { + if (entry.getName().equals(myfile.getName())) { + found = true; + break; + } + } + assertTrue(found); + } finally { + stream.close(); + } + + // Test link2 -> link -> mydir + final Path link2 = dir.resolve("link2"); + Path target2 = link.getName(); + link2.createSymbolicLink(target2); + try { + assertTrue(link2.readSymbolicLink().equals(target2)); + link2.newDirectoryStream().close(); + } finally { + link2.delete(); + } + + // Remove mydir and re-create link2 before re-creating mydir + // (This is a useful test on Windows to ensure that creating a + // sym link to a directory sym link creates the right type of link). + myfile.delete(); + mydir.delete(); + link2.createSymbolicLink(target2); + try { + assertTrue(link2.readSymbolicLink().equals(target2)); + mydir.createDirectory(); + link2.newDirectoryStream().close(); + } finally { + link2.delete(); + } + + } finally { + myfile.deleteIfExists(); + mydir.deleteIfExists(); + link.deleteIfExists(); + } } /** From 86a40825c74ce77036bb6922add1a73809996775 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Mon, 27 Jul 2009 18:46:50 +0100 Subject: [PATCH 46/74] 6863667: (ch) Several tests in java/nio/channels/* need to be updated after 6638712 Reviewed-by: mcimadamore --- .../AsynchronousChannelGroup/GroupOfOne.java | 8 +++--- .../AsynchronousChannelGroup/Identity.java | 8 +++--- .../AsynchronousChannelGroup/Restart.java | 2 +- .../AsynchronousChannelGroup/Unbounded.java | 4 +-- .../AsynchronousDatagramChannel/Basic.java | 22 +++++++-------- .../AsynchronousFileChannel/Basic.java | 8 +++--- .../Basic.java | 2 +- .../AsynchronousSocketChannel/Basic.java | 28 +++++++++---------- .../StressLoopback.java | 8 +++--- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java index b116245ceaf..4478c9bd851 100644 --- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java +++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/GroupOfOne.java @@ -44,9 +44,9 @@ public class GroupOfOne { final AsynchronousServerSocketChannel listener = AsynchronousServerSocketChannel.open() .bind(new InetSocketAddress(0)); - listener.accept(null, new CompletionHandler() { + listener.accept((Void)null, new CompletionHandler() { public void completed(AsynchronousSocketChannel ch, Void att) { - listener.accept(null, this); + listener.accept((Void)null, this); } public void failed(Throwable exc, Void att) { } @@ -81,13 +81,13 @@ public class GroupOfOne { // 2. the close/shutdown completes final CountDownLatch latch = new CountDownLatch(2); - ch.connect(sa, null, new CompletionHandler() { + ch.connect(sa, (Void)null, new CompletionHandler() { public void completed(Void result, Void att) { System.out.println("Connected"); // initiate I/O operation that does not complete (successfully) ByteBuffer buf = ByteBuffer.allocate(100); - ch.read(buf, null, new CompletionHandler() { + ch.read(buf, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { throw new RuntimeException(); } diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java index f41c12c807f..6214df2e1f5 100644 --- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java +++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java @@ -78,15 +78,15 @@ public class Identity { final AsynchronousServerSocketChannel listener = AsynchronousServerSocketChannel.open() .bind(new InetSocketAddress(0)); - listener.accept(null, new CompletionHandler() { + listener.accept((Void)null, new CompletionHandler() { public void completed(final AsynchronousSocketChannel ch, Void att) { - listener.accept(null, this); + listener.accept((Void)null, this); final ByteBuffer buf = ByteBuffer.allocate(100); - ch.read(buf, null, new CompletionHandler() { + ch.read(buf, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { buf.clear(); - ch.read(buf, null, this); + ch.read(buf, (Void)null, this); } public void failed(Throwable exc, Void att) { } diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java index 567321e3008..f2132270e50 100644 --- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java +++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java @@ -94,7 +94,7 @@ public class Restart { for (int i=0; i() { + listener.accept((Void)null, new CompletionHandler() { public void completed(AsynchronousSocketChannel ch, Void att) { try { ch.close(); diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java index f615c3c5063..f77f2fc3c2d 100644 --- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java +++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java @@ -45,10 +45,10 @@ public class Unbounded { final AsynchronousServerSocketChannel listener = AsynchronousServerSocketChannel.open() .bind(new InetSocketAddress(0)); - listener.accept(null, new CompletionHandler() { + listener.accept((Void)null, new CompletionHandler() { public void completed(AsynchronousSocketChannel ch, Void att) { queue.add(ch); - listener.accept(null, this); + listener.accept((Void)null, this); } public void failed(Throwable exc, Void att) { } diff --git a/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java index 5ed3d83a90d..f90800f392d 100644 --- a/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousDatagramChannel/Basic.java @@ -66,7 +66,7 @@ public class Basic { // Test: datagram packet not received immediately dst.clear(); final CountDownLatch latch = new CountDownLatch(1); - ch.receive(dst, null, new CompletionHandler() { + ch.receive(dst, (Void)null, new CompletionHandler() { public void completed(SocketAddress source, Void att) { latch.countDown(); } @@ -82,7 +82,7 @@ public class Basic { // Test: timeout dst.clear(); final AtomicReference exception = new AtomicReference(); - ch.receive(dst, 2, TimeUnit.SECONDS, null, new CompletionHandler() { + ch.receive(dst, 2, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(SocketAddress source, Void att) { } public void failed (Throwable exc, Void att) { @@ -101,7 +101,7 @@ public class Basic { // AsynchronousCloseException dst = ByteBuffer.allocateDirect(100); exception.set(null); - ch.receive(dst, null, new CompletionHandler() { + ch.receive(dst, (Void)null, new CompletionHandler() { public void completed(SocketAddress source, Void att) { } public void failed (Throwable exc, Void att) { @@ -156,7 +156,7 @@ public class Basic { // Test: datagram packet not received immediately dst.clear(); final CountDownLatch l1 = new CountDownLatch(1); - ch.read(dst, null, new CompletionHandler() { + ch.read(dst, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { l1.countDown(); } @@ -172,7 +172,7 @@ public class Basic { // Test: timeout dst.clear(); final AtomicReference exception = new AtomicReference(); - ch.read(dst, 2, TimeUnit.SECONDS, null, new CompletionHandler() { + ch.read(dst, 2, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { } public void failed (Throwable exc, Void att) { @@ -191,7 +191,7 @@ public class Basic { // AsynchronousCloseException dst.clear(); exception.set(null); - ch.read(dst, null, new CompletionHandler() { + ch.read(dst, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { } public void failed (Throwable exc, Void att) { @@ -238,7 +238,7 @@ public class Basic { // Test: send datagram packet to reader and check completion handler // is invoked final CountDownLatch l2 = new CountDownLatch(1); - ch.send(ByteBuffer.wrap(msg), sa, null, new CompletionHandler() { + ch.send(ByteBuffer.wrap(msg), sa, (Void)null, new CompletionHandler() { public void completed(Integer bytesSent, Void att) { if (bytesSent != msg.length) throw new RuntimeException("Unexpected number of bytes received"); @@ -261,7 +261,7 @@ public class Basic { // Test: check that failed method is invoked ch.close(); final CountDownLatch l3 = new CountDownLatch(1); - ch.send(ByteBuffer.wrap(msg), sa, null, new CompletionHandler() { + ch.send(ByteBuffer.wrap(msg), sa, (Void)null, new CompletionHandler() { public void completed(Integer bytesSent, Void att) { throw new RuntimeException("completed method invoked"); } @@ -315,7 +315,7 @@ public class Basic { // Test: write datagram and check completion handler is invoked final CountDownLatch l2 = new CountDownLatch(1); - ch.write(ByteBuffer.wrap(msg), null, new CompletionHandler() { + ch.write(ByteBuffer.wrap(msg), (Void)null, new CompletionHandler() { public void completed(Integer bytesSent, Void att) { if (bytesSent != msg.length) throw new RuntimeException("Unexpected number of bytes received"); @@ -372,7 +372,7 @@ public class Basic { final CountDownLatch latch = new CountDownLatch(1); long timeout = (i == 0) ? 0L : 60L; Future remote = ch - .receive(ByteBuffer.allocate(100), timeout, TimeUnit.SECONDS, null, + .receive(ByteBuffer.allocate(100), timeout, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(SocketAddress source, Void att) { } @@ -395,7 +395,7 @@ public class Basic { final CountDownLatch latch = new CountDownLatch(1); long timeout = (i == 0) ? 0L : 60L; Future result = ch - .read(ByteBuffer.allocate(100), timeout, TimeUnit.SECONDS, null, + .read(ByteBuffer.allocate(100), timeout, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(Integer bytesRead, Void att) { } diff --git a/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java index 1f37d4be11c..92241536642 100644 --- a/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java @@ -190,7 +190,7 @@ public class Basic { if (fl == null) throw new RuntimeException("Unable to acquire lock"); try { - ch.lock(null, new CompletionHandler () { + ch.lock((Void)null, new CompletionHandler () { public void completed(FileLock result, Void att) { } public void failed(Throwable exc, Void att) { @@ -217,7 +217,7 @@ public class Basic { ByteBuffer buf = ByteBuffer.allocateDirect(100); final CountDownLatch latch = new CountDownLatch(1); - ch.read(buf, 0L, null, new CompletionHandler() { + ch.read(buf, 0L, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { try { Thread.currentThread().interrupt(); @@ -311,7 +311,7 @@ public class Basic { final AtomicReference invoker = new AtomicReference(); final CountDownLatch latch = new CountDownLatch(1); - ch.write(genBuffer(), 0L, null, new CompletionHandler() { + ch.write(genBuffer(), 0L, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { invoker.set(Thread.currentThread()); latch.countDown(); @@ -410,7 +410,7 @@ public class Basic { // start write operation final CountDownLatch latch = new CountDownLatch(1); - Future res = ch.write(genBuffer(), 0L, null, + Future res = ch.write(genBuffer(), 0L, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { } diff --git a/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java index e0965fb6e74..e648b78a911 100644 --- a/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java @@ -95,7 +95,7 @@ public class Basic { final AtomicReference exception = new AtomicReference(); // start accepting - listener.accept(null, new CompletionHandler() { + listener.accept((Void)null, new CompletionHandler() { public void completed(AsynchronousSocketChannel ch, Void att) { try { ch.close(); diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java index 8b140f17bbf..3c04635312b 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java @@ -181,7 +181,7 @@ public class Basic { } final AtomicReference connectException = new AtomicReference(); - ch.connect(server.address(), null, new CompletionHandler() { + ch.connect(server.address(), (Void)null, new CompletionHandler() { public void completed(Void result, Void att) { } public void failed(Throwable exc, Void att) { @@ -332,7 +332,7 @@ public class Basic { // start read operation final CountDownLatch latch = new CountDownLatch(1); ByteBuffer buf = ByteBuffer.allocate(1); - Future res = ch.read(buf, null, + Future res = ch.read(buf, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { } @@ -397,11 +397,11 @@ public class Basic { // reads should complete immediately final ByteBuffer dst = ByteBuffer.allocateDirect(src.capacity() + 100); final CountDownLatch latch = new CountDownLatch(1); - ch.read(dst, null, new CompletionHandler() { + ch.read(dst, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { int n = result; if (n > 0) { - ch.read(dst, null, this); + ch.read(dst, (Void)null, this); } else { latch.countDown(); } @@ -450,10 +450,10 @@ public class Basic { // read until the buffer is full final ByteBuffer dst = ByteBuffer.allocateDirect(src.capacity()); final CountDownLatch latch = new CountDownLatch(1); - ch.read(dst, null, new CompletionHandler() { + ch.read(dst, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { if (dst.hasRemaining()) { - ch.read(dst, null, this); + ch.read(dst, (Void)null, this); } else { latch.countDown(); } @@ -508,7 +508,7 @@ public class Basic { // scattering read that completes ascynhronously final CountDownLatch latch = new CountDownLatch(1); - ch.read(dsts, 0, dsts.length, 0L, TimeUnit.SECONDS, null, + ch.read(dsts, 0, dsts.length, 0L, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(Long result, Void att) { long n = result; @@ -536,7 +536,7 @@ public class Basic { dsts[i].rewind(); } long n = ch - .read(dsts, 0, dsts.length, 0L, TimeUnit.SECONDS, null, null).get(); + .read(dsts, 0, dsts.length, 0L, TimeUnit.SECONDS, (Void)null, null).get(); if (n <= 0) throw new RuntimeException("No bytes read"); @@ -562,10 +562,10 @@ public class Basic { // write all bytes and close connection when done final ByteBuffer src = genBuffer(); - ch.write(src, null, new CompletionHandler() { + ch.write(src, (Void)null, new CompletionHandler() { public void completed(Integer result, Void att) { if (src.hasRemaining()) { - ch.write(src, null, this); + ch.write(src, (Void)null, this); } else { try { ch.close(); @@ -616,7 +616,7 @@ public class Basic { // write buffers (should complete immediately) ByteBuffer[] srcs = genBuffers(1); long n = ch - .write(srcs, 0, srcs.length, 0L, TimeUnit.SECONDS, null, null).get(); + .write(srcs, 0, srcs.length, 0L, TimeUnit.SECONDS, (Void)null, null).get(); if (n <= 0) throw new RuntimeException("No bytes written"); @@ -629,7 +629,7 @@ public class Basic { // write until socket buffer is full so as to create the conditions // for when a write does not complete immediately srcs = genBuffers(1); - ch.write(srcs, 0, srcs.length, 0L, TimeUnit.SECONDS, null, + ch.write(srcs, 0, srcs.length, 0L, TimeUnit.SECONDS, (Void)null, new CompletionHandler() { public void completed(Long result, Void att) { long n = result; @@ -639,7 +639,7 @@ public class Basic { if (continueWriting.get()) { ByteBuffer[] srcs = genBuffers(8); ch.write(srcs, 0, srcs.length, 0L, TimeUnit.SECONDS, - null, this); + (Void)null, this); } } public void failed(Throwable exc, Void att) { @@ -717,7 +717,7 @@ public class Basic { // this read should timeout ByteBuffer dst = ByteBuffer.allocate(512); try { - ch.read(dst, 3, TimeUnit.SECONDS, null, null).get(); + ch.read(dst, 3, TimeUnit.SECONDS, (Void)null, null).get(); throw new RuntimeException("Read did not timeout"); } catch (ExecutionException x) { if (!(x.getCause() instanceof InterruptedByTimeoutException)) diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java index d3426ba08c0..a3c0db687e6 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java @@ -99,7 +99,7 @@ public class StressLoopback { void start() { sentBuffer.position(0); sentBuffer.limit(sentBuffer.capacity()); - channel.write(sentBuffer, null, new CompletionHandler () { + channel.write(sentBuffer, (Void)null, new CompletionHandler () { public void completed(Integer nwrote, Void att) { bytesSent += nwrote; if (finished) { @@ -107,7 +107,7 @@ public class StressLoopback { } else { sentBuffer.position(0); sentBuffer.limit(sentBuffer.capacity()); - channel.write(sentBuffer, null, this); + channel.write(sentBuffer, (Void)null, this); } } public void failed(Throwable exc, Void att) { @@ -142,14 +142,14 @@ public class StressLoopback { } void start() { - channel.read(readBuffer, null, new CompletionHandler () { + channel.read(readBuffer, (Void)null, new CompletionHandler () { public void completed(Integer nread, Void att) { if (nread < 0) { closeUnchecked(channel); } else { bytesRead += nread; readBuffer.clear(); - channel.read(readBuffer, null, this); + channel.read(readBuffer, (Void)null, this); } } public void failed(Throwable exc, Void att) { From 19093784f481dac9996c9683ae3c817fd0f8b264 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Mon, 27 Jul 2009 19:22:11 +0100 Subject: [PATCH 47/74] 6864319: (fs) Eliminate static dependency on fdopendir (lnx) Reviewed-by: martin --- .../native/sun/nio/fs/UnixNativeDispatcher.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c index 6f55bbed069..a39f10df40a 100644 --- a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c +++ b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c @@ -85,19 +85,21 @@ static jfieldID entry_options; static jfieldID entry_dev; /** - * System calls that may not be available at build time. + * System calls that may not be available at run time. */ typedef int openat64_func(int, const char *, int, ...); typedef int fstatat64_func(int, const char *, struct stat64 *, int); typedef int unlinkat_func(int, const char*, int); typedef int renameat_func(int, const char*, int, const char*); typedef int futimesat_func(int, const char *, const struct timeval *); +typedef DIR* fdopendir_func(int); static openat64_func* my_openat64_func = NULL; static fstatat64_func* my_fstatat64_func = NULL; static unlinkat_func* my_unlinkat_func = NULL; static renameat_func* my_renameat_func = NULL; static futimesat_func* my_futimesat_func = NULL; +static fdopendir_func* my_fdopendir_func = NULL; /** * fstatat missing from glibc on Linux. Temporary workaround @@ -183,7 +185,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this) entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B"); entry_dev = (*env)->GetFieldID(env, clazz, "dev", "J"); - /* system calls that might not be available at build time */ + /* system calls that might not be available at run time */ #if defined(__solaris__) && defined(_LP64) /* Solaris 64-bit does not have openat64/fstatat64 */ @@ -196,6 +198,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this) my_unlinkat_func = (unlinkat_func*) dlsym(RTLD_DEFAULT, "unlinkat"); my_renameat_func = (renameat_func*) dlsym(RTLD_DEFAULT, "renameat"); my_futimesat_func = (futimesat_func*) dlsym(RTLD_DEFAULT, "futimesat"); + my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir"); #if defined(FSTATAT64_SYSCALL_AVAILABLE) /* fstatat64 missing from glibc */ @@ -205,7 +208,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this) if (my_openat64_func != NULL && my_fstatat64_func != NULL && my_unlinkat_func != NULL && my_renameat_func != NULL && - my_futimesat_func != NULL) + my_futimesat_func != NULL && my_fdopendir_func != NULL) { flags |= sun_nio_fs_UnixNativeDispatcher_HAS_AT_SYSCALLS; } @@ -565,8 +568,13 @@ JNIEXPORT jlong JNICALL Java_sun_nio_fs_UnixNativeDispatcher_fdopendir(JNIEnv* env, jclass this, int dfd) { DIR* dir; + if (my_fdopendir_func == NULL) { + JNU_ThrowInternalError(env, "should not reach here"); + return (jlong)-1; + } + /* EINTR not listed as a possible error */ - dir = fdopendir((int)dfd); + dir = (*my_fdopendir_func)((int)dfd); if (dir == NULL) { throwUnixException(env, errno); } From a7e89dff0e237f0055d4b16edb554bfb959f6379 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:19:11 -0700 Subject: [PATCH 48/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- make/README.pre-components | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/README.pre-components b/make/README.pre-components index 8d2eab571cb..cb79e68df27 100644 --- a/make/README.pre-components +++ b/make/README.pre-components @@ -18,7 +18,7 @@ The make/makefile rules are: ALT_LANGTOOLS_DIST The dist area from a langtools build to use, if provided ALT_OUTPUTDIR Parent dir of build and dist directories, if provided VARIANT If DBG, debug build, if OPT, optimized build - TARGET_CLASS_VERSION The classfile version number (currently 5) + TARGET_CLASS_VERSION The classfile version number (currently 7) ANT_HOME Home of ant to use, if provided QUIET If defined, be quiet VERBOSE If defined, be verbose From 103e820d941781b4beeb00d84b4edb2a368e4e8e Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:19:26 -0700 Subject: [PATCH 49/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- corba/make/Makefile | 2 +- corba/make/common/shared/Defs-java.gmk | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/corba/make/Makefile b/corba/make/Makefile index 1cd81c90ab0..8241b33baf9 100644 --- a/corba/make/Makefile +++ b/corba/make/Makefile @@ -110,7 +110,7 @@ BOOTSTRAP_TARGET_LEVEL = 5 ifdef TARGET_CLASS_VERSION TARGET_LEVEL = $(TARGET_CLASS_VERSION) else - TARGET_LEVEL = 6 + TARGET_LEVEL = 7 endif ifndef TARGET_JAVA diff --git a/corba/make/common/shared/Defs-java.gmk b/corba/make/common/shared/Defs-java.gmk index f80f0ffa4e1..a9c65959ebd 100644 --- a/corba/make/common/shared/Defs-java.gmk +++ b/corba/make/common/shared/Defs-java.gmk @@ -107,12 +107,12 @@ endif NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS) -# Add the source level (currently all source is 1.5, should this be 1.6?) -LANGUAGE_VERSION = -source 1.5 +# Add the source level +LANGUAGE_VERSION = -source 7 JAVACFLAGS += $(LANGUAGE_VERSION) -# Add the class version we want (currently this is 5, should it be 6 or even 7?) -TARGET_CLASS_VERSION = 5 +# Add the class version we want +TARGET_CLASS_VERSION = 7 CLASS_VERSION = -target $(TARGET_CLASS_VERSION) JAVACFLAGS += $(CLASS_VERSION) JAVACFLAGS += -encoding ascii From 8ae07c63e4f3aac4f943e00518baa05d3f4992a7 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:19:33 -0700 Subject: [PATCH 50/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- jaxp/make/build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jaxp/make/build.properties b/jaxp/make/build.properties index ed598102aa9..a7d8d0670fe 100644 --- a/jaxp/make/build.properties +++ b/jaxp/make/build.properties @@ -30,8 +30,8 @@ # one of the standard user build.properties files (see build.xml) # options for the tasks used to compile the tools -javac.source = 5 -javac.target = 5 +javac.source = 7 +javac.target = 7 javac.debug = true javac.no.jdk.warnings = -XDignore.symbol.file=true # set the following to -version to verify the versions of javac being used From 33e236c76603e48d57e874a6feba0dc41ba2796c Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:19:44 -0700 Subject: [PATCH 51/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- jaxws/make/build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jaxws/make/build.properties b/jaxws/make/build.properties index ed598102aa9..a7d8d0670fe 100644 --- a/jaxws/make/build.properties +++ b/jaxws/make/build.properties @@ -30,8 +30,8 @@ # one of the standard user build.properties files (see build.xml) # options for the tasks used to compile the tools -javac.source = 5 -javac.target = 5 +javac.source = 7 +javac.target = 7 javac.debug = true javac.no.jdk.warnings = -XDignore.symbol.file=true # set the following to -version to verify the versions of javac being used From 50dfd0ebd98443d4382cf7460d5b0a87e2d5edbf Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:19:55 -0700 Subject: [PATCH 52/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- jdk/make/common/shared/Defs-control.gmk | 4 ++-- jdk/make/common/shared/Defs-java.gmk | 8 ++++---- jdk/make/java/dyn/Makefile | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jdk/make/common/shared/Defs-control.gmk b/jdk/make/common/shared/Defs-control.gmk index 9c62bf6f7e0..565cbbaa156 100644 --- a/jdk/make/common/shared/Defs-control.gmk +++ b/jdk/make/common/shared/Defs-control.gmk @@ -92,9 +92,9 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp dummy := $(shell $(MKDIR) -p $(TEMP_DIR)) # The language version we want for this jdk build -SOURCE_LANGUAGE_VERSION=5 +SOURCE_LANGUAGE_VERSION=7 # The class version we want for this jdk build -TARGET_CLASS_VERSION=5 +TARGET_CLASS_VERSION=7 # The MESSAGE, WARNING and ERROR files are used to store sanity check and # source check messages, warnings and errors. diff --git a/jdk/make/common/shared/Defs-java.gmk b/jdk/make/common/shared/Defs-java.gmk index 16db68b1113..9d918af877d 100644 --- a/jdk/make/common/shared/Defs-java.gmk +++ b/jdk/make/common/shared/Defs-java.gmk @@ -122,13 +122,13 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true) JAVACFLAGS += -Werror endif -# Add the source level (currently all source is 1.5, should this be 1.6?) -SOURCE_LANGUAGE_VERSION = 5 +# Add the source level +SOURCE_LANGUAGE_VERSION = 7 LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION) JAVACFLAGS += $(LANGUAGE_VERSION) -# Add the class version we want (currently this is 5, should it be 6 or even 7?) -TARGET_CLASS_VERSION = 5 +# Add the class version we want +TARGET_CLASS_VERSION = 7 CLASS_VERSION = -target $(TARGET_CLASS_VERSION) JAVACFLAGS += $(CLASS_VERSION) JAVACFLAGS += -encoding ascii diff --git a/jdk/make/java/dyn/Makefile b/jdk/make/java/dyn/Makefile index 00cc225f4d0..5ae0b5056e4 100644 --- a/jdk/make/java/dyn/Makefile +++ b/jdk/make/java/dyn/Makefile @@ -33,8 +33,8 @@ AUTO_FILES_JAVA_DIRS = java/dyn sun/dyn # The sources built here use new language syntax to generate # method handle calls. Let's be sure we are using that format. -#LANGUAGE_VERSION = -source 7 -#CLASS_VERSION = -target 7 +LANGUAGE_VERSION = -source 7 +CLASS_VERSION = -target 7 # Actually, it will be less disruptive to compile with the same # -target option as the rest of the system, and just turn on From b84cd5a9cdbf18a6d24d339c3351c36831b7db09 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 15:20:03 -0700 Subject: [PATCH 53/74] 6854244: change source/target used to compile JDK to 7 Reviewed-by: ohair --- langtools/make/build.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langtools/make/build.properties b/langtools/make/build.properties index 53dd569ebd6..0782dda6cdd 100644 --- a/langtools/make/build.properties +++ b/langtools/make/build.properties @@ -60,8 +60,8 @@ full.version = ${release}-${build.number} bootstrap.full.version = ${bootstrap.release}-${build.number} # options for the tasks used to compile the tools -javac.source = 5 -javac.target = 5 +javac.source = 7 +javac.target = 7 javac.debug = true javac.debuglevel = source,lines javac.no.jdk.warnings = -XDignore.symbol.file=true From 2a737b4aa9b8c55ea422f5a26a04185c936c5b5f Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 27 Jul 2009 19:52:42 -0700 Subject: [PATCH 54/74] 6865399: some javac files are missing Sun internal API comment Reviewed-by: darcy --- .../com/sun/tools/javac/api/DiagnosticFormatter.java | 5 +++++ .../classes/com/sun/tools/javac/api/Formattable.java | 5 +++++ .../share/classes/com/sun/tools/javac/api/Messages.java | 5 +++++ .../share/classes/com/sun/tools/javac/code/BoundKind.java | 8 +++++++- .../share/classes/com/sun/tools/javac/code/Printer.java | 5 +++++ .../classes/com/sun/tools/javac/file/BaseFileObject.java | 6 ++++++ .../classes/com/sun/tools/javac/file/CacheFSInfo.java | 7 ++++++- .../share/classes/com/sun/tools/javac/file/FSInfo.java | 5 +++++ .../com/sun/tools/javac/file/JavacFileManager.java | 5 +++++ .../com/sun/tools/javac/file/RegularFileObject.java | 5 +++++ .../classes/com/sun/tools/javac/file/RelativePath.java | 5 +++++ .../classes/com/sun/tools/javac/file/SymbolArchive.java | 6 ++++++ .../classes/com/sun/tools/javac/file/ZipArchive.java | 6 ++++++ .../classes/com/sun/tools/javac/file/ZipFileIndex.java | 5 +++++ .../com/sun/tools/javac/file/ZipFileIndexArchive.java | 6 ++++++ .../classes/com/sun/tools/javac/parser/ParserFactory.java | 5 +++++ .../sun/tools/javac/util/AbstractDiagnosticFormatter.java | 4 ++++ .../sun/tools/javac/util/BasicDiagnosticFormatter.java | 5 +++++ .../tools/javac/util/ForwardingDiagnosticFormatter.java | 5 +++++ .../com/sun/tools/javac/util/RawDiagnosticFormatter.java | 5 +++++ .../com/sun/tools/javac/util/RichDiagnosticFormatter.java | 5 +++++ .../share/classes/com/sun/tools/javac/util/Warner.java | 8 ++++---- 22 files changed, 115 insertions(+), 6 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java index 576a1687f89..aaa25d81c42 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java @@ -32,6 +32,11 @@ import com.sun.tools.javac.api.DiagnosticFormatter.*; /** * Provides simple functionalities for javac diagnostic formatting. * @param type of diagnostic handled by this formatter + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public interface DiagnosticFormatter> { diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java b/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java index e2a381f9f29..c942a63f945 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java +++ b/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java @@ -31,6 +31,11 @@ import java.util.Locale; * This interface must be implemented by any javac class that has non-trivial * formatting needs (e.g. where toString() does not apply because of localization). * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + * * @author Maurizio Cimadamore */ public interface Formattable { diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java b/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java index ad76d6ce794..290d316ab38 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java +++ b/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java @@ -32,6 +32,11 @@ import java.util.MissingResourceException; * This interface defines the minimum requirements in order to provide support * for localized formatted strings. * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + * * @author Maurizio Cimadamore */ public interface Messages { diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java b/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java index e190f5d645b..89932ff5202 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java @@ -25,7 +25,13 @@ package com.sun.tools.javac.code; - +/** + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + */ public enum BoundKind { EXTENDS("? extends "), SUPER("? super "), diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java index 2447ac585dc..baa490954b3 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java @@ -40,6 +40,11 @@ import static com.sun.tools.javac.code.Flags.*; /** * A combined type/symbol visitor for generating non-trivial localized string * representation of types and symbols. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public abstract class Printer implements Type.Visitor, Symbol.Visitor { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java index e66ae933efe..ce2736e5556 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java @@ -36,6 +36,12 @@ import javax.tools.JavaFileObject; import static javax.tools.JavaFileObject.Kind.*; +/** + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. +*/ public abstract class BaseFileObject implements JavaFileObject { protected BaseFileObject(JavacFileManager fileManager) { this.fileManager = fileManager; diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java b/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java index 9cd55db589a..cdd091471b9 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java @@ -34,7 +34,12 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** - * Caching implementation of FSInfo + * Caching implementation of FSInfo. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class CacheFSInfo extends FSInfo { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java b/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java index 840757a5c0d..cfe0dae5066 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java @@ -16,6 +16,11 @@ import com.sun.tools.javac.util.Context; /** * Get meta-info about files. Default direct (non-caching) implementation. * @see CacheFSInfo + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class FSInfo { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java index d8ccc0211fd..3ea1978b3ef 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -82,6 +82,11 @@ import static com.sun.tools.javac.main.OptionName.*; /** * This class provides access to the source, class and other files * used by the compiler and related tools. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class JavacFileManager implements StandardJavaFileManager { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java index c604134cab1..6b55187091f 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java @@ -42,6 +42,11 @@ import javax.tools.JavaFileObject; /** * A subclass of JavaFileObject representing regular files. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ class RegularFileObject extends BaseFileObject { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java b/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java index 92cc8862193..d661f447423 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java @@ -34,6 +34,11 @@ import javax.tools.JavaFileObject; * Used to represent a platform-neutral path within a platform-specific * container, such as a directory or zip file. * Internally, the file separator is always '/'. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public abstract class RelativePath implements Comparable { /** diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java index 89c9a236706..70688db8402 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java @@ -35,6 +35,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeDirectory; import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. +*/ public class SymbolArchive extends ZipArchive { final File origFile; diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java index 9af25f7788b..63f0dd158ef 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java @@ -48,6 +48,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeDirectory; import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + */ public class ZipArchive implements Archive { public ZipArchive(JavacFileManager fm, ZipFile zdir) throws IOException { diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java index 8a7f6508c4f..f39359992a1 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java @@ -67,6 +67,11 @@ import com.sun.tools.javac.file.RelativePath.RelativeFile; * If nonBatchMode option is specified (-XDnonBatchMode) the compiler will use timestamp * checking to reindex the zip files if it is needed. In batch mode the timestamps are not checked * and the compiler uses the cached indexes. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class ZipFileIndex { private static final String MIN_CHAR = String.valueOf(Character.MIN_VALUE); diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java index 4ed00d119e4..458910e8928 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java +++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java @@ -44,6 +44,12 @@ import com.sun.tools.javac.file.RelativePath.RelativeDirectory; import com.sun.tools.javac.file.RelativePath.RelativeFile; import com.sun.tools.javac.util.List; +/** + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. + */ public class ZipFileIndexArchive implements Archive { private final ZipFileIndex zfIndex; diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java b/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java index 861f3e5d3ca..70588366e46 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java @@ -34,6 +34,11 @@ import com.sun.tools.javac.util.Options; /** * A factory for creating parsers. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class ParserFactory { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java index d8578ec711d..db7b273e277 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java @@ -57,6 +57,10 @@ import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*; *

  • Provides the formatting logic for rendering the arguments of a JCDiagnostic object. *
      * + *

      This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java index 77063af34a2..a4442dbff53 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java @@ -57,6 +57,11 @@ import static com.sun.tools.javac.util.LayoutCharacters.*; *

    • %m: the text or the diagnostic, including any appropriate arguments *
    • %_: space delimiter, useful for formatting purposes *
    + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java index aca7fd105e0..f989e38365e 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java @@ -37,6 +37,11 @@ import com.sun.tools.javac.api.DiagnosticFormatter.PositionKind; /** * A delegated diagnostic formatter delegates all formatting * actions to an underlying formatter (aka the delegated formatter). + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class ForwardingDiagnosticFormatter, F extends DiagnosticFormatter> implements DiagnosticFormatter { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java index 13674e2e7d2..f9e5126ea21 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java @@ -39,6 +39,11 @@ import static com.sun.tools.javac.api.DiagnosticFormatter.PositionKind.*; * The raw formatter will format a diagnostic according to one of two format patterns, depending on whether * or not the source name and position are set. This formatter provides a standardized, localize-independent * implementation of a diagnostic formatter; as such, this formatter is best suited for testing purposes. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public final class RawDiagnosticFormatter extends AbstractDiagnosticFormatter { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index 60e323f7bda..0996c42f715 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -58,6 +58,11 @@ import static com.sun.tools.javac.util.RichDiagnosticFormatter.RichConfiguration * formatted and (iii) type-variable disambiguation - when the diagnostic refers * to two different type-variables with the same name, their representation is * disambiguated by appending an index to the type variable name. + * + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class RichDiagnosticFormatter extends ForwardingDiagnosticFormatter { diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java b/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java index 4d739417382..ea9054c3ff0 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java @@ -31,10 +31,10 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; * An interface to support optional warnings, needed for support of * unchecked conversions and unchecked casts. * - *

    Nothing described in this source file is part of any supported - * API. If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice. + *

    This is NOT part of any API supported by Sun Microsystems. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice. */ public class Warner { public static final Warner noWarnings = new Warner(); From e364d187eafbb0333ec7b03d48a8e1b47e09f98e Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Tue, 28 Jul 2009 11:15:49 +0800 Subject: [PATCH 55/74] 6865482: test case BalancedParentheses.java is missing GPL header Reviewed-by: weijun --- .../sun/jndi/ldap/BalancedParentheses.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java b/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java index 60bb7275677..2053aba7e05 100644 --- a/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java +++ b/jdk/test/com/sun/jndi/ldap/BalancedParentheses.java @@ -1,3 +1,26 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + /** * @test * @bug 6449574 From 10a6d2437a31d33f43f8f2c13e49d0234e9a280a Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:34 -0700 Subject: [PATCH 56/74] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- make/deploy-rules.gmk | 2 +- make/jprt.properties | 2 +- make/sanity-rules.gmk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk index 2884601bb33..afec0ea267a 100644 --- a/make/deploy-rules.gmk +++ b/make/deploy-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/make/jprt.properties b/make/jprt.properties index 7f2fffd0a2d..b451b0f25d9 100644 --- a/make/jprt.properties +++ b/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. 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 diff --git a/make/sanity-rules.gmk b/make/sanity-rules.gmk index 2119af3b0e4..5d2a7adb84d 100644 --- a/make/sanity-rules.gmk +++ b/make/sanity-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2001-2009 Sun Microsystems, Inc. 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 From f3605fc37cfc14a82b088680764bdd4a5b391448 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:36 -0700 Subject: [PATCH 57/74] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- corba/make/Makefile | 2 +- corba/make/common/Library.gmk | 2 +- corba/make/common/Rules.gmk | 2 +- corba/make/common/shared/Compiler-gcc.gmk | 2 +- corba/make/common/shared/Defs-java.gmk | 2 +- corba/make/common/shared/Defs-windows.gmk | 2 +- corba/make/common/shared/Platform.gmk | 2 +- corba/make/jprt.properties | 2 +- corba/make/org/omg/idl/Makefile | 2 +- corba/make/tools/logutil/Makefile | 2 +- .../com/sun/corba/se/impl/encoding/BufferManagerReadStream.java | 2 +- .../classes/com/sun/corba/se/impl/io/ObjectStreamClass.java | 2 +- .../share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java | 2 +- corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java | 2 +- .../share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java | 2 +- .../share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java | 2 +- .../corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java | 2 +- .../com/sun/corba/se/impl/resolver/INSURLOperationImpl.java | 2 +- .../corba/se/impl/transport/SocketOrChannelConnectionImpl.java | 2 +- .../share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/first.set | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp | 2 +- .../src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp | 2 +- .../sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp | 2 +- .../sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp | 2 +- .../tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp | 2 +- .../src/share/classes/com/sun/tools/corba/se/logutil/Input.java | 2 +- .../share/classes/com/sun/tools/corba/se/logutil/InputCode.java | 2 +- .../classes/com/sun/tools/corba/se/logutil/InputException.java | 2 +- corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java | 2 +- corba/src/share/classes/org/omg/CORBA/ORB.java | 2 +- corba/src/windows/resource/version.rc | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) diff --git a/corba/make/Makefile b/corba/make/Makefile index 1cd81c90ab0..0ca13f6c3ab 100644 --- a/corba/make/Makefile +++ b/corba/make/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2007-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/Library.gmk b/corba/make/common/Library.gmk index 49de4c64457..d0671c9a36f 100644 --- a/corba/make/common/Library.gmk +++ b/corba/make/common/Library.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/Rules.gmk b/corba/make/common/Rules.gmk index aa674a9bd95..0598f08df88 100644 --- a/corba/make/common/Rules.gmk +++ b/corba/make/common/Rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/shared/Compiler-gcc.gmk b/corba/make/common/shared/Compiler-gcc.gmk index c8e6779ffd6..5fc30edb995 100644 --- a/corba/make/common/shared/Compiler-gcc.gmk +++ b/corba/make/common/shared/Compiler-gcc.gmk @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/shared/Defs-java.gmk b/corba/make/common/shared/Defs-java.gmk index f80f0ffa4e1..44764bdc8b6 100644 --- a/corba/make/common/shared/Defs-java.gmk +++ b/corba/make/common/shared/Defs-java.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/shared/Defs-windows.gmk b/corba/make/common/shared/Defs-windows.gmk index d78f7f7293e..3e1fad1226a 100644 --- a/corba/make/common/shared/Defs-windows.gmk +++ b/corba/make/common/shared/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/common/shared/Platform.gmk b/corba/make/common/shared/Platform.gmk index 428ff67b791..18f3aa330ec 100644 --- a/corba/make/common/shared/Platform.gmk +++ b/corba/make/common/shared/Platform.gmk @@ -1,5 +1,5 @@ # -# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/jprt.properties b/corba/make/jprt.properties index 50a286b77d3..928f5998a4c 100644 --- a/corba/make/jprt.properties +++ b/corba/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/org/omg/idl/Makefile b/corba/make/org/omg/idl/Makefile index d83fbdc2bb5..26c14039c15 100644 --- a/corba/make/org/omg/idl/Makefile +++ b/corba/make/org/omg/idl/Makefile @@ -1,5 +1,5 @@ # -# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/make/tools/logutil/Makefile b/corba/make/tools/logutil/Makefile index 2e19867f8d4..97472913b7e 100644 --- a/corba/make/tools/logutil/Makefile +++ b/corba/make/tools/logutil/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java index c57942f0da1..cbdf76ff2f9 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java index b23049c08bc..50caa525af3 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java index c0cb1d8c100..0376fb6404b 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java index 45fa6dde373..9fdf4b892ff 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java index ecd9539b8aa..f5c0116e2e8 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java index dd5af6e8b3b..551c5f94cd0 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java index e19bc78ea7a..0d48f2fc203 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java index 0bb9d94a1fd..56ebef4a2fc 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java index 5dbfedb9fea..881f0639768 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc index 7c46f35a117..6d933f6ed76 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc +++ b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc @@ -1,6 +1,6 @@ ; -; Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +; Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java index 17221825f62..d8cc4da5c24 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set b/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set index 93fcf81fdc2..86a71c55976 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set b/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set index d2797389d8e..5f2d8c1e3ab 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl index 2db525ed665..16a61f6ffe9 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl index 28d07b44229..c236d7559c0 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp index 2c6efdf76b4..b670a98a234 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp index b3dd5f6c788..d29bd79992c 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp index 5da7dd9a845..372ca9100cb 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp index c24814126da..29af17fbb11 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp index cce4ee5a7ec..e7a309be58c 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp @@ -1,5 +1,5 @@ # -# Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp index 338a27a37fd..796bc3e5cb3 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java index 5431f0c7a17..1e69647eee5 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java index 810a449f486..100b873cb9f 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java index 597d3185a6b..a40d365629b 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java index 9246f70c3ab..59a0da3de43 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/share/classes/org/omg/CORBA/ORB.java b/corba/src/share/classes/org/omg/CORBA/ORB.java index dde09300f2f..2fb6ca01959 100644 --- a/corba/src/share/classes/org/omg/CORBA/ORB.java +++ b/corba/src/share/classes/org/omg/CORBA/ORB.java @@ -1,5 +1,5 @@ /* - * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1995-2009 Sun Microsystems, Inc. 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 diff --git a/corba/src/windows/resource/version.rc b/corba/src/windows/resource/version.rc index dff3ae50fe7..ad3c51b64cc 100644 --- a/corba/src/windows/resource/version.rc +++ b/corba/src/windows/resource/version.rc @@ -1,5 +1,5 @@ // -// Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 2004-2009 Sun Microsystems, Inc. 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 From a63ef1000477ddb5e11e048a7cc5b266bf02fce6 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:40 -0700 Subject: [PATCH 58/74] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- hotspot/agent/src/os/linux/Makefile | 2 +- .../src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java | 2 +- .../share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java | 2 +- .../src/share/classes/sun/jvm/hotspot/code/MonitorValue.java | 2 +- .../agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java | 2 +- .../src/share/classes/sun/jvm/hotspot/code/ScopeValue.java | 2 +- .../src/share/classes/sun/jvm/hotspot/debugger/Debugger.java | 2 +- .../share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java | 2 +- .../src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java | 2 +- .../classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java | 2 +- .../sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java | 2 +- .../sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java | 2 +- .../share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java | 2 +- .../share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java | 2 +- .../src/share/classes/sun/jvm/hotspot/memory/Universe.java | 2 +- .../share/classes/sun/jvm/hotspot/runtime/ClassConstants.java | 2 +- .../share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java | 2 +- .../classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/StackValue.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java | 2 +- .../agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/Threads.java | 2 +- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java | 2 +- .../classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java | 2 +- .../share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java | 2 +- .../share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java | 2 +- .../classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java | 2 +- .../classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java | 2 +- hotspot/make/jprt.properties | 2 +- hotspot/make/linux/makefiles/jsig.make | 2 +- hotspot/make/linux/makefiles/saproc.make | 2 +- hotspot/make/solaris/makefiles/optimized.make | 2 +- hotspot/make/solaris/makefiles/sparcWorks.make | 2 +- hotspot/make/windows/build_vm_def.sh | 2 +- hotspot/make/windows/create.bat | 2 +- hotspot/make/windows/get_msc_ver.sh | 2 +- hotspot/make/windows/makefiles/adlc.make | 2 +- hotspot/make/windows/makefiles/compile.make | 2 +- hotspot/make/windows/makefiles/makedeps.make | 2 +- hotspot/make/windows/makefiles/rules.make | 2 +- hotspot/make/windows/makefiles/sa.make | 2 +- hotspot/make/windows/makefiles/sanity.make | 2 +- hotspot/make/windows/makefiles/vm.make | 2 +- hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 2 +- hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp | 2 +- hotspot/src/cpu/sparc/vm/globals_sparc.hpp | 2 +- hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/frame_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/globals_x86.hpp | 2 +- hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp | 2 +- hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp | 2 +- hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp | 2 +- hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp | 2 +- hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp | 2 +- hotspot/src/os/linux/vm/os_linux.hpp | 2 +- hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp | 2 +- hotspot/src/os/solaris/dtrace/jhelper.d | 2 +- hotspot/src/os/solaris/dtrace/libjvm_db.c | 2 +- hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp | 2 +- hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp | 2 +- hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp | 2 +- .../src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp | 2 +- .../solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp | 2 +- hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp | 2 +- .../os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp | 2 +- .../os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp | 2 +- hotspot/src/share/tools/MakeDeps/BuildConfig.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java | 2 +- hotspot/src/share/tools/hsdis/Makefile | 2 +- hotspot/src/share/tools/hsdis/hsdis-demo.c | 2 +- hotspot/src/share/tools/hsdis/hsdis.c | 2 +- hotspot/src/share/vm/adlc/adlc.hpp | 2 +- hotspot/src/share/vm/asm/assembler.cpp | 2 +- hotspot/src/share/vm/c1/c1_Compilation.cpp | 2 +- hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 2 +- hotspot/src/share/vm/c1/c1_LinearScan.cpp | 2 +- hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp | 2 +- hotspot/src/share/vm/ci/ciEnv.cpp | 2 +- hotspot/src/share/vm/ci/ciEnv.hpp | 2 +- hotspot/src/share/vm/ci/ciMethodBlocks.cpp | 2 +- hotspot/src/share/vm/ci/ciStreams.cpp | 2 +- hotspot/src/share/vm/ci/ciStreams.hpp | 2 +- hotspot/src/share/vm/ci/ciTypeFlow.cpp | 2 +- hotspot/src/share/vm/classfile/classLoader.cpp | 2 +- hotspot/src/share/vm/classfile/verifier.cpp | 2 +- hotspot/src/share/vm/code/vtableStubs.cpp | 2 +- hotspot/src/share/vm/compiler/compileBroker.cpp | 2 +- .../src/share/vm/gc_implementation/g1/collectionSetChooser.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp | 2 +- .../share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp | 2 +- .../share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentZFThread.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp | 2 +- .../src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp | 2 +- .../vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp | 2 +- .../share/vm/gc_implementation/shared/concurrentGCThread.cpp | 2 +- .../share/vm/gc_implementation/shared/concurrentGCThread.hpp | 2 +- hotspot/src/share/vm/gc_interface/gcCause.hpp | 2 +- hotspot/src/share/vm/includeDB_compiler1 | 2 +- hotspot/src/share/vm/includeDB_jvmti | 2 +- hotspot/src/share/vm/interpreter/bytecode.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecode.hpp | 2 +- hotspot/src/share/vm/interpreter/bytecodeStream.hpp | 2 +- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecodes.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecodes.hpp | 2 +- hotspot/src/share/vm/interpreter/invocationCounter.cpp | 2 +- hotspot/src/share/vm/interpreter/rewriter.hpp | 2 +- hotspot/src/share/vm/interpreter/templateTable.cpp | 2 +- hotspot/src/share/vm/interpreter/templateTable.hpp | 2 +- hotspot/src/share/vm/memory/blockOffsetTable.hpp | 2 +- hotspot/src/share/vm/memory/cardTableRS.cpp | 2 +- hotspot/src/share/vm/memory/gcLocker.hpp | 2 +- hotspot/src/share/vm/memory/heap.cpp | 2 +- hotspot/src/share/vm/oops/cpCacheOop.cpp | 2 +- hotspot/src/share/vm/oops/generateOopMap.cpp | 2 +- hotspot/src/share/vm/oops/methodDataOop.cpp | 2 +- hotspot/src/share/vm/opto/addnode.cpp | 2 +- hotspot/src/share/vm/opto/block.hpp | 2 +- hotspot/src/share/vm/opto/buildOopMap.cpp | 2 +- hotspot/src/share/vm/opto/bytecodeInfo.cpp | 2 +- hotspot/src/share/vm/opto/c2compiler.cpp | 2 +- hotspot/src/share/vm/opto/callnode.cpp | 2 +- hotspot/src/share/vm/opto/callnode.hpp | 2 +- hotspot/src/share/vm/opto/coalesce.cpp | 2 +- hotspot/src/share/vm/opto/connode.cpp | 2 +- hotspot/src/share/vm/opto/doCall.cpp | 2 +- hotspot/src/share/vm/opto/escape.cpp | 2 +- hotspot/src/share/vm/opto/loopTransform.cpp | 2 +- hotspot/src/share/vm/opto/loopopts.cpp | 2 +- hotspot/src/share/vm/opto/machnode.cpp | 2 +- hotspot/src/share/vm/opto/matcher.hpp | 2 +- hotspot/src/share/vm/opto/output.cpp | 2 +- hotspot/src/share/vm/opto/parse.hpp | 2 +- hotspot/src/share/vm/opto/parse1.cpp | 2 +- hotspot/src/share/vm/opto/parse2.cpp | 2 +- hotspot/src/share/vm/opto/parse3.cpp | 2 +- hotspot/src/share/vm/opto/parseHelper.cpp | 2 +- hotspot/src/share/vm/opto/subnode.cpp | 2 +- hotspot/src/share/vm/opto/superword.hpp | 2 +- hotspot/src/share/vm/prims/jvm_misc.hpp | 2 +- hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp | 2 +- hotspot/src/share/vm/prims/jvmtiEnvBase.cpp | 2 +- hotspot/src/share/vm/prims/methodComparator.cpp | 2 +- hotspot/src/share/vm/runtime/biasedLocking.cpp | 2 +- hotspot/src/share/vm/runtime/deoptimization.cpp | 2 +- hotspot/src/share/vm/runtime/dtraceJSDT.cpp | 2 +- hotspot/src/share/vm/runtime/frame.hpp | 2 +- hotspot/src/share/vm/runtime/hpi.hpp | 2 +- hotspot/src/share/vm/runtime/interfaceSupport.cpp | 2 +- hotspot/src/share/vm/runtime/mutexLocker.cpp | 2 +- hotspot/src/share/vm/runtime/mutexLocker.hpp | 2 +- hotspot/src/share/vm/runtime/orderAccess.cpp | 2 +- hotspot/src/share/vm/runtime/orderAccess.hpp | 2 +- hotspot/src/share/vm/runtime/stackValue.cpp | 2 +- hotspot/src/share/vm/runtime/stackValue.hpp | 2 +- hotspot/src/share/vm/runtime/thread.cpp | 2 +- hotspot/src/share/vm/runtime/thread.hpp | 2 +- hotspot/src/share/vm/runtime/vframe.cpp | 2 +- hotspot/src/share/vm/runtime/vframe.hpp | 2 +- hotspot/src/share/vm/runtime/vframeArray.cpp | 2 +- hotspot/src/share/vm/runtime/vframe_hp.cpp | 2 +- hotspot/src/share/vm/runtime/virtualspace.cpp | 2 +- hotspot/src/share/vm/runtime/virtualspace.hpp | 2 +- hotspot/src/share/vm/runtime/vmStructs.cpp | 2 +- hotspot/src/share/vm/runtime/vmThread.cpp | 2 +- hotspot/src/share/vm/runtime/vm_operations.hpp | 2 +- hotspot/src/share/vm/runtime/vm_version.cpp | 2 +- hotspot/src/share/vm/utilities/bitMap.cpp | 2 +- hotspot/src/share/vm/utilities/bitMap.hpp | 2 +- hotspot/src/share/vm/utilities/bitMap.inline.hpp | 2 +- hotspot/src/share/vm/utilities/exceptions.hpp | 2 +- hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp | 2 +- hotspot/src/share/vm/utilities/macros.hpp | 2 +- hotspot/test/compiler/6772683/InterruptedTest.java | 2 +- hotspot/test/compiler/6832293/Test.java | 2 +- hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java | 2 +- 199 files changed, 199 insertions(+), 199 deletions(-) diff --git a/hotspot/agent/src/os/linux/Makefile b/hotspot/agent/src/os/linux/Makefile index c7b64107b14..4f99ac31067 100644 --- a/hotspot/agent/src/os/linux/Makefile +++ b/hotspot/agent/src/os/linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java index 82f5ac44d0b..8c7c15d6ae7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java index fa60c49839b..0ae5a9be997 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java index 43937fc690a..edfdaa18ac0 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java index e75365ae226..93b498efbd4 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java index 71166a706b1..5bb1077f40e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java index 41e71c2228e..d7f1e4851a2 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java index 8f5c732499b..854e5a0de1e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java index 80b71637393..586a505f702 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java index df03ce3e01c..f0b5814f4b8 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java index 8a1bacb2fee..c4a8404c902 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java index edb52a65012..60f64d9814c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java index b469bde96b6..44054f93506 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java index 7ae8675f48a..3df1f22e2fd 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java index b9cdc92ff03..c6bbe3de65d 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java index 306a9e677a6..431a18261a9 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java index 6588da2e8bd..5b870c9fe69 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java index f86e4f7a2c5..96f96346326 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java index 9cd4aedf6ce..4a68a22b97c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java index d4801fa05f6..b6aa76edca3 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java index 98becd01816..6e6f0b8d740 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java index fad351b495d..7eb5f4924d1 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java index 9ca93b931fb..425ad5c743d 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java index 9be499b5b80..ce3694ad530 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java index 6301b560a8e..fda1e4f39d7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java index 3ab24ab3167..23d12314105 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java index d0cbd109b5d..1f866dfc3a7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java index ef6ef8c7e61..077ce1241e1 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java index 6ee998699bd..bccf9fd6434 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java index b8fce3abdbf..b9f54946232 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2004-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/jprt.properties b/hotspot/make/jprt.properties index 0a60bae587a..c0cb616c530 100644 --- a/hotspot/make/jprt.properties +++ b/hotspot/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/linux/makefiles/jsig.make b/hotspot/make/linux/makefiles/jsig.make index edf4f77cca9..6dcff6aa72a 100644 --- a/hotspot/make/linux/makefiles/jsig.make +++ b/hotspot/make/linux/makefiles/jsig.make @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make index 11a100ad051..db05d137396 100644 --- a/hotspot/make/linux/makefiles/saproc.make +++ b/hotspot/make/linux/makefiles/saproc.make @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/solaris/makefiles/optimized.make b/hotspot/make/solaris/makefiles/optimized.make index 66609cae946..d3cf526f60c 100644 --- a/hotspot/make/solaris/makefiles/optimized.make +++ b/hotspot/make/solaris/makefiles/optimized.make @@ -1,5 +1,5 @@ # -# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/solaris/makefiles/sparcWorks.make b/hotspot/make/solaris/makefiles/sparcWorks.make index f88cfdfff3a..d1648383857 100644 --- a/hotspot/make/solaris/makefiles/sparcWorks.make +++ b/hotspot/make/solaris/makefiles/sparcWorks.make @@ -1,5 +1,5 @@ # -# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/build_vm_def.sh b/hotspot/make/windows/build_vm_def.sh index 99e30bb1b9e..6f78c6a2f1d 100644 --- a/hotspot/make/windows/build_vm_def.sh +++ b/hotspot/make/windows/build_vm_def.sh @@ -1,5 +1,5 @@ # -# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/create.bat b/hotspot/make/windows/create.bat index bdb1916107d..0f208806b65 100644 --- a/hotspot/make/windows/create.bat +++ b/hotspot/make/windows/create.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +REM Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. REM REM This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/get_msc_ver.sh b/hotspot/make/windows/get_msc_ver.sh index 67df0d0dd95..9cf69456a52 100644 --- a/hotspot/make/windows/get_msc_ver.sh +++ b/hotspot/make/windows/get_msc_ver.sh @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/adlc.make b/hotspot/make/windows/makefiles/adlc.make index e9af2f964bb..8e424eb888c 100644 --- a/hotspot/make/windows/makefiles/adlc.make +++ b/hotspot/make/windows/makefiles/adlc.make @@ -1,5 +1,5 @@ # -# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make index 4906ab5a989..fcbd74663b4 100644 --- a/hotspot/make/windows/makefiles/compile.make +++ b/hotspot/make/windows/makefiles/compile.make @@ -1,5 +1,5 @@ # -# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/makedeps.make b/hotspot/make/windows/makefiles/makedeps.make index 43f25a4666d..f9c8e6ab530 100644 --- a/hotspot/make/windows/makefiles/makedeps.make +++ b/hotspot/make/windows/makefiles/makedeps.make @@ -1,5 +1,5 @@ # -# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/rules.make b/hotspot/make/windows/makefiles/rules.make index 064fb3f231d..90815ace24c 100644 --- a/hotspot/make/windows/makefiles/rules.make +++ b/hotspot/make/windows/makefiles/rules.make @@ -1,5 +1,5 @@ # -# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make index 1970f116b45..734f2259432 100644 --- a/hotspot/make/windows/makefiles/sa.make +++ b/hotspot/make/windows/makefiles/sa.make @@ -1,5 +1,5 @@ # -# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/sanity.make b/hotspot/make/windows/makefiles/sanity.make index dd5c7499f1d..dc7b07192fc 100644 --- a/hotspot/make/windows/makefiles/sanity.make +++ b/hotspot/make/windows/makefiles/sanity.make @@ -1,5 +1,5 @@ # -# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make index eafb4417da5..2da551fc804 100644 --- a/hotspot/make/windows/makefiles/vm.make +++ b/hotspot/make/windows/makefiles/vm.make @@ -1,5 +1,5 @@ # -# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index a6e6c60e2a7..379ae282de3 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp index 4d11edf2a3a..dd29a3fab66 100644 --- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp +++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp index 98b3230ec7b..ff28c96cfc7 100644 --- a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp index 83178a8ef91..c340c87c0b1 100644 --- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/frame_x86.cpp b/hotspot/src/cpu/x86/vm/frame_x86.cpp index dc0ca4af509..8ec4ba76295 100644 --- a/hotspot/src/cpu/x86/vm/frame_x86.cpp +++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/globals_x86.hpp b/hotspot/src/cpu/x86/vm/globals_x86.hpp index 9d6d0292eab..f5586c1ee56 100644 --- a/hotspot/src/cpu/x86/vm/globals_x86.hpp +++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp b/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp index 04f87f3bbab..6975fdc2699 100644 --- a/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp index a89eff6f606..51c05b3d4b7 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp index 07034a48121..48285f46ddd 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp index 3a16d35aa78..3de2675f5a8 100644 --- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp index 03de86684fa..3f40366c940 100644 --- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os/linux/vm/os_linux.hpp b/hotspot/src/os/linux/vm/os_linux.hpp index a51c2feed41..9291613b1bb 100644 --- a/hotspot/src/os/linux/vm/os_linux.hpp +++ b/hotspot/src/os/linux/vm/os_linux.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp index 5ad280c3b7b..70ce7437886 100644 --- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp +++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os/solaris/dtrace/jhelper.d b/hotspot/src/os/solaris/dtrace/jhelper.d index da5837238c8..622e51a1ca0 100644 --- a/hotspot/src/os/solaris/dtrace/jhelper.d +++ b/hotspot/src/os/solaris/dtrace/jhelper.d @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os/solaris/dtrace/libjvm_db.c b/hotspot/src/os/solaris/dtrace/libjvm_db.c index afa443092b4..b162f057b5b 100644 --- a/hotspot/src/os/solaris/dtrace/libjvm_db.c +++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp index 68be1d43523..d9379c0eaa6 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp index 865cd1ce0f1..4db57ad1e14 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp index 24d2bab7c19..a1cb9732ace 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp +++ b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp index 9777b0a131d..5a175f5fff7 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp +++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp index 71f16d94158..e982d220361 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp index 5e27aefb977..ffb0fc9fd5f 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp index 44b67e9d035..3d8fc1c44b4 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp index 62fee83dd25..3faa28adaf4 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp index 1a291cd91ff..4b51eef5ee0 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp index bf4d97d21b4..60fde2bd571 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp index 97226fa37dd..300541e0e96 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp index 1e53ed1aaa1..74efbf3df73 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp index e322f5fd1e8..5d9f5cfe330 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp +++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp index 1e0c6b334b5..192b381702f 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp index 5f8958567e0..2159d8752da 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2004-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/MakeDeps/BuildConfig.java b/hotspot/src/share/tools/MakeDeps/BuildConfig.java index ec26bc698c7..323bfd3f0b1 100644 --- a/hotspot/src/share/tools/MakeDeps/BuildConfig.java +++ b/hotspot/src/share/tools/MakeDeps/BuildConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java index 109613b45d7..5e47abea0d8 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java index a346b611560..2bf9e68f30a 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java index 4b64a555833..e18f693b174 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/hsdis/Makefile b/hotspot/src/share/tools/hsdis/Makefile index c1fd4ca4b9d..605e4218c39 100644 --- a/hotspot/src/share/tools/hsdis/Makefile +++ b/hotspot/src/share/tools/hsdis/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/hsdis/hsdis-demo.c b/hotspot/src/share/tools/hsdis/hsdis-demo.c index 513245350f0..7036cf6dc38 100644 --- a/hotspot/src/share/tools/hsdis/hsdis-demo.c +++ b/hotspot/src/share/tools/hsdis/hsdis-demo.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/tools/hsdis/hsdis.c b/hotspot/src/share/tools/hsdis/hsdis.c index 841a3af62ec..213a6be5be3 100644 --- a/hotspot/src/share/tools/hsdis/hsdis.c +++ b/hotspot/src/share/tools/hsdis/hsdis.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/adlc/adlc.hpp b/hotspot/src/share/vm/adlc/adlc.hpp index 6b92dfd8476..449238d6f37 100644 --- a/hotspot/src/share/vm/adlc/adlc.hpp +++ b/hotspot/src/share/vm/adlc/adlc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/asm/assembler.cpp b/hotspot/src/share/vm/asm/assembler.cpp index e41fc7e9d31..492f2fd134c 100644 --- a/hotspot/src/share/vm/asm/assembler.cpp +++ b/hotspot/src/share/vm/asm/assembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/c1/c1_Compilation.cpp b/hotspot/src/share/vm/c1/c1_Compilation.cpp index 8b4f5bcead8..d89ef4e7b1a 100644 --- a/hotspot/src/share/vm/c1/c1_Compilation.cpp +++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index dac5e5b2c75..30a1ada8231 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp index 40332b1e91d..bab43e2ad21 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp index e5b6b66498f..71cffdbd6da 100644 --- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp +++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp index e713d51a674..ccce4e539f3 100644 --- a/hotspot/src/share/vm/ci/ciEnv.cpp +++ b/hotspot/src/share/vm/ci/ciEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp index 5fc25bae6ab..e58e5a67dfa 100644 --- a/hotspot/src/share/vm/ci/ciEnv.hpp +++ b/hotspot/src/share/vm/ci/ciEnv.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp index 934cca6d99d..ff2e908b7fa 100644 --- a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp +++ b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2006-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciStreams.cpp b/hotspot/src/share/vm/ci/ciStreams.cpp index 5401e64f7b9..d343ab8446d 100644 --- a/hotspot/src/share/vm/ci/ciStreams.cpp +++ b/hotspot/src/share/vm/ci/ciStreams.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciStreams.hpp b/hotspot/src/share/vm/ci/ciStreams.hpp index cc3e55ed9ab..448e27cb16a 100644 --- a/hotspot/src/share/vm/ci/ciStreams.hpp +++ b/hotspot/src/share/vm/ci/ciStreams.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/ci/ciTypeFlow.cpp b/hotspot/src/share/vm/ci/ciTypeFlow.cpp index 9bf831ef9f3..cc6cc667917 100644 --- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp +++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp index 9e48c90a7e4..9871561b420 100644 --- a/hotspot/src/share/vm/classfile/classLoader.cpp +++ b/hotspot/src/share/vm/classfile/classLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp index 6e0fc7e984d..bb5edc785dc 100644 --- a/hotspot/src/share/vm/classfile/verifier.cpp +++ b/hotspot/src/share/vm/classfile/verifier.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/code/vtableStubs.cpp b/hotspot/src/share/vm/code/vtableStubs.cpp index 6c5a937bf4c..67149eae5c6 100644 --- a/hotspot/src/share/vm/code/vtableStubs.cpp +++ b/hotspot/src/share/vm/code/vtableStubs.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp index 290f64872d0..799d9f89202 100644 --- a/hotspot/src/share/vm/compiler/compileBroker.cpp +++ b/hotspot/src/share/vm/compiler/compileBroker.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp index 418dd584954..3000f010b17 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp index 5cd82d79585..3473fac0186 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp index a97a7c48a17..cd5729cfd58 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp index 3ab9b1958ad..0a89e96ba05 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 20f001d7758..9596aea2183 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp index 23164b6b075..20e38dcd916 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp index a91f319d067..e439bdb44d1 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp index db6a7d09ddc..659d4e78892 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp index 5b0dfba7066..19405a0eccb 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp index 5670ebe5ac3..492d9f54acb 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp index 00aa14452c2..db345b993d0 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp index 43af2b52cb7..170d9473eed 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp index 6eee58edcd3..8509a8cadfe 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp index 9f9d9dd1839..060743dd38a 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp index 7bee59dbff7..5baa5505662 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp index 40af9313c33..e59dbe483d2 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp index 47eb146e7de..6cf0605ec8c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp index dddb3bb7d3c..2894794c1cb 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp index 482b1a452e4..01522a7758c 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp index d046323d266..8351694c6ca 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp index a4ebd858d28..ca1d97169c9 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/gc_interface/gcCause.hpp b/hotspot/src/share/vm/gc_interface/gcCause.hpp index da23c8e70d4..19c2ab738b1 100644 --- a/hotspot/src/share/vm/gc_interface/gcCause.hpp +++ b/hotspot/src/share/vm/gc_interface/gcCause.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/includeDB_compiler1 b/hotspot/src/share/vm/includeDB_compiler1 index 6f33d724516..21b26cdc90e 100644 --- a/hotspot/src/share/vm/includeDB_compiler1 +++ b/hotspot/src/share/vm/includeDB_compiler1 @@ -1,5 +1,5 @@ // -// Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/includeDB_jvmti b/hotspot/src/share/vm/includeDB_jvmti index ba6dc9b23fa..1af182ae24c 100644 --- a/hotspot/src/share/vm/includeDB_jvmti +++ b/hotspot/src/share/vm/includeDB_jvmti @@ -1,5 +1,5 @@ // -// Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 2007-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecode.cpp b/hotspot/src/share/vm/interpreter/bytecode.cpp index f91d5667ed3..0cc8a728950 100644 --- a/hotspot/src/share/vm/interpreter/bytecode.cpp +++ b/hotspot/src/share/vm/interpreter/bytecode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecode.hpp b/hotspot/src/share/vm/interpreter/bytecode.hpp index 64941d8d5fc..49e70e8c1f3 100644 --- a/hotspot/src/share/vm/interpreter/bytecode.hpp +++ b/hotspot/src/share/vm/interpreter/bytecode.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp index 7a3a0125e0e..5a9fa3223af 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp index ed216864d36..79cee762daa 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodes.cpp b/hotspot/src/share/vm/interpreter/bytecodes.cpp index 56a89b39864..e55c9ff3851 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodes.hpp b/hotspot/src/share/vm/interpreter/bytecodes.hpp index bf888725992..1f8f2268792 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/invocationCounter.cpp b/hotspot/src/share/vm/interpreter/invocationCounter.cpp index 7ecc70d1997..80be66bebd7 100644 --- a/hotspot/src/share/vm/interpreter/invocationCounter.cpp +++ b/hotspot/src/share/vm/interpreter/invocationCounter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/rewriter.hpp b/hotspot/src/share/vm/interpreter/rewriter.hpp index 4b8ff7e6012..2546b57ef37 100644 --- a/hotspot/src/share/vm/interpreter/rewriter.hpp +++ b/hotspot/src/share/vm/interpreter/rewriter.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/templateTable.cpp b/hotspot/src/share/vm/interpreter/templateTable.cpp index 8e116ae77b3..11b5aa0ba23 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.cpp +++ b/hotspot/src/share/vm/interpreter/templateTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/interpreter/templateTable.hpp b/hotspot/src/share/vm/interpreter/templateTable.hpp index 41d82d5e618..79b2ad8676f 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.hpp +++ b/hotspot/src/share/vm/interpreter/templateTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/memory/blockOffsetTable.hpp b/hotspot/src/share/vm/memory/blockOffsetTable.hpp index b812a243190..2b64487d5b0 100644 --- a/hotspot/src/share/vm/memory/blockOffsetTable.hpp +++ b/hotspot/src/share/vm/memory/blockOffsetTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/memory/cardTableRS.cpp b/hotspot/src/share/vm/memory/cardTableRS.cpp index da80ddf9725..df73a90f24b 100644 --- a/hotspot/src/share/vm/memory/cardTableRS.cpp +++ b/hotspot/src/share/vm/memory/cardTableRS.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/memory/gcLocker.hpp b/hotspot/src/share/vm/memory/gcLocker.hpp index 8a131736976..e88554c641c 100644 --- a/hotspot/src/share/vm/memory/gcLocker.hpp +++ b/hotspot/src/share/vm/memory/gcLocker.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp index ced1bf23c01..4f638fda468 100644 --- a/hotspot/src/share/vm/memory/heap.cpp +++ b/hotspot/src/share/vm/memory/heap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/oops/cpCacheOop.cpp b/hotspot/src/share/vm/oops/cpCacheOop.cpp index 55aa6d9a2ac..6f549afbe38 100644 --- a/hotspot/src/share/vm/oops/cpCacheOop.cpp +++ b/hotspot/src/share/vm/oops/cpCacheOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/oops/generateOopMap.cpp b/hotspot/src/share/vm/oops/generateOopMap.cpp index 36e98c40404..eb533a81e6f 100644 --- a/hotspot/src/share/vm/oops/generateOopMap.cpp +++ b/hotspot/src/share/vm/oops/generateOopMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/oops/methodDataOop.cpp b/hotspot/src/share/vm/oops/methodDataOop.cpp index e61dffe81f3..a77db3c455b 100644 --- a/hotspot/src/share/vm/oops/methodDataOop.cpp +++ b/hotspot/src/share/vm/oops/methodDataOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/addnode.cpp b/hotspot/src/share/vm/opto/addnode.cpp index 63932df349d..0af6bafd742 100644 --- a/hotspot/src/share/vm/opto/addnode.cpp +++ b/hotspot/src/share/vm/opto/addnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/block.hpp b/hotspot/src/share/vm/opto/block.hpp index 93940b466c3..0511b46dda3 100644 --- a/hotspot/src/share/vm/opto/block.hpp +++ b/hotspot/src/share/vm/opto/block.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/buildOopMap.cpp b/hotspot/src/share/vm/opto/buildOopMap.cpp index 81ad6b7dbee..90dc89f53e5 100644 --- a/hotspot/src/share/vm/opto/buildOopMap.cpp +++ b/hotspot/src/share/vm/opto/buildOopMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp index 20e1faff505..9f93ab83773 100644 --- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp +++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp index 22509077fbb..4ee3a6f5d2c 100644 --- a/hotspot/src/share/vm/opto/c2compiler.cpp +++ b/hotspot/src/share/vm/opto/c2compiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/callnode.cpp b/hotspot/src/share/vm/opto/callnode.cpp index 94a261d4622..44baf2a878c 100644 --- a/hotspot/src/share/vm/opto/callnode.cpp +++ b/hotspot/src/share/vm/opto/callnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/callnode.hpp b/hotspot/src/share/vm/opto/callnode.hpp index e82f7606b43..fa775de846c 100644 --- a/hotspot/src/share/vm/opto/callnode.hpp +++ b/hotspot/src/share/vm/opto/callnode.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/coalesce.cpp b/hotspot/src/share/vm/opto/coalesce.cpp index 99584ca165c..fbde9f80fce 100644 --- a/hotspot/src/share/vm/opto/coalesce.cpp +++ b/hotspot/src/share/vm/opto/coalesce.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/connode.cpp b/hotspot/src/share/vm/opto/connode.cpp index 4f7036ca933..431ddbc6271 100644 --- a/hotspot/src/share/vm/opto/connode.cpp +++ b/hotspot/src/share/vm/opto/connode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp index 7246fb36d45..5104e648aa6 100644 --- a/hotspot/src/share/vm/opto/doCall.cpp +++ b/hotspot/src/share/vm/opto/doCall.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp index ed3067e9e94..ac17b5c27a1 100644 --- a/hotspot/src/share/vm/opto/escape.cpp +++ b/hotspot/src/share/vm/opto/escape.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp index d315a9e6c61..0d4bf7869ea 100644 --- a/hotspot/src/share/vm/opto/loopTransform.cpp +++ b/hotspot/src/share/vm/opto/loopTransform.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp index 5084e3d8234..206a6f9fd9f 100644 --- a/hotspot/src/share/vm/opto/loopopts.cpp +++ b/hotspot/src/share/vm/opto/loopopts.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/machnode.cpp b/hotspot/src/share/vm/opto/machnode.cpp index b7357f86ab6..80b1735b132 100644 --- a/hotspot/src/share/vm/opto/machnode.cpp +++ b/hotspot/src/share/vm/opto/machnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/matcher.hpp b/hotspot/src/share/vm/opto/matcher.hpp index 0067e216355..fe657c53421 100644 --- a/hotspot/src/share/vm/opto/matcher.hpp +++ b/hotspot/src/share/vm/opto/matcher.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp index 3c8af599142..7065cebec0e 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/parse.hpp b/hotspot/src/share/vm/opto/parse.hpp index 7120c51a1c6..4b3ca591297 100644 --- a/hotspot/src/share/vm/opto/parse.hpp +++ b/hotspot/src/share/vm/opto/parse.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp index 0b603aa7673..222a2f35a16 100644 --- a/hotspot/src/share/vm/opto/parse1.cpp +++ b/hotspot/src/share/vm/opto/parse1.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/parse2.cpp b/hotspot/src/share/vm/opto/parse2.cpp index 40675d41cbc..496b4f230cf 100644 --- a/hotspot/src/share/vm/opto/parse2.cpp +++ b/hotspot/src/share/vm/opto/parse2.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/parse3.cpp b/hotspot/src/share/vm/opto/parse3.cpp index 0869ee6b634..04b63939a77 100644 --- a/hotspot/src/share/vm/opto/parse3.cpp +++ b/hotspot/src/share/vm/opto/parse3.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/parseHelper.cpp b/hotspot/src/share/vm/opto/parseHelper.cpp index 7e87d7702d1..6b3f432eae7 100644 --- a/hotspot/src/share/vm/opto/parseHelper.cpp +++ b/hotspot/src/share/vm/opto/parseHelper.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/subnode.cpp b/hotspot/src/share/vm/opto/subnode.cpp index ae88d736b10..81e033f2769 100644 --- a/hotspot/src/share/vm/opto/subnode.cpp +++ b/hotspot/src/share/vm/opto/subnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/opto/superword.hpp b/hotspot/src/share/vm/opto/superword.hpp index 4c11ff639b8..647bd27a79e 100644 --- a/hotspot/src/share/vm/opto/superword.hpp +++ b/hotspot/src/share/vm/opto/superword.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2007-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/prims/jvm_misc.hpp b/hotspot/src/share/vm/prims/jvm_misc.hpp index 50644842bbd..e93181ac56b 100644 --- a/hotspot/src/share/vm/prims/jvm_misc.hpp +++ b/hotspot/src/share/vm/prims/jvm_misc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp index 447dcb23766..c8d9865c8b4 100644 --- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp index 142b60c54e4..c6526995912 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/prims/methodComparator.cpp b/hotspot/src/share/vm/prims/methodComparator.cpp index 494f0482216..a6ef36ef290 100644 --- a/hotspot/src/share/vm/prims/methodComparator.cpp +++ b/hotspot/src/share/vm/prims/methodComparator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/biasedLocking.cpp b/hotspot/src/share/vm/runtime/biasedLocking.cpp index ddc7305c77f..8fbd33aad00 100644 --- a/hotspot/src/share/vm/runtime/biasedLocking.cpp +++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index 586f4f5fd2f..8962bf7dfec 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp index 2de788a2ffd..cd00dea55e3 100644 --- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp +++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/frame.hpp b/hotspot/src/share/vm/runtime/frame.hpp index 7513ca1f4b2..9817a36414a 100644 --- a/hotspot/src/share/vm/runtime/frame.hpp +++ b/hotspot/src/share/vm/runtime/frame.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/hpi.hpp b/hotspot/src/share/vm/runtime/hpi.hpp index 506b911ca12..f30c2c3ebe4 100644 --- a/hotspot/src/share/vm/runtime/hpi.hpp +++ b/hotspot/src/share/vm/runtime/hpi.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.cpp b/hotspot/src/share/vm/runtime/interfaceSupport.cpp index b60f3ffd7bf..1852f7a6b53 100644 --- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp +++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/mutexLocker.cpp b/hotspot/src/share/vm/runtime/mutexLocker.cpp index 437192d6ba3..3b21a2094f5 100644 --- a/hotspot/src/share/vm/runtime/mutexLocker.cpp +++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/mutexLocker.hpp b/hotspot/src/share/vm/runtime/mutexLocker.hpp index e1715064385..80d626a8031 100644 --- a/hotspot/src/share/vm/runtime/mutexLocker.hpp +++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/orderAccess.cpp b/hotspot/src/share/vm/runtime/orderAccess.cpp index 1e66d6258f5..8f385a45dce 100644 --- a/hotspot/src/share/vm/runtime/orderAccess.cpp +++ b/hotspot/src/share/vm/runtime/orderAccess.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/orderAccess.hpp b/hotspot/src/share/vm/runtime/orderAccess.hpp index d6b83466da5..38833159df5 100644 --- a/hotspot/src/share/vm/runtime/orderAccess.hpp +++ b/hotspot/src/share/vm/runtime/orderAccess.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/stackValue.cpp b/hotspot/src/share/vm/runtime/stackValue.cpp index 9f3fb0f0ec3..8e601d2e378 100644 --- a/hotspot/src/share/vm/runtime/stackValue.cpp +++ b/hotspot/src/share/vm/runtime/stackValue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/stackValue.hpp b/hotspot/src/share/vm/runtime/stackValue.hpp index 1715ec65b20..f242ca3eced 100644 --- a/hotspot/src/share/vm/runtime/stackValue.hpp +++ b/hotspot/src/share/vm/runtime/stackValue.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 5c08990e53b..59fb8dbc725 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp index f5529e0155a..c1920bb220f 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vframe.cpp b/hotspot/src/share/vm/runtime/vframe.cpp index 64215384091..3b6ba813f9c 100644 --- a/hotspot/src/share/vm/runtime/vframe.cpp +++ b/hotspot/src/share/vm/runtime/vframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vframe.hpp b/hotspot/src/share/vm/runtime/vframe.hpp index 2924aeae983..034da7d3768 100644 --- a/hotspot/src/share/vm/runtime/vframe.hpp +++ b/hotspot/src/share/vm/runtime/vframe.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vframeArray.cpp b/hotspot/src/share/vm/runtime/vframeArray.cpp index 60a2a23b737..426f57e2cb9 100644 --- a/hotspot/src/share/vm/runtime/vframeArray.cpp +++ b/hotspot/src/share/vm/runtime/vframeArray.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vframe_hp.cpp b/hotspot/src/share/vm/runtime/vframe_hp.cpp index 1fc0f2b7d18..1c991d91bc9 100644 --- a/hotspot/src/share/vm/runtime/vframe_hp.cpp +++ b/hotspot/src/share/vm/runtime/vframe_hp.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/virtualspace.cpp b/hotspot/src/share/vm/runtime/virtualspace.cpp index e6e4b55a690..94947f58149 100644 --- a/hotspot/src/share/vm/runtime/virtualspace.cpp +++ b/hotspot/src/share/vm/runtime/virtualspace.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/virtualspace.hpp b/hotspot/src/share/vm/runtime/virtualspace.hpp index f412d11ad55..37f12ad4c3a 100644 --- a/hotspot/src/share/vm/runtime/virtualspace.hpp +++ b/hotspot/src/share/vm/runtime/virtualspace.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp index 23d1db27980..c0226759c70 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.cpp +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vmThread.cpp b/hotspot/src/share/vm/runtime/vmThread.cpp index c2d7c11db48..7b2cc45bed8 100644 --- a/hotspot/src/share/vm/runtime/vmThread.cpp +++ b/hotspot/src/share/vm/runtime/vmThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vm_operations.hpp b/hotspot/src/share/vm/runtime/vm_operations.hpp index 8f6e114623b..09fc2eee914 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.hpp +++ b/hotspot/src/share/vm/runtime/vm_operations.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp index 3e7a7e6e0fe..b05e41ffc6b 100644 --- a/hotspot/src/share/vm/runtime/vm_version.cpp +++ b/hotspot/src/share/vm/runtime/vm_version.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/bitMap.cpp b/hotspot/src/share/vm/utilities/bitMap.cpp index f2f54fa814c..991c7450b6b 100644 --- a/hotspot/src/share/vm/utilities/bitMap.cpp +++ b/hotspot/src/share/vm/utilities/bitMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/bitMap.hpp b/hotspot/src/share/vm/utilities/bitMap.hpp index 89818dfa6f2..1c0d6dac496 100644 --- a/hotspot/src/share/vm/utilities/bitMap.hpp +++ b/hotspot/src/share/vm/utilities/bitMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/bitMap.inline.hpp b/hotspot/src/share/vm/utilities/bitMap.inline.hpp index 7abce42c35d..ff104ade44f 100644 --- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp +++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/exceptions.hpp b/hotspot/src/share/vm/utilities/exceptions.hpp index 0dbfd91c10f..ca01f455c75 100644 --- a/hotspot/src/share/vm/utilities/exceptions.hpp +++ b/hotspot/src/share/vm/utilities/exceptions.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp index 2b64dfc4662..453ff8a75c7 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp index 1d7cb9cce19..b4d7ea45743 100644 --- a/hotspot/src/share/vm/utilities/macros.hpp +++ b/hotspot/src/share/vm/utilities/macros.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/test/compiler/6772683/InterruptedTest.java b/hotspot/test/compiler/6772683/InterruptedTest.java index c1670a58bc5..8ecaa8cb2be 100644 --- a/hotspot/test/compiler/6772683/InterruptedTest.java +++ b/hotspot/test/compiler/6772683/InterruptedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/test/compiler/6832293/Test.java b/hotspot/test/compiler/6832293/Test.java index 7a2c74d3ca1..cda47a84c90 100644 --- a/hotspot/test/compiler/6832293/Test.java +++ b/hotspot/test/compiler/6832293/Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 diff --git a/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java b/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java index dc49db66122..9d1fc927774 100644 --- a/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java +++ b/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. 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 From 632469b81d4d78fce99e6b6f7cc49a69d4f24262 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:45 -0700 Subject: [PATCH 59/74] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- jaxp/make/build.properties | 2 +- jaxp/make/build.xml | 2 +- jaxp/make/jprt.properties | 2 +- .../sun/org/apache/xerces/internal/impl/PropertyManager.java | 2 +- .../xerces/internal/impl/XMLDocumentFragmentScannerImpl.java | 2 +- .../org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java | 2 +- .../org/apache/xerces/internal/impl/XMLStreamFilterImpl.java | 2 +- .../sun/xml/internal/stream/events/XMLEventAllocatorImpl.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jaxp/make/build.properties b/jaxp/make/build.properties index ed598102aa9..6689159753b 100644 --- a/jaxp/make/build.properties +++ b/jaxp/make/build.properties @@ -1,5 +1,5 @@ # -# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2007-2009 Sun Microsystems, Inc. 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 diff --git a/jaxp/make/build.xml b/jaxp/make/build.xml index c9439d0109e..63a78a18909 100644 --- a/jaxp/make/build.xml +++ b/jaxp/make/build.xml @@ -1,6 +1,6 @@