From jonathan.gibbons at sun.com Mon Dec 1 20:19:59 2008 From: jonathan.gibbons at sun.com (jonathan.gibbons at sun.com) Date: Mon, 01 Dec 2008 20:19:59 +0000 Subject: hg: jdk7/tl/langtools: 6778493: Fix (langtools) ant build to honor fcs MILESTONE setting Message-ID: <20081201202001.34120DE56@hg.openjdk.java.net> Changeset: 6210fb7e7544 Author: jjg Date: 2008-12-01 12:15 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/6210fb7e7544 6778493: Fix (langtools) ant build to honor fcs MILESTONE setting Reviewed-by: ohair Contributed-by: mjw at redhat.com ! make/Makefile From jonathan.gibbons at sun.com Tue Dec 2 22:38:48 2008 From: jonathan.gibbons at sun.com (jonathan.gibbons at sun.com) Date: Tue, 02 Dec 2008 22:38:48 +0000 Subject: hg: jdk7/tl/langtools: 6778638: javadoc regression tests require tabs Message-ID: <20081202223851.03CAEDEB8@hg.openjdk.java.net> Changeset: 8db0c5fd6e99 Author: jjg Date: 2008-12-02 14:35 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/8db0c5fd6e99 6778638: javadoc regression tests require tabs Reviewed-by: darcy ! test/com/sun/javadoc/testSourceTab/DoubleTab/C.java ! test/com/sun/javadoc/testSourceTab/SingleTab/C.java ! test/com/sun/javadoc/testSourceTab/TestSourceTab.java From bradford.wetmore at sun.com Tue Dec 2 22:56:32 2008 From: bradford.wetmore at sun.com (bradford.wetmore at sun.com) Date: Tue, 02 Dec 2008 22:56:32 +0000 Subject: hg: jdk7/tl/jdk: 6778613: Update javax.crypto.Cipher.getMaxAllowedKeyLength to point to proper Appendix after doc reorg Message-ID: <20081202225708.3CE52DEBF@hg.openjdk.java.net> Changeset: 4e0e690373fc Author: wetmore Date: 2008-12-02 14:53 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/4e0e690373fc 6778613: Update javax.crypto.Cipher.getMaxAllowedKeyLength to point to proper Appendix after doc reorg Reviewed-by: mullan ! src/share/classes/javax/crypto/Cipher.java From daniel.fuchs at sun.com Thu Dec 4 17:24:47 2008 From: daniel.fuchs at sun.com (daniel.fuchs at sun.com) Date: Thu, 04 Dec 2008 17:24:47 +0000 Subject: hg: jdk7/tl/jdk: 6319823: new mbean register/unregister notification for groups of mbeans; ... Message-ID: <20081204172504.57DB6DFB0@hg.openjdk.java.net> Changeset: a99a2d2f3249 Author: dfuchs Date: 2008-12-04 17:58 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/a99a2d2f3249 6319823: new mbean register/unregister notification for groups of mbeans 6779698: Merge error caused duplicate example code in MBeanServerNotification Reviewed-by: emcmanus ! src/share/classes/javax/management/MBeanServerNotification.java From david.lloyd at redhat.com Thu Dec 4 18:32:57 2008 From: david.lloyd at redhat.com (David M. Lloyd) Date: Thu, 04 Dec 2008 12:32:57 -0600 Subject: [PATCH 1/1] RFC: Add a couple more trivial set methods to java.util.Collections Message-ID: <49382259.7040704@redhat.com> Just a random thought I had. Why not add methods to create two- or three-element sets in the same spirit as Set singleton(T)? The idea could be expanded beyond three elements but I think the initial comparisons would get too complex. Also fixes a javadoc nit in singleton(). BTW, I'm sceptical about the claims within the javadoc for singleton() that the resultant set is serializable, as the field containing the element is final. See patch below. - DML -- Index: tl/jdk/src/share/classes/java/util/Collections.java =================================================================== --- tl/jdk/src/share/classes/java/util/Collections.java Thu Dec 04 11:45:03 CST 2008 +++ tl/jdk/src/share/classes/java/util/Collections.java Thu Dec 04 11:45:03 CST 2008 @@ -3241,8 +3241,9 @@ * Returns an immutable set containing only the specified object. * The returned set is serializable. * - * @param o the sole object to be stored in the returned set. - * @return an immutable set containing only the specified object. + * @param o the sole object to be stored in the returned set + * @param the element type + * @return an immutable set containing only the specified object */ public static Set singleton(T o) { return new SingletonSet(o); @@ -3290,6 +3291,138 @@ } /** + * Returns an immutable set containing only the specified objects. + * The returned set is serializable. + * + * @param one the first object to be stored in the returned set + * @param two the second object to be stored in the returned set + * @param the element type + * @return an immutable set containing only the specified objects + */ + public static Set set(T one, T two) { + if (eq(one, two)) { + return new SingletonSet(one); + } else { + return new TwoSet(one, two); + } + } + + /** + * @serial include + */ + private static class TwoSet + extends AbstractSet + implements Serializable + { + private static final long serialVersionUID = -839812055543945907L; + + private final E one; + private final E two; + + TwoSet(E one, E two) { + this.one = one; + this.two = two; + } + + public Iterator iterator() { + return new Iterator() { + private int state; + + public boolean hasNext() { + return state < 2; + } + + public E next() { + switch (state) { + case 0: try { return one; } finally { state++; } + case 1: try { return two; } finally { state++; } + default: throw new NoSuchElementException(); + } + } + + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + + public int size() {return 2;} + + public boolean contains(Object o) {return eq(o, one) || eq(o, two);} + } + + /** + * Returns an immutable set containing only the specified objects. + * The returned set is serializable. + * + * @param one the first object to be stored in the returned set + * @param two the second object to be stored in the returned set + * @param three the third object to be stored in the returned set + * @param the element type + * @return an immutable set containing only the specified objects + */ + public static Set set(T one, T two, T three) { + final boolean oneTwo = eq(one, two); + final boolean twoThree = eq(two, three); + if (oneTwo && twoThree) { + return new SingletonSet(one); + } else if (oneTwo && ! twoThree) { + return new TwoSet(one, three); + } else if (twoThree && ! oneTwo || eq(one, three)) { + return new TwoSet(one, two); + } else { + return new ThreeSet(one, two, three); + } + } + + /** + * @serial include + */ + private static class ThreeSet + extends AbstractSet + implements Serializable + { + private static final long serialVersionUID = 832299003435439813L; + + private final E one; + private final E two; + private final E three; + + ThreeSet(E one, E two, E three) { + this.one = one; + this.two = two; + this.three = three; + } + + public Iterator iterator() { + return new Iterator() { + private int state; + + public boolean hasNext() { + return state < 3; + } + + public E next() { + switch (state) { + case 0: try { return one; } finally { state++; } + case 1: try { return two; } finally { state++; } + case 2: try { return three; } finally { state++; } + default: throw new NoSuchElementException(); + } + } + + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + + public int size() {return 3;} + + public boolean contains(Object o) {return eq(o, one) || eq(o, two) || eq(o, three);} + } + + /** * Returns an immutable list containing only the specified object. * The returned list is serializable. * From Thomas.Hawtin at Sun.COM Thu Dec 4 18:51:45 2008 From: Thomas.Hawtin at Sun.COM (Tom Hawtin) Date: Thu, 04 Dec 2008 18:51:45 +0000 Subject: [PATCH 1/1] RFC: Add a couple more trivial set methods to java.util.Collections In-Reply-To: <49382259.7040704@redhat.com> References: <49382259.7040704@redhat.com> Message-ID: <493826C1.5060809@sun.com> David M. Lloyd wrote: > > BTW, I'm sceptical about the claims within the javadoc for singleton() > that the resultant set is serializable, as the field containing the > element is final. final is fine with serialisation. You can even provide a readObject and set it with ObjectInputStream.readObject (but only once!). However, you can't use readFields and then attempt to assign it (if you want to do that then you'll need readResolve - use a "serial proxy" as described in Effective Java 2nd Ed.). Tom From mandy.chung at sun.com Fri Dec 5 21:11:32 2008 From: mandy.chung at sun.com (mandy.chung at sun.com) Date: Fri, 05 Dec 2008 21:11:32 +0000 Subject: hg: jdk7/tl/jdk: 2 new changesets Message-ID: <20081205211234.BD4E0D1E9@hg.openjdk.java.net> Changeset: 87170fc5a587 Author: mchung Date: 2008-12-05 10:28 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/87170fc5a587 6764062: Revise usage of java.io.*.close Summary: Handle closing multiple open I/O streams in case close() throws IOException Reviewed-by: ksrini ! src/share/classes/com/sun/servicetag/Installer.java ! src/share/classes/com/sun/servicetag/SunConnection.java ! src/share/classes/com/sun/servicetag/Util.java ! src/share/classes/com/sun/servicetag/WindowsSystemEnvironment.java Changeset: baa10242c544 Author: mchung Date: 2008-12-05 10:30 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/baa10242c544 6750389: The cpuManufactorer does not correctly recognized for Solaris 10 Summary: Fix the correct SMBIOS type (4) to obtain CPU manufacturer Reviewed-by: ksrini ! src/share/classes/com/sun/servicetag/SolarisSystemEnvironment.java From rocketraman at fastmail.fm Sun Dec 7 15:54:54 2008 From: rocketraman at fastmail.fm (Raman Gupta) Date: Sun, 07 Dec 2008 10:54:54 -0500 Subject: RFC: add RuntimePermission("explicitGC") Message-ID: <493BF1CE.8000002@fastmail.fm> Currently, it is possible for code to request scheduling GC via the Runtime.getRuntime().gc() or System.gc() method. This method is often not desirable to execute on modern JVMs with sophisticated GC algorithms, and so explicit GC is often disabled by customers via the "-XX:+DisableExplicitGC" JVM flag. See the following bug report for some background: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6200079 While I agree with the evaluation in the report that the DisableExplicitGC behavior cannot be made the default, the reality is there are still libraries that call this method unnecessarily and perhaps even at undocumented times. There is also code that has valid reasons to call it: - test suites (mentioned in 6200079) - distributed RMI GC - application code scheduling GC at off-peak times and so forth. Therefore, I propose a simple change. Add a RuntimePermission called "explicitGC". Check this permission before calling the VM's gc method. Optionally, modify the signature of Runtime.getRuntime().gc() and System.gc() to return a boolean to indicate to the user whether the gc method was successfully called or not. This API change would add feedback on the results of the permission check while being backward compatible (though binary compatibility would be broken so this likely cannot be done). The default permissions file distributed with the JDK/JRE would give all code access to gc(), thereby not changing the current behavior for any existing installations. Thank you for your feedback. Cheers, Raman Gupta From tim.bell at sun.com Mon Dec 8 06:34:52 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:34:52 +0000 Subject: hg: jdk7/tl: 2 new changesets Message-ID: <20081208063452.B574BD323@hg.openjdk.java.net> Changeset: 541bdc5ad32f Author: ohair Date: 2008-12-01 15:28 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/rev/541bdc5ad32f 6750229: Upgrade Recommended Linux and Windows Build OS Reviewed-by: xdono ! README-builds.html Changeset: a20db75d7f33 Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/rev/a20db75d7f33 Added tag jdk7-b41 for changeset 541bdc5ad32f ! .hgtags From tim.bell at sun.com Mon Dec 8 06:41:10 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:41:10 +0000 Subject: hg: jdk7/tl/corba: Added tag jdk7-b41 for changeset c90eeda9594e Message-ID: <20081208064112.A55A2D328@hg.openjdk.java.net> Changeset: d9a0ca94dcf8 Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/d9a0ca94dcf8 Added tag jdk7-b41 for changeset c90eeda9594e ! .hgtags From tim.bell at sun.com Mon Dec 8 06:46:33 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:46:33 +0000 Subject: hg: jdk7/tl/hotspot: 20 new changesets Message-ID: <20081208064714.81FE1D32D@hg.openjdk.java.net> Changeset: 3c07cda72b7d Author: tbell Date: 2008-11-11 22:01 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/3c07cda72b7d 6764892: VS2008 changes required to compile hotspot sources Summary: Minor changes required to build using the Visual Studio 2008 compiler Reviewed-by: kvn, ohair ! make/windows/makefiles/adlc.make ! make/windows/makefiles/compile.make ! make/windows/makefiles/debug.make ! make/windows/makefiles/defs.make ! make/windows/makefiles/fastdebug.make ! make/windows/makefiles/product.make ! make/windows/makefiles/sa.make ! src/cpu/x86/vm/register_definitions_x86.cpp Changeset: 334969144810 Author: never Date: 2008-11-11 23:03 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/334969144810 6758445: loop heads that are exception entry points can crash during count_edges/mark_loops Reviewed-by: kvn, jrose ! src/share/vm/c1/c1_IR.cpp Changeset: 364141474b40 Author: never Date: 2008-11-12 05:42 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/364141474b40 Merge Changeset: 4d20a3aaf1ab Author: kvn Date: 2008-11-12 11:01 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/4d20a3aaf1ab 6769748: Fix solaris makefiles for the case when "CC -V" produces several lines Summary: Fix solaris makefiles for 5.10 compilers Reviewed-by: jcoomes ! make/solaris/makefiles/debug.make ! make/solaris/makefiles/fastdebug.make ! make/solaris/makefiles/i486.make ! make/solaris/makefiles/jvmg.make ! make/solaris/makefiles/optimized.make ! make/solaris/makefiles/product.make ! make/solaris/makefiles/sparc.make ! make/solaris/makefiles/sparcWorks.make ! make/solaris/makefiles/sparcv9.make ! make/solaris/makefiles/vm.make Changeset: a45484ea312d Author: jrose Date: 2008-11-12 22:33 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes Summary: low-level privileged sun.misc.Unsafe.defineAnonymousClass Reviewed-by: kvn ! src/share/vm/ci/ciEnv.cpp ! src/share/vm/classfile/classFileParser.cpp ! src/share/vm/classfile/classFileParser.hpp ! src/share/vm/classfile/systemDictionary.cpp ! src/share/vm/classfile/systemDictionary.hpp ! src/share/vm/classfile/verifier.cpp ! src/share/vm/includeDB_gc_parallel ! src/share/vm/oops/constantPoolKlass.cpp ! src/share/vm/oops/constantPoolOop.cpp ! src/share/vm/oops/constantPoolOop.hpp ! src/share/vm/oops/instanceKlass.hpp ! src/share/vm/oops/instanceKlassKlass.cpp ! src/share/vm/oops/klass.cpp ! src/share/vm/prims/jvm.cpp ! src/share/vm/prims/jvm.h ! src/share/vm/prims/unsafe.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/reflection.cpp ! src/share/vm/utilities/constantTag.hpp Changeset: 275a3b7ff0d6 Author: jrose Date: 2008-11-12 23:26 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/275a3b7ff0d6 6770949: minor tweaks before 6655638 Summary: minor cleanups & tuning of array.hpp, debug.cpp, growableArray.hpp, hashtable.cpp Reviewed-by: kvn ! src/share/vm/utilities/array.hpp ! src/share/vm/utilities/debug.cpp ! src/share/vm/utilities/growableArray.hpp ! src/share/vm/utilities/hashtable.cpp Changeset: c1345e85f901 Author: kvn Date: 2008-11-13 14:50 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/c1345e85f901 6767659: Conversion from i486 to x86 missed some entries in makefiles Summary: Fixed missed entries. Reviewed-by: never ! make/linux/makefiles/top.make ! make/solaris/makefiles/amd64.make ! make/solaris/makefiles/dtrace.make ! make/solaris/makefiles/fastdebug.make ! make/solaris/makefiles/i486.make ! make/solaris/makefiles/sparc.make ! make/solaris/makefiles/top.make ! src/share/vm/adlc/archDesc.cpp Changeset: de78b80cedec Author: kvn Date: 2008-11-18 12:31 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/de78b80cedec 6772413: code cleanup Summary: Removed lines in adm64.make with interpret.o and moved few constant strings from header files. Reviewed-by: never ! make/solaris/makefiles/amd64.make ! src/share/vm/opto/c2_globals.hpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/perfMemory.cpp ! src/share/vm/runtime/perfMemory.hpp Changeset: b1d6a3e95810 Author: kvn Date: 2008-11-18 12:40 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/b1d6a3e95810 6766316: assert(!nocreate,"Cannot build a phi for a block already parsed.") Summary: Don't use the invariant local information if there are irreducible loops. Reviewed-by: never ! src/share/vm/opto/parse.hpp Changeset: 87559db65269 Author: kvn Date: 2008-11-18 14:47 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/87559db65269 6773078: UseCompressedOops: assert(kid == 0L || s->_leaf->in(0) == 0L,"internal operands have no control") Summary: Don't set the control edge of a klass load node. Reviewed-by: never ! src/share/vm/opto/macro.cpp Changeset: 491a904952f2 Author: kvn Date: 2008-11-19 09:09 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/491a904952f2 Merge Changeset: 122d10c82f3f Author: jcoomes Date: 2008-10-29 06:30 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/122d10c82f3f 6765804: GC "dead ratios" should be unsigned Reviewed-by: ysr, tonyp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp ! src/share/vm/memory/space.cpp ! src/share/vm/memory/space.hpp ! src/share/vm/memory/tenuredGeneration.hpp ! src/share/vm/runtime/globals.hpp Changeset: 03f4fdd1b6af Author: jcoomes Date: 2008-11-11 22:21 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/03f4fdd1b6af 6718879: cannot build on solaris nevada Reviewed-by: xlu ! src/os/solaris/vm/os_solaris.cpp Changeset: 96c6da8f095c Author: jcoomes Date: 2008-11-07 12:52 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored Reviewed-by: xlu ! make/solaris/makefiles/dtrace.make Changeset: da9cb4e97a5f Author: iveresov Date: 2008-11-14 14:23 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/da9cb4e97a5f 6770608: G1: Mutator thread can flush barrier and satb queues during safepoint 6660573: G1: BigApps Failure : guarantee(satb_mq_set.completed_buffers_num() == 0,"invariant") Summary: When exiting a mutator thread is removed from the thread list before it has a chance to flush its SATB and barrier queues. If GC happens at this moment the objects that are refererred from these queues can be moved, which will case a crash. The fix is simply to flush the buffers before removing a thread from the list. Reviewed-by: jcoomes, tonyp ! src/share/vm/gc_implementation/g1/ptrQueue.cpp ! src/share/vm/gc_implementation/g1/ptrQueue.hpp ! src/share/vm/runtime/thread.cpp ! src/share/vm/runtime/thread.hpp Changeset: 8fa025608ec6 Author: jmasa Date: 2008-11-18 14:52 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/8fa025608ec6 6771742: Remove duplicate files from G1 merge Summary: Remove duplicate files and add includeDB_gc_g1 file in windows Makefile Reviewed-by: jcoomes, ysr ! make/windows/projectfiles/common/Makefile - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.cpp - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.hpp Changeset: b5e603f2e024 Author: iveresov Date: 2008-11-19 14:20 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/b5e603f2e024 Merge ! make/solaris/makefiles/dtrace.make - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.cpp - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.hpp ! src/share/vm/runtime/globals.hpp Changeset: ab42bab113e0 Author: trims Date: 2008-11-21 16:11 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/ab42bab113e0 Merge - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.cpp - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.hpp Changeset: f9d938ede196 Author: trims Date: 2008-11-21 16:11 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/f9d938ede196 6775176: Bump HS14 build number to 08 Summary: Update the Hotspot build number to 08 Reviewed-by: jcoomes ! make/hotspot_version Changeset: 2e4f74ff86a1 Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/2e4f74ff86a1 Added tag jdk7-b41 for changeset f9d938ede196 ! .hgtags From tim.bell at sun.com Mon Dec 8 06:51:32 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:51:32 +0000 Subject: hg: jdk7/tl/jaxp: Added tag jdk7-b41 for changeset 0758bd3e2852 Message-ID: <20081208065135.37008D332@hg.openjdk.java.net> Changeset: 036e0dca841a Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jaxp/rev/036e0dca841a Added tag jdk7-b41 for changeset 0758bd3e2852 ! .hgtags From tim.bell at sun.com Mon Dec 8 06:53:27 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:53:27 +0000 Subject: hg: jdk7/tl/jaxws: Added tag jdk7-b41 for changeset a8379d24aa03 Message-ID: <20081208065329.AFBD6D337@hg.openjdk.java.net> Changeset: 621c02d83abc Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jaxws/rev/621c02d83abc Added tag jdk7-b41 for changeset a8379d24aa03 ! .hgtags From tim.bell at sun.com Mon Dec 8 06:55:24 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 06:55:24 +0000 Subject: hg: jdk7/tl/jdk: 3 new changesets Message-ID: <20081208065618.775D2D33C@hg.openjdk.java.net> Changeset: b213ea31bcb3 Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b213ea31bcb3 Added tag jdk7-b41 for changeset 44941f893cea ! .hgtags Changeset: d782143219d6 Author: tbell Date: 2008-12-05 09:51 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d782143219d6 Merge Changeset: ea43ec07a878 Author: tbell Date: 2008-12-05 21:59 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/ea43ec07a878 Merge From tim.bell at sun.com Mon Dec 8 07:02:44 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 08 Dec 2008 07:02:44 +0000 Subject: hg: jdk7/tl/langtools: 3 new changesets Message-ID: <20081208070251.7FF8ED341@hg.openjdk.java.net> Changeset: 1d4f01925bd0 Author: xdono Date: 2008-12-04 11:10 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/1d4f01925bd0 Added tag jdk7-b41 for changeset ded6b40f558e ! .hgtags Changeset: 4674298aaf3b Author: tbell Date: 2008-12-05 09:52 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/4674298aaf3b Merge Changeset: 4efd44aa85ff Author: tbell Date: 2008-12-05 21:59 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/4efd44aa85ff Merge From eamonn.mcmanus at sun.com Tue Dec 9 11:04:06 2008 From: eamonn.mcmanus at sun.com (eamonn.mcmanus at sun.com) Date: Tue, 09 Dec 2008 11:04:06 +0000 Subject: hg: jdk7/tl/jdk: 6774918: @NotificationInfo is ineffective on MBeans that cannot send notifications Message-ID: <20081209110427.1C3E2D45D@hg.openjdk.java.net> Changeset: b4bf1806ee66 Author: emcmanus Date: 2008-12-09 12:01 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b4bf1806ee66 6774918: @NotificationInfo is ineffective on MBeans that cannot send notifications Reviewed-by: jfdenise ! src/share/classes/com/sun/jmx/mbeanserver/MBeanInjector.java ! src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java ! src/share/classes/javax/management/NotificationInfo.java ! test/javax/management/Introspector/AnnotatedNotificationInfoTest.java From jean-francois.denise at sun.com Tue Dec 9 13:49:19 2008 From: jean-francois.denise at sun.com (jean-francois.denise at sun.com) Date: Tue, 09 Dec 2008 13:49:19 +0000 Subject: hg: jdk7/tl/jdk: 6501362: DescriptorSupport(String) could recognize "name=value" as well as XML format Message-ID: <20081209134949.99815D4AB@hg.openjdk.java.net> Changeset: 95f828533592 Author: jfdenise Date: 2008-12-09 14:44 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/95f828533592 6501362: DescriptorSupport(String) could recognize "name=value" as well as XML format Reviewed-by: emcmanus ! src/share/classes/javax/management/modelmbean/DescriptorSupport.java + test/javax/management/descriptor/DescriptorConstructorTest.java From jean-francois.denise at sun.com Tue Dec 9 14:40:09 2008 From: jean-francois.denise at sun.com (jean-francois.denise at sun.com) Date: Tue, 09 Dec 2008 14:40:09 +0000 Subject: hg: jdk7/tl/jdk: 6250014: MBeanOperationInfo Descriptor field for exceptions Message-ID: <20081209144042.4B46ED4B0@hg.openjdk.java.net> Changeset: 8d7117d71fc7 Author: jfdenise Date: 2008-12-09 15:36 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/8d7117d71fc7 6250014: MBeanOperationInfo Descriptor field for exceptions Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/mbeanserver/ConvertingMethod.java ! src/share/classes/com/sun/jmx/mbeanserver/Introspector.java ! src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java ! src/share/classes/com/sun/jmx/mbeanserver/MXBeanIntrospector.java ! src/share/classes/javax/management/Descriptor.java ! src/share/classes/javax/management/JMX.java ! src/share/classes/javax/management/MBeanAttributeInfo.java ! src/share/classes/javax/management/MBeanConstructorInfo.java ! src/share/classes/javax/management/MBeanOperationInfo.java + test/javax/management/Introspector/ExceptionsDescriptorTest.java From jean-francois.denise at sun.com Tue Dec 9 15:00:18 2008 From: jean-francois.denise at sun.com (jean-francois.denise at sun.com) Date: Tue, 09 Dec 2008 15:00:18 +0000 Subject: hg: jdk7/tl/jdk: 6675526: Define an Annotation to name registered MBeans Message-ID: <20081209150043.370F8D4B7@hg.openjdk.java.net> Changeset: f8c2f3b5c0ff Author: jfdenise Date: 2008-12-09 15:57 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/f8c2f3b5c0ff 6675526: Define an Annotation to name registered MBeans Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java ! src/share/classes/com/sun/jmx/mbeanserver/Introspector.java ! src/share/classes/javax/management/Descriptor.java ! src/share/classes/javax/management/JMX.java ! src/share/classes/javax/management/MBeanServer.java ! src/share/classes/javax/management/MBeanServerConnection.java + src/share/classes/javax/management/ObjectNameTemplate.java + test/javax/management/Introspector/ObjectNameTemplateTest.java From jean-francois.denise at sun.com Tue Dec 9 15:17:51 2008 From: jean-francois.denise at sun.com (jean-francois.denise at sun.com) Date: Tue, 09 Dec 2008 15:17:51 +0000 Subject: hg: jdk7/tl/jdk: 6450834: RFE: allow StandardMBean to call MBeanRegistration methods on its wrapped resource; ... Message-ID: <20081209151813.3A867D4C0@hg.openjdk.java.net> Changeset: ab4d12886aaf Author: jfdenise Date: 2008-12-09 16:14 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/ab4d12886aaf 6450834: RFE: allow StandardMBean to call MBeanRegistration methods on its wrapped resource 6373143: MonitorNotification should have a public constructor Reviewed-by: emcmanus ! src/share/classes/javax/management/StandardMBean.java ! src/share/classes/javax/management/monitor/MonitorNotification.java + test/javax/management/monitor/InstantiateMonitorNotificationTest.java + test/javax/management/standardmbean/RegistrationTest.java From jean-francois.denise at sun.com Tue Dec 9 15:29:27 2008 From: jean-francois.denise at sun.com (jean-francois.denise at sun.com) Date: Tue, 09 Dec 2008 15:29:27 +0000 Subject: hg: jdk7/tl/jdk: 6287328: Add methods to StandardMBean to retrieve a method based on MBean{Attribute|Operation}Info Message-ID: <20081209152949.96BA5D4C7@hg.openjdk.java.net> Changeset: 3d822c99e3ab Author: jfdenise Date: 2008-12-09 16:26 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3d822c99e3ab 6287328: Add methods to StandardMBean to retrieve a method based on MBean{Attribute|Operation}Info Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java ! src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java ! src/share/classes/javax/management/StandardMBean.java + test/javax/management/standardmbean/FindMethodTest.java From shanliang.jiang at sun.com Tue Dec 9 16:46:49 2008 From: shanliang.jiang at sun.com (shanliang.jiang at sun.com) Date: Tue, 09 Dec 2008 16:46:49 +0000 Subject: hg: jdk7/tl/jdk: 2 new changesets Message-ID: <20081209164733.79FBFD4F2@hg.openjdk.java.net> Changeset: 6eec8be80bfe Author: sjiang Date: 2008-12-09 17:41 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/6eec8be80bfe 6405891: MLet: could be improved to load a native lib Reviewed-by: emcmanus ! src/share/classes/javax/management/loading/MLet.java Changeset: 30239cf868b0 Author: sjiang Date: 2008-12-09 17:41 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/30239cf868b0 Merge From eamonn.mcmanus at sun.com Tue Dec 9 17:34:00 2008 From: eamonn.mcmanus at sun.com (eamonn.mcmanus at sun.com) Date: Tue, 09 Dec 2008 17:34:00 +0000 Subject: hg: jdk7/tl/jdk: 6780803: Wrong parameter name in description of EventClient::addListeners(); ... Message-ID: <20081209173423.DFFF3D508@hg.openjdk.java.net> Changeset: 0b1c7f982cc0 Author: emcmanus Date: 2008-12-09 18:30 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/0b1c7f982cc0 6780803: Wrong parameter name in description of EventClient::addListeners() 6470295: Misleading exception message says context classloader when it isn't 6714954: Description of MBeanPermission checking in MBeanServer javadoc is inaccurate 6732037: Event Service spec needs more detail about Executor use 6740900: Specify that listeners invoked via SendNotification should not block 6778436: Typo in @NotificationInfos spec Reviewed-by: dfuchs ! src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java ! src/share/classes/javax/management/MBeanRegistration.java ! src/share/classes/javax/management/MBeanServer.java ! src/share/classes/javax/management/event/EventClient.java ! src/share/classes/javax/management/event/FetchingEventRelay.java From shanliang.jiang at sun.com Tue Dec 9 17:52:48 2008 From: shanliang.jiang at sun.com (shanliang.jiang at sun.com) Date: Tue, 09 Dec 2008 17:52:48 +0000 Subject: hg: jdk7/tl/jdk: 2 new changesets Message-ID: <20081209175321.ABB93D50F@hg.openjdk.java.net> Changeset: 23738109351f Author: sjiang Date: 2008-12-09 18:42 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/23738109351f 6760712: Provide a connector server option that causes it not to prevent the VM from exiting Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/remote/util/EnvHelp.java ! src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java + test/javax/management/remote/mandatory/connection/DaemonRMIExporterTest.java Changeset: 0dc9fc01e5d6 Author: sjiang Date: 2008-12-09 18:45 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/0dc9fc01e5d6 Merge From shanliang.jiang at sun.com Tue Dec 9 18:50:13 2008 From: shanliang.jiang at sun.com (shanliang.jiang at sun.com) Date: Tue, 09 Dec 2008 18:50:13 +0000 Subject: hg: jdk7/tl/jdk: 6332907: Add ability for connector server to close individual connections Message-ID: <20081209185044.8C463D530@hg.openjdk.java.net> Changeset: 4951fee90769 Author: sjiang Date: 2008-12-09 19:44 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/4951fee90769 6332907: Add ability for connector server to close individual connections Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/remote/util/EnvHelp.java ! src/share/classes/javax/management/remote/JMXConnectorServer.java ! src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java ! src/share/classes/javax/management/remote/rmi/RMIServerImpl.java + test/javax/management/remote/mandatory/connectorServer/CloseConnectionTest.java From daniel.fuchs at sun.com Tue Dec 9 19:24:05 2008 From: daniel.fuchs at sun.com (daniel.fuchs at sun.com) Date: Tue, 09 Dec 2008 19:24:05 +0000 Subject: hg: jdk7/tl/jdk: 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces Message-ID: <20081209192431.ED581D546@hg.openjdk.java.net> Changeset: 61e73bc43e72 Author: dfuchs Date: 2008-12-09 20:20 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/61e73bc43e72 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces Reviewed-by: emcmanus ! src/share/classes/com/sun/jmx/interceptor/DispatchInterceptor.java ! src/share/classes/com/sun/jmx/interceptor/DomainDispatchInterceptor.java ! src/share/classes/com/sun/jmx/interceptor/NamespaceDispatchInterceptor.java ! src/share/classes/com/sun/jmx/mbeanserver/MXBeanLookup.java ! src/share/classes/com/sun/jmx/mbeanserver/Util.java ! src/share/classes/com/sun/jmx/namespace/DomainInterceptor.java ! src/share/classes/com/sun/jmx/namespace/NamespaceInterceptor.java ! src/share/classes/com/sun/jmx/namespace/ObjectNameRouter.java ! src/share/classes/com/sun/jmx/namespace/RoutingMBeanServerConnection.java ! src/share/classes/com/sun/jmx/namespace/RoutingProxy.java ! src/share/classes/javax/management/MBeanServer.java ! src/share/classes/javax/management/MBeanServerConnection.java ! src/share/classes/javax/management/ObjectName.java ! src/share/classes/javax/management/namespace/JMXDomain.java ! src/share/classes/javax/management/namespace/JMXNamespacePermission.java ! src/share/classes/javax/management/namespace/JMXNamespaces.java ! src/share/classes/javax/management/namespace/package-info.java ! test/javax/management/namespace/LeadingSeparatorsTest.java ! test/javax/management/namespace/NullDomainObjectNameTest.java ! test/javax/management/namespace/NullObjectNameTest.java ! test/javax/management/namespace/QueryNamesTest.java From shanliang.jiang at sun.com Tue Dec 9 19:55:39 2008 From: shanliang.jiang at sun.com (shanliang.jiang at sun.com) Date: Tue, 09 Dec 2008 19:55:39 +0000 Subject: hg: jdk7/tl/jdk: 2 new changesets Message-ID: <20081209195614.D0848D550@hg.openjdk.java.net> Changeset: 7aa035fdd97d Author: sjiang Date: 2008-12-09 20:50 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/7aa035fdd97d 6336980: NotificationBroadcasterSupport: to tell whether there are listeners and to do clear Reviewed-by: emcmanus ! src/share/classes/javax/management/NotificationBroadcasterSupport.java + test/javax/management/notification/SupportClearTest.java Changeset: 3f226f477d56 Author: sjiang Date: 2008-12-09 20:51 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3f226f477d56 Merge From eamonn.mcmanus at sun.com Wed Dec 10 11:02:06 2008 From: eamonn.mcmanus at sun.com (eamonn.mcmanus at sun.com) Date: Wed, 10 Dec 2008 11:02:06 +0000 Subject: hg: jdk7/tl/jdk: 6456269: Add a GenericMBeanException so clients don't have to have server's exception classes present Message-ID: <20081210110241.21D6AD585@hg.openjdk.java.net> Changeset: c8db1ddbdba4 Author: emcmanus Date: 2008-12-10 11:59 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/c8db1ddbdba4 6456269: Add a GenericMBeanException so clients don't have to have server's exception classes present Reviewed-by: jfdenise, dfuchs ! src/share/classes/javax/management/Descriptor.java + src/share/classes/javax/management/GenericMBeanException.java ! src/share/classes/javax/management/MBeanException.java + test/javax/management/interop/MBeanExceptionInteropTest.java + test/javax/management/openmbean/GenericMBeanExceptionTest.java From xueming.shen at sun.com Wed Dec 10 22:10:55 2008 From: xueming.shen at sun.com (xueming.shen at sun.com) Date: Wed, 10 Dec 2008 22:10:55 +0000 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... Message-ID: <20081210221115.6881DD5DA@hg.openjdk.java.net> Changeset: b89ba9a6d9a6 Author: sherman Date: 2008-12-10 14:03 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 6642323: Speeding up Single Byte Decoders 6642328: Speeding up Single Byte Encoders Summary: re-implementation of mapping based sbcs charts Reviewed-by: alanb ! make/java/nio/FILES_java.gmk ! make/java/nio/Makefile ! make/sun/nio/FILES_java.gmk ! make/sun/nio/Makefile + make/tools/CharsetMapping/IBM037.c2b + make/tools/CharsetMapping/IBM037.map + make/tools/CharsetMapping/IBM037.nr + make/tools/CharsetMapping/IBM1006.map + make/tools/CharsetMapping/IBM1025.c2b + make/tools/CharsetMapping/IBM1025.map + make/tools/CharsetMapping/IBM1025.nr + make/tools/CharsetMapping/IBM1026.c2b + make/tools/CharsetMapping/IBM1026.map + make/tools/CharsetMapping/IBM1026.nr + make/tools/CharsetMapping/IBM1046.map + make/tools/CharsetMapping/IBM1047.map + make/tools/CharsetMapping/IBM1097.map + make/tools/CharsetMapping/IBM1098.map + make/tools/CharsetMapping/IBM1112.c2b + make/tools/CharsetMapping/IBM1112.map + make/tools/CharsetMapping/IBM1112.nr + make/tools/CharsetMapping/IBM1122.c2b + make/tools/CharsetMapping/IBM1122.map + make/tools/CharsetMapping/IBM1122.nr + make/tools/CharsetMapping/IBM1123.c2b + make/tools/CharsetMapping/IBM1123.map + make/tools/CharsetMapping/IBM1123.nr + make/tools/CharsetMapping/IBM1124.map + make/tools/CharsetMapping/IBM1140.c2b + make/tools/CharsetMapping/IBM1140.map + make/tools/CharsetMapping/IBM1141.c2b + make/tools/CharsetMapping/IBM1141.map + make/tools/CharsetMapping/IBM1142.c2b + make/tools/CharsetMapping/IBM1142.map + make/tools/CharsetMapping/IBM1143.c2b + make/tools/CharsetMapping/IBM1143.map + make/tools/CharsetMapping/IBM1144.c2b + make/tools/CharsetMapping/IBM1144.map + make/tools/CharsetMapping/IBM1145.c2b + make/tools/CharsetMapping/IBM1145.map + make/tools/CharsetMapping/IBM1146.c2b + make/tools/CharsetMapping/IBM1146.map + make/tools/CharsetMapping/IBM1147.c2b + make/tools/CharsetMapping/IBM1147.map + make/tools/CharsetMapping/IBM1148.c2b + make/tools/CharsetMapping/IBM1148.map + make/tools/CharsetMapping/IBM1149.c2b + make/tools/CharsetMapping/IBM1149.map + make/tools/CharsetMapping/IBM273.c2b + make/tools/CharsetMapping/IBM273.map + make/tools/CharsetMapping/IBM273.nr + make/tools/CharsetMapping/IBM277.c2b + make/tools/CharsetMapping/IBM277.map + make/tools/CharsetMapping/IBM277.nr + make/tools/CharsetMapping/IBM278.c2b + make/tools/CharsetMapping/IBM278.map + make/tools/CharsetMapping/IBM278.nr + make/tools/CharsetMapping/IBM280.c2b + make/tools/CharsetMapping/IBM280.map + make/tools/CharsetMapping/IBM280.nr + make/tools/CharsetMapping/IBM284.c2b + make/tools/CharsetMapping/IBM284.map + make/tools/CharsetMapping/IBM284.nr + make/tools/CharsetMapping/IBM285.c2b + make/tools/CharsetMapping/IBM285.map + make/tools/CharsetMapping/IBM285.nr + make/tools/CharsetMapping/IBM297.c2b + make/tools/CharsetMapping/IBM297.map + make/tools/CharsetMapping/IBM297.nr + make/tools/CharsetMapping/IBM420.c2b + make/tools/CharsetMapping/IBM420.map + make/tools/CharsetMapping/IBM420.nr + make/tools/CharsetMapping/IBM424.c2b + make/tools/CharsetMapping/IBM424.map + make/tools/CharsetMapping/IBM424.nr + make/tools/CharsetMapping/IBM437.map + make/tools/CharsetMapping/IBM500.c2b + make/tools/CharsetMapping/IBM500.map + make/tools/CharsetMapping/IBM500.nr + make/tools/CharsetMapping/IBM737.map + make/tools/CharsetMapping/IBM775.map + make/tools/CharsetMapping/IBM838.c2b + make/tools/CharsetMapping/IBM838.map + make/tools/CharsetMapping/IBM838.nr + make/tools/CharsetMapping/IBM850.map + make/tools/CharsetMapping/IBM852.map + make/tools/CharsetMapping/IBM855.map + make/tools/CharsetMapping/IBM856.map + make/tools/CharsetMapping/IBM857.map + make/tools/CharsetMapping/IBM858.map + make/tools/CharsetMapping/IBM860.map + make/tools/CharsetMapping/IBM861.map + make/tools/CharsetMapping/IBM862.map + make/tools/CharsetMapping/IBM863.map + make/tools/CharsetMapping/IBM864.map + make/tools/CharsetMapping/IBM865.map + make/tools/CharsetMapping/IBM866.map + make/tools/CharsetMapping/IBM868.map + make/tools/CharsetMapping/IBM869.map + make/tools/CharsetMapping/IBM870.c2b + make/tools/CharsetMapping/IBM870.map + make/tools/CharsetMapping/IBM870.nr + make/tools/CharsetMapping/IBM871.c2b + make/tools/CharsetMapping/IBM871.map + make/tools/CharsetMapping/IBM871.nr + make/tools/CharsetMapping/IBM874.map + make/tools/CharsetMapping/IBM874.nr + make/tools/CharsetMapping/IBM875.c2b + make/tools/CharsetMapping/IBM875.map + make/tools/CharsetMapping/IBM875.nr + make/tools/CharsetMapping/IBM918.c2b + make/tools/CharsetMapping/IBM918.map + make/tools/CharsetMapping/IBM918.nr + make/tools/CharsetMapping/IBM921.map + make/tools/CharsetMapping/IBM922.map + make/tools/CharsetMapping/ISO_8859_11.map + make/tools/CharsetMapping/ISO_8859_13.map + make/tools/CharsetMapping/ISO_8859_15.map + make/tools/CharsetMapping/ISO_8859_2.map + make/tools/CharsetMapping/ISO_8859_3.map + make/tools/CharsetMapping/ISO_8859_4.map + make/tools/CharsetMapping/ISO_8859_5.map + make/tools/CharsetMapping/ISO_8859_6.map + make/tools/CharsetMapping/ISO_8859_7.map + make/tools/CharsetMapping/ISO_8859_8.map + make/tools/CharsetMapping/ISO_8859_9.map + make/tools/CharsetMapping/JIS_X_0201.map + make/tools/CharsetMapping/KOI8_R.map + make/tools/CharsetMapping/KOI8_U.map + make/tools/CharsetMapping/MS1250.map + make/tools/CharsetMapping/MS1251.map + make/tools/CharsetMapping/MS1252.map + make/tools/CharsetMapping/MS1253.map + make/tools/CharsetMapping/MS1254.map + make/tools/CharsetMapping/MS1255.map + make/tools/CharsetMapping/MS1256.map + make/tools/CharsetMapping/MS1257.map + make/tools/CharsetMapping/MS1258.map + make/tools/CharsetMapping/MS874.map + make/tools/CharsetMapping/MacArabic.map + make/tools/CharsetMapping/MacCentralEurope.map + make/tools/CharsetMapping/MacCroatian.map + make/tools/CharsetMapping/MacCyrillic.map + make/tools/CharsetMapping/MacDingbat.map + make/tools/CharsetMapping/MacGreek.map + make/tools/CharsetMapping/MacHebrew.map + make/tools/CharsetMapping/MacIceland.map + make/tools/CharsetMapping/MacRoman.map + make/tools/CharsetMapping/MacRomania.map + make/tools/CharsetMapping/MacSymbol.map + make/tools/CharsetMapping/MacThai.map + make/tools/CharsetMapping/MacTurkish.map + make/tools/CharsetMapping/MacUkraine.map + make/tools/CharsetMapping/SingleByte-X.java + make/tools/CharsetMapping/TIS_620.map + make/tools/CharsetMapping/extsbcs + make/tools/CharsetMapping/sbcs ! make/tools/src/build/tools/charsetmapping/GenerateMapping.java + make/tools/src/build/tools/charsetmapping/GenerateSBCS.java ! src/share/classes/sun/io/ByteToCharCp850.java ! src/share/classes/sun/io/CharToByteJIS0201.java ! src/share/classes/sun/io/CharToByteSingleByte.java - src/share/classes/sun/nio/cs/IBM437.java - src/share/classes/sun/nio/cs/IBM737.java - src/share/classes/sun/nio/cs/IBM775.java - src/share/classes/sun/nio/cs/IBM850.java - src/share/classes/sun/nio/cs/IBM852.java - src/share/classes/sun/nio/cs/IBM855.java - src/share/classes/sun/nio/cs/IBM857.java - src/share/classes/sun/nio/cs/IBM858.java - src/share/classes/sun/nio/cs/IBM862.java - src/share/classes/sun/nio/cs/IBM866.java - src/share/classes/sun/nio/cs/IBM874.java - src/share/classes/sun/nio/cs/ISO_8859_13.java - src/share/classes/sun/nio/cs/ISO_8859_15.java - src/share/classes/sun/nio/cs/ISO_8859_2.java - src/share/classes/sun/nio/cs/ISO_8859_4.java - src/share/classes/sun/nio/cs/ISO_8859_5.java - src/share/classes/sun/nio/cs/ISO_8859_7.java - src/share/classes/sun/nio/cs/ISO_8859_9.java - src/share/classes/sun/nio/cs/KOI8_R.java - src/share/classes/sun/nio/cs/KOI8_U.java - src/share/classes/sun/nio/cs/MS1250.java - src/share/classes/sun/nio/cs/MS1251.java - src/share/classes/sun/nio/cs/MS1252.java - src/share/classes/sun/nio/cs/MS1253.java - src/share/classes/sun/nio/cs/MS1254.java - src/share/classes/sun/nio/cs/MS1257.java + src/share/classes/sun/nio/cs/SingleByte.java - src/share/classes/sun/nio/cs/ext/IBM037.java - src/share/classes/sun/nio/cs/ext/IBM1006.java - src/share/classes/sun/nio/cs/ext/IBM1025.java - src/share/classes/sun/nio/cs/ext/IBM1026.java - src/share/classes/sun/nio/cs/ext/IBM1046.java - src/share/classes/sun/nio/cs/ext/IBM1047.java - src/share/classes/sun/nio/cs/ext/IBM1097.java - src/share/classes/sun/nio/cs/ext/IBM1098.java - src/share/classes/sun/nio/cs/ext/IBM1112.java - src/share/classes/sun/nio/cs/ext/IBM1122.java - src/share/classes/sun/nio/cs/ext/IBM1123.java - src/share/classes/sun/nio/cs/ext/IBM1124.java - src/share/classes/sun/nio/cs/ext/IBM1140.java - src/share/classes/sun/nio/cs/ext/IBM1141.java - src/share/classes/sun/nio/cs/ext/IBM1142.java - src/share/classes/sun/nio/cs/ext/IBM1143.java - src/share/classes/sun/nio/cs/ext/IBM1144.java - src/share/classes/sun/nio/cs/ext/IBM1145.java - src/share/classes/sun/nio/cs/ext/IBM1146.java - src/share/classes/sun/nio/cs/ext/IBM1147.java - src/share/classes/sun/nio/cs/ext/IBM1148.java - src/share/classes/sun/nio/cs/ext/IBM1149.java - src/share/classes/sun/nio/cs/ext/IBM273.java - src/share/classes/sun/nio/cs/ext/IBM277.java - src/share/classes/sun/nio/cs/ext/IBM278.java - src/share/classes/sun/nio/cs/ext/IBM280.java - src/share/classes/sun/nio/cs/ext/IBM284.java - src/share/classes/sun/nio/cs/ext/IBM285.java - src/share/classes/sun/nio/cs/ext/IBM297.java - src/share/classes/sun/nio/cs/ext/IBM420.java - src/share/classes/sun/nio/cs/ext/IBM424.java - src/share/classes/sun/nio/cs/ext/IBM500.java - src/share/classes/sun/nio/cs/ext/IBM838.java - src/share/classes/sun/nio/cs/ext/IBM856.java - src/share/classes/sun/nio/cs/ext/IBM860.java - src/share/classes/sun/nio/cs/ext/IBM861.java - src/share/classes/sun/nio/cs/ext/IBM863.java - src/share/classes/sun/nio/cs/ext/IBM864.java - src/share/classes/sun/nio/cs/ext/IBM865.java - src/share/classes/sun/nio/cs/ext/IBM868.java - src/share/classes/sun/nio/cs/ext/IBM869.java - src/share/classes/sun/nio/cs/ext/IBM870.java - src/share/classes/sun/nio/cs/ext/IBM871.java - src/share/classes/sun/nio/cs/ext/IBM875.java - src/share/classes/sun/nio/cs/ext/IBM918.java - src/share/classes/sun/nio/cs/ext/IBM921.java - src/share/classes/sun/nio/cs/ext/IBM922.java - src/share/classes/sun/nio/cs/ext/ISO_8859_11.java - src/share/classes/sun/nio/cs/ext/ISO_8859_3.java - src/share/classes/sun/nio/cs/ext/ISO_8859_6.java - src/share/classes/sun/nio/cs/ext/ISO_8859_8.java - src/share/classes/sun/nio/cs/ext/MS1255.java - src/share/classes/sun/nio/cs/ext/MS1256.java - src/share/classes/sun/nio/cs/ext/MS1258.java - src/share/classes/sun/nio/cs/ext/MS874.java - src/share/classes/sun/nio/cs/ext/MacArabic.java - src/share/classes/sun/nio/cs/ext/MacCentralEurope.java - src/share/classes/sun/nio/cs/ext/MacCroatian.java - src/share/classes/sun/nio/cs/ext/MacCyrillic.java - src/share/classes/sun/nio/cs/ext/MacDingbat.java - src/share/classes/sun/nio/cs/ext/MacGreek.java - src/share/classes/sun/nio/cs/ext/MacHebrew.java - src/share/classes/sun/nio/cs/ext/MacIceland.java - src/share/classes/sun/nio/cs/ext/MacRoman.java - src/share/classes/sun/nio/cs/ext/MacRomania.java - src/share/classes/sun/nio/cs/ext/MacSymbol.java - src/share/classes/sun/nio/cs/ext/MacThai.java - src/share/classes/sun/nio/cs/ext/MacTurkish.java - src/share/classes/sun/nio/cs/ext/MacUkraine.java - src/share/classes/sun/nio/cs/ext/TIS_620.java From Ulf.Zibis at gmx.de Mon Dec 15 20:56:21 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Mon, 15 Dec 2008 21:56:21 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <20081210221115.6881DD5DA@hg.openjdk.java.net> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> Message-ID: <4946C475.6080609@gmx.de> Maybe little faster, especially for short strings: private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) { byte[] sa = src.array(); int sp = src.arrayOffset() + src.position(); int sr = src.remaining(); // faster than ... src.arrayOffset() + src.limit() char[] da = dst.array(); int dp = dst.arrayOffset() + dst.position(); int dr = dst.remaining(); // dl is never used for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) if ((da[dp] = decode(sa[sp])) == UNMAPPABLE_DECODING) return withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); return withResult(sr <= dr ? CoderResult.UNDERFLOW : CoderResult.OVERFLOW, src, sp, dst, dp); } Regards, Ulf Am 10.12.2008 23:10, xueming.shen at sun.com schrieb: > Changeset: b89ba9a6d9a6 > Author: sherman > Date: 2008-12-10 14:03 -0800 > URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 > > 6642323: Speeding up Single Byte Decoders > 6642328: Speeding up Single Byte Encoders > Summary: re-implementation of mapping based sbcs charts > Reviewed-by: alanb > > From Ulf.Zibis at gmx.de Mon Dec 15 21:08:50 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Mon, 15 Dec 2008 22:08:50 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946C475.6080609@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> Message-ID: <4946C762.8010003@gmx.de> Maybe: for (int sl = sp + (sr <= dr ? sr : dr); sp != sl; sp++, dp++) is little more faster than: for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) -Ulf Am 15.12.2008 21:56, Ulf Zibis schrieb: > Maybe little faster, especially for short strings: > > private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer > dst) { > byte[] sa = src.array(); > int sp = src.arrayOffset() + src.position(); > int sr = src.remaining(); // faster than ... > src.arrayOffset() + src.limit() > > char[] da = dst.array(); > int dp = dst.arrayOffset() + dst.position(); > int dr = dst.remaining(); // dl is never used > > for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) > if ((da[dp] = decode(sa[sp])) == UNMAPPABLE_DECODING) > return > withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); > return withResult(sr <= dr ? CoderResult.UNDERFLOW : > CoderResult.OVERFLOW, src, sp, dst, dp); > } > > Regards, > Ulf > From Xueming.Shen at Sun.COM Mon Dec 15 22:19:22 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Mon, 15 Dec 2008 14:19:22 -0800 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946C762.8010003@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> Message-ID: <4946D7EA.2060902@sun.com> The gain from doing int sr = src.remaining(); int dr = dst.remaining(); Ulf, thanks for looking into the changes. It might not be a good idea to skip the temporary variable c in the loop, I'm not sure it's a good idea to put an "un-mappable" char into the output buffer in case we have a un-mappable though yes we don't not change the buffer position. This actually is all most all the gain come from in -server vm case when I run my benchmark. However in "client" vm case, interestingly I do see some performance gain with your proposed change, though I'm not sure why the loop gets faster with a quick look. So I have created a new Cr #6785335 to keep trace this issue. Will consider put this one into 7 later. Thanks again! Sherman Ulf Zibis wrote: > Maybe: > for (int sl = sp + (sr <= dr ? sr : dr); sp != sl; sp++, dp++) > is little more faster than: > for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) > > -Ulf > > > Am 15.12.2008 21:56, Ulf Zibis schrieb: >> Maybe little faster, especially for short strings: >> >> private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer >> dst) { >> byte[] sa = src.array(); >> int sp = src.arrayOffset() + src.position(); >> int sr = src.remaining(); // faster than ... >> src.arrayOffset() + src.limit() >> >> char[] da = dst.array(); >> int dp = dst.arrayOffset() + dst.position(); >> int dr = dst.remaining(); // dl is never used >> >> for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) >> if ((da[dp] = decode(sa[sp])) == UNMAPPABLE_DECODING) >> return >> withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); >> return withResult(sr <= dr ? CoderResult.UNDERFLOW : >> CoderResult.OVERFLOW, src, sp, dst, dp); >> } >> >> Regards, >> Ulf >> > From Ulf.Zibis at gmx.de Mon Dec 15 22:46:47 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Mon, 15 Dec 2008 23:46:47 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946D7EA.2060902@sun.com> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> Message-ID: <4946DE57.9090802@gmx.de> Wow, very fast, your answer :-) Maybe you can also examine this: private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) { byte[] sa = src.array(); int sp = src.arrayOffset() + src.position(); int sr = src.remaining(); char[] da = dst.array(); int dp = dst.arrayOffset() + dst.position(); int dr = dst.remaining(); int sl; CoderResult cr; if (sr <= dr) { sl = sp + sr; cr = CoderResult.UNDERFLOW; } else { sl = sp + dr; cr = CoderResult.OVERFLOW; } for (; sp != sl; sp++, dp++) { char c = decode(sa[sp]); if (c == UNMAPPABLE_DECODING) return withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); da[dp] = c; } return withResult(cr, src, sp, dst, dp); } ... but I think, my first version is more elegant. ;-) -Ulf Am 15.12.2008 23:19, Xueming Shen schrieb: > > The gain from doing > > int sr = src.remaining(); > int dr = dst.remaining(); > > Ulf, thanks for looking into the changes. > > It might not be a good idea to skip the temporary variable c in the > loop, I'm not sure > it's a good idea to put an "un-mappable" char into the output buffer > in case we have > a un-mappable though yes we don't not change the buffer position. This > actually is > all most all the gain come from in -server vm case when I run my > benchmark. > > However in "client" vm case, interestingly I do see some performance > gain with > your proposed change, though I'm not sure why the loop gets faster > with a quick > look. So I have created a new Cr #6785335 to keep trace this issue. > Will consider > put this one into 7 later. > > Thanks again! > > Sherman > From Ulf.Zibis at gmx.de Mon Dec 15 22:50:32 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Mon, 15 Dec 2008 23:50:32 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946D7EA.2060902@sun.com> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> Message-ID: <4946DF38.9030007@gmx.de> one more question, just for interest: Can you see any performance difference between sp != sl and sp < sl ? -Ulf Am 15.12.2008 23:19, Xueming Shen schrieb: > > The gain from doing > > int sr = src.remaining(); > int dr = dst.remaining(); > > Ulf, thanks for looking into the changes. > > It might not be a good idea to skip the temporary variable c in the > loop, I'm not sure > it's a good idea to put an "un-mappable" char into the output buffer > in case we have > a un-mappable though yes we don't not change the buffer position. This > actually is > all most all the gain come from in -server vm case when I run my > benchmark. > > However in "client" vm case, interestingly I do see some performance > gain with > your proposed change, though I'm not sure why the loop gets faster > with a quick > look. So I have created a new Cr #6785335 to keep trace this issue. > Will consider > put this one into 7 later. > > Thanks again! > > Sherman > > > Ulf Zibis wrote: >> Maybe: >> for (int sl = sp + (sr <= dr ? sr : dr); sp != sl; sp++, dp++) >> is little more faster than: >> for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) >> >> -Ulf >> >> >> Am 15.12.2008 21:56, Ulf Zibis schrieb: >>> Maybe little faster, especially for short strings: >>> >>> private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer >>> dst) { >>> byte[] sa = src.array(); >>> int sp = src.arrayOffset() + src.position(); >>> int sr = src.remaining(); // faster than ... >>> src.arrayOffset() + src.limit() >>> >>> char[] da = dst.array(); >>> int dp = dst.arrayOffset() + dst.position(); >>> int dr = dst.remaining(); // dl is never used >>> >>> for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) >>> if ((da[dp] = decode(sa[sp])) == UNMAPPABLE_DECODING) >>> return >>> withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); >>> return withResult(sr <= dr ? CoderResult.UNDERFLOW : >>> CoderResult.OVERFLOW, src, sp, dst, dp); >>> } >>> >>> Regards, >>> Ulf >>> >> > > From Xueming.Shen at Sun.COM Mon Dec 15 23:39:05 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Mon, 15 Dec 2008 15:39:05 -0800 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946DF38.9030007@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> <4946DF38.9030007@gmx.de> Message-ID: <4946EA99.50105@sun.com> Ulf, this is a simple benchmark test case I was using for the singlebyte stuff, you can benchmark lots of things with simple tweak. It's a simple version from Martin's more complicated/sophisticated benchmark. Sherman Ulf Zibis wrote: > one more question, just for interest: > Can you see any performance difference between > sp != sl > and > sp < sl > ? > > -Ulf > > > Am 15.12.2008 23:19, Xueming Shen schrieb: >> >> The gain from doing >> >> int sr = src.remaining(); >> int dr = dst.remaining(); >> >> Ulf, thanks for looking into the changes. >> >> It might not be a good idea to skip the temporary variable c in the >> loop, I'm not sure >> it's a good idea to put an "un-mappable" char into the output buffer >> in case we have >> a un-mappable though yes we don't not change the buffer position. >> This actually is >> all most all the gain come from in -server vm case when I run my >> benchmark. >> >> However in "client" vm case, interestingly I do see some performance >> gain with >> your proposed change, though I'm not sure why the loop gets faster >> with a quick >> look. So I have created a new Cr #6785335 to keep trace this issue. >> Will consider >> put this one into 7 later. >> >> Thanks again! >> >> Sherman >> >> >> Ulf Zibis wrote: >>> Maybe: >>> for (int sl = sp + (sr <= dr ? sr : dr); sp != sl; sp++, dp++) >>> is little more faster than: >>> for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, dp++) >>> >>> -Ulf >>> >>> >>> Am 15.12.2008 21:56, Ulf Zibis schrieb: >>>> Maybe little faster, especially for short strings: >>>> >>>> private CoderResult decodeArrayLoop(ByteBuffer src, >>>> CharBuffer dst) { >>>> byte[] sa = src.array(); >>>> int sp = src.arrayOffset() + src.position(); >>>> int sr = src.remaining(); // faster than ... >>>> src.arrayOffset() + src.limit() >>>> >>>> char[] da = dst.array(); >>>> int dp = dst.arrayOffset() + dst.position(); >>>> int dr = dst.remaining(); // dl is never used >>>> >>>> for (int sl = sp + (sr <= dr ? sr : dr); sp < sl; sp++, >>>> dp++) >>>> if ((da[dp] = decode(sa[sp])) == UNMAPPABLE_DECODING) >>>> return >>>> withResult(CoderResult.unmappableForLength(1), src, sp, dst, dp); >>>> return withResult(sr <= dr ? CoderResult.UNDERFLOW : >>>> CoderResult.OVERFLOW, src, sp, dst, dp); >>>> } >>>> >>>> Regards, >>>> Ulf >>>> >>> >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: NIOCodingMicroBenchmark.java Type: text/x-java Size: 7955 bytes Desc: not available URL: From Ulf.Zibis at gmx.de Tue Dec 16 00:25:55 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Tue, 16 Dec 2008 01:25:55 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946EA99.50105@sun.com> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> <4946DF38.9030007@gmx.de> <4946EA99.50105@sun.com> Message-ID: <4946F593.6030508@gmx.de> Sherman, thanks very much. -Ulf Am 16.12.2008 00:39, Xueming Shen schrieb: > Ulf, this is a simple benchmark test case I was using for the > singlebyte stuff, you > can benchmark lots of things with simple tweak. It's a simple version > from Martin's > more complicated/sophisticated benchmark. > > Sherman > From Ulf.Zibis at gmx.de Tue Dec 16 11:22:25 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Tue, 16 Dec 2008 12:22:25 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <4946D7EA.2060902@sun.com> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> Message-ID: <49478F71.80007@gmx.de> Am 15.12.2008 23:19, Xueming Shen schrieb: > > .... So I have created a new Cr #6785335 to keep trace this issue. > Will consider > put this one into 7 later. > This bug is not available :-( ... or can you give me correct link? -Ulf From David.Holmes at Sun.COM Tue Dec 16 12:19:59 2008 From: David.Holmes at Sun.COM (David Holmes - Sun Microsystems) Date: Tue, 16 Dec 2008 22:19:59 +1000 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <49478F71.80007@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <4946C475.6080609@gmx.de> <4946C762.8010003@gmx.de> <4946D7EA.2060902@sun.com> <49478F71.80007@gmx.de> Message-ID: <49479CEF.4030701@sun.com> It takes a couple of days for new bugs to become visible in bug parade. David Ulf Zibis said the following on 12/16/08 21:22: > Am 15.12.2008 23:19, Xueming Shen schrieb: >> >> .... So I have created a new Cr #6785335 to keep trace this issue. >> Will consider >> put this one into 7 later. >> > > This bug is not available :-( > > ... or can you give me correct link? > > -Ulf > > From xueming.shen at sun.com Thu Dec 18 06:57:34 2008 From: xueming.shen at sun.com (xueming.shen at sun.com) Date: Thu, 18 Dec 2008 06:57:34 +0000 Subject: hg: jdk7/tl/jdk: 6496274: jar seems to use more CPU than it should Message-ID: <20081218065756.3B925DA5B@hg.openjdk.java.net> Changeset: 57dc40ece164 Author: sherman Date: 2008-12-17 22:50 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/57dc40ece164 6496274: jar seems to use more CPU than it should Summary: boost jar creating performance especially for the large jar file Reviewed-by: martin ! src/share/classes/sun/tools/jar/Main.java From mark at klomp.org Thu Dec 18 13:36:06 2008 From: mark at klomp.org (Mark Wielaard) Date: Thu, 18 Dec 2008 14:36:06 +0100 Subject: [security-dev 00466]: hg: jdk7/tl/jdk: 6496274: jar seems to use more CPU than it should In-Reply-To: <20081218065756.3B925DA5B@hg.openjdk.java.net> References: <20081218065756.3B925DA5B@hg.openjdk.java.net> Message-ID: <1229607366.3441.12.camel@dijkstra.wildebeest.org> Hi, On Thu, 2008-12-18 at 06:57 +0000, xueming.shen at sun.com wrote: > Changeset: 57dc40ece164 > Author: sherman > Date: 2008-12-17 22:50 -0800 > URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/57dc40ece164 > > 6496274: jar seems to use more CPU than it should > Summary: boost jar creating performance especially for the large jar file > Reviewed-by: martin > > ! src/share/classes/sun/tools/jar/Main.java Heay, this is a pretty cool patch. In IcedTea we explicitly added an configure option to work around the slowness (especially on platforms that only have the zero interpreter available): --with-alt-jar specify the location of an alternate jar binary to use for building So you can build against fastjar (a plain C GPLed jar implementation) to work around the same issue. Fixing the java based jar implementation directly is way cooler though (we really should backport this after some testing). Is there a way to raise awareness of stuff like this that people are working on? If I hadn't seen the mercurial commit email I might have completely missed it. I assume there is some way to get alerts from the bug tracker where this was first reported. Could should bug reports be send to the mailinglist somehow? And I see this actually has a "Reviewed-by" tag, but I never saw the original patch proposal, nor the review on any mailinglist (I might have missed it though, I am only subscribed to half of the mailinglists). If there was a code patch review mailinglist for patches like these I would certainly subscribe. Thanks, Mark From xuelei.fan at sun.com Fri Dec 19 02:46:38 2008 From: xuelei.fan at sun.com (xuelei.fan at sun.com) Date: Fri, 19 Dec 2008 02:46:38 +0000 Subject: hg: jdk7/tl/jdk: 6750401: SSL stress test with GF leads to 32 bit max process size in less than 5 minutes, with PCKS11 provider Message-ID: <20081219024649.AFC8DDAD1@hg.openjdk.java.net> Changeset: 85fe3cd9d6f9 Author: wetmore Date: 2008-12-19 10:35 +0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/85fe3cd9d6f9 6750401: SSL stress test with GF leads to 32 bit max process size in less than 5 minutes,with PCKS11 provider Summary: This is the JSSE portion of the fix. Main part is in PKCS11. Reviewed-by: valeriep, xuelei ! src/share/classes/sun/security/ssl/CipherBox.java ! src/share/classes/sun/security/ssl/SSLEngineImpl.java ! src/share/classes/sun/security/ssl/SSLSocketImpl.java From Ulf.Zibis at gmx.de Fri Dec 19 13:20:45 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Fri, 19 Dec 2008 14:20:45 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <20081210221115.6881DD5DA@hg.openjdk.java.net> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> Message-ID: <494B9FAD.9050808@gmx.de> Hi Sherman, where can I get information, if this changeset is included in JDK7 snapshot source bundle + snapshot binaries? Regards, Ulf Am 10.12.2008 23:10, xueming.shen at sun.com schrieb: > Changeset: b89ba9a6d9a6 > Author: sherman > Date: 2008-12-10 14:03 -0800 > URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 > > 6642323: Speeding up Single Byte Decoders > 6642328: Speeding up Single Byte Encoders > Summary: re-implementation of mapping based sbcs charts > Reviewed-by: alanb > > From Xueming.Shen at Sun.COM Fri Dec 19 16:34:44 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Fri, 19 Dec 2008 08:34:44 -0800 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <494B9FAD.9050808@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <494B9FAD.9050808@gmx.de> Message-ID: <494BCD24.3040001@sun.com> When you see the status of these bugs marked as "Fix Delivered". Sherman Ulf Zibis wrote: > Hi Sherman, > > where can I get information, if this changeset is included in JDK7 > snapshot source bundle + snapshot binaries? > > Regards, > Ulf > > > Am 10.12.2008 23:10, xueming.shen at sun.com schrieb: >> Changeset: b89ba9a6d9a6 >> Author: sherman >> Date: 2008-12-10 14:03 -0800 >> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 >> >> 6642323: Speeding up Single Byte Decoders >> 6642328: Speeding up Single Byte Encoders >> Summary: re-implementation of mapping based sbcs charts >> Reviewed-by: alanb >> >> > From Xueming.Shen at Sun.COM Fri Dec 19 16:42:33 2008 From: Xueming.Shen at Sun.COM (Xueming Shen) Date: Fri, 19 Dec 2008 08:42:33 -0800 Subject: [security-dev 00466]: hg: jdk7/tl/jdk: 6496274: jar seems to use more CPU than it should In-Reply-To: <1229607366.3441.12.camel@dijkstra.wildebeest.org> References: <20081218065756.3B925DA5B@hg.openjdk.java.net> <1229607366.3441.12.camel@dijkstra.wildebeest.org> Message-ID: <494BCEF9.1050001@sun.com> Hi Mark, No, you did not miss anything. The "original patch proposal " had not been sent to any of the community mailing lists, the "reviewed-by" is for the final code review, which was not sent to the mailing list as well, I don't think we send each/every code review request out, especially when the change itself is not that "big". Maybe this one is worth a blog after it finally makes into the binaries/snapshot. And I will try to backport it into previous releases after baked in the 7 for a while. Thanks, Sherman Mark Wielaard wrote: > Hi, > > On Thu, 2008-12-18 at 06:57 +0000, xueming.shen at sun.com wrote: > >> Changeset: 57dc40ece164 >> Author: sherman >> Date: 2008-12-17 22:50 -0800 >> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/57dc40ece164 >> >> 6496274: jar seems to use more CPU than it should >> Summary: boost jar creating performance especially for the large jar file >> Reviewed-by: martin >> >> ! src/share/classes/sun/tools/jar/Main.java >> > > Heay, this is a pretty cool patch. > In IcedTea we explicitly added an configure option to work around the > slowness (especially on platforms that only have the zero interpreter > available): > --with-alt-jar specify the location of an alternate jar binary to > use for building > So you can build against fastjar (a plain C GPLed jar implementation) to > work around the same issue. Fixing the java based jar implementation > directly is way cooler though (we really should backport this after some > testing). > > Is there a way to raise awareness of stuff like this that people are > working on? If I hadn't seen the mercurial commit email I might have > completely missed it. I assume there is some way to get alerts from the > bug tracker where this was first reported. Could should bug reports be > send to the mailinglist somehow? And I see this actually has a > "Reviewed-by" tag, but I never saw the original patch proposal, nor the > review on any mailinglist (I might have missed it though, I am only > subscribed to half of the mailinglists). If there was a code patch > review mailinglist for patches like these I would certainly subscribe. > > Thanks, > > Mark > > From Bradford.Wetmore at Sun.COM Fri Dec 19 17:03:55 2008 From: Bradford.Wetmore at Sun.COM (Brad Wetmore) Date: Fri, 19 Dec 2008 09:03:55 -0800 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <494B9FAD.9050808@gmx.de> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <494B9FAD.9050808@gmx.de> Message-ID: <494BD3FB.3060705@sun.com> If you want to see the source change now, check out the changeset: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 This change will not be seen immediately in the JDK7 snapshot source and binaries. As you may know, we use a series of subgates to make development and testing easier, and to prevent breakage in one area from seriously impacting everyone in unrelated areas. For way too much info: http://blogs.sun.com/wetmore/entry/you_re_a_gatekeeper_uh To your question, this change was just putback into the TL gate. Generally, changes from the TL gate a putback migrate in the MASTER gate once every two weeks. This follows roughly a week of testing by our quality team. Our release engineering then does builds every two weeks. So depending on where we in are in the TL and RE cycles when the engineer does his/her putback, it could be 1 week to 1 month before the change appears at: http://jdk7.dev.java.net/ The integration and build schedule is at: http://openjdk.java.net/projects/jdk7/builds/ The holiday isn't helping! ;) So I'm guessing it will be available in b44 around 22 Jan 09, assuming TL integrates and there are no hiccups. Hope this helps. Brad Ulf Zibis wrote: > Hi Sherman, > > where can I get information, if this changeset is included in JDK7 > snapshot source bundle + snapshot binaries? > > Regards, > Ulf > > > Am 10.12.2008 23:10, xueming.shen at sun.com schrieb: >> Changeset: b89ba9a6d9a6 >> Author: sherman >> Date: 2008-12-10 14:03 -0800 >> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 >> >> 6642323: Speeding up Single Byte Decoders >> 6642328: Speeding up Single Byte Encoders >> Summary: re-implementation of mapping based sbcs charts >> Reviewed-by: alanb >> >> > From mark at klomp.org Fri Dec 19 17:15:16 2008 From: mark at klomp.org (Mark Wielaard) Date: Fri, 19 Dec 2008 18:15:16 +0100 Subject: [security-dev 00466]: hg: jdk7/tl/jdk: 6496274: jar seems to use more CPU than it should In-Reply-To: <494BCEF9.1050001@sun.com> References: <20081218065756.3B925DA5B@hg.openjdk.java.net> <1229607366.3441.12.camel@dijkstra.wildebeest.org> <494BCEF9.1050001@sun.com> Message-ID: <1229706916.3344.95.camel@dijkstra.wildebeest.org> Hi Sherman, On Fri, 2008-12-19 at 08:42 -0800, Xueming Shen wrote: > No, you did not miss anything. The "original patch proposal " had not > been sent to > any of the community mailing lists, the "reviewed-by" is for the final > code review, > which was not sent to the mailing list as well, I don't think we send > each/every code > review request out, especially when the change itself is not that "big". Were was the original patch proposal sent to then? Where was the final code review done? I must say I find it a little disappointing that apparently some people in the community don't have to know about the why, how and what of certain code changes. Of course doing development in the open doesn't mean you get any good feedback, sometimes you are just the only real expert. But not posting and discussing patches in the first place makes sure you never will get any feedback during development. That makes it a lot harder to slowly grow the community. If the community gets the idea that some people just check in anything without any public discussion whatsoever that would be bad imho. If we can encourage more open development that would be good, because I think it will make people feel more involved. Cheers, Mark From Ulf.Zibis at gmx.de Fri Dec 19 17:49:08 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Fri, 19 Dec 2008 18:49:08 +0100 Subject: hg: jdk7/tl/jdk: 6642323: Speeding up Single Byte Decoders; ... In-Reply-To: <494BD3FB.3060705@sun.com> References: <20081210221115.6881DD5DA@hg.openjdk.java.net> <494B9FAD.9050808@gmx.de> <494BD3FB.3060705@sun.com> Message-ID: <494BDE94.9010806@gmx.de> Hi Sherman, Hi Brad, very much thanks for this explanations. So as I understand right, looking for posts like "Added tag jdk7-b40 for changeset 44be42de6693" doesn't make much sense in my case. Regards and happy holidays, Ulf Am 19.12.2008 18:03, Brad Wetmore schrieb: > > If you want to see the source change now, check out the changeset: > > http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 > > This change will not be seen immediately in the JDK7 snapshot source > and binaries. As you may know, we use a series of subgates to make > development and testing easier, and to prevent breakage in one area > from seriously impacting everyone in unrelated areas. > > For way too much info: > > http://blogs.sun.com/wetmore/entry/you_re_a_gatekeeper_uh > > To your question, this change was just putback into the TL gate. > Generally, changes from the TL gate a putback migrate in the MASTER > gate once every two weeks. This follows roughly a week of testing by > our quality team. Our release engineering then does builds every two > weeks. So depending on where we in are in the TL and RE cycles when > the engineer does his/her putback, it could be 1 week to 1 month > before the change appears at: > > http://jdk7.dev.java.net/ > > The integration and build schedule is at: > > http://openjdk.java.net/projects/jdk7/builds/ > > The holiday isn't helping! ;) > > So I'm guessing it will be available in b44 around 22 Jan 09, assuming > TL integrates and there are no hiccups. > > Hope this helps. > > Brad > > > > > Ulf Zibis wrote: >> Hi Sherman, >> >> where can I get information, if this changeset is included in JDK7 >> snapshot source bundle + snapshot binaries? >> >> Regards, >> Ulf >> >> >> Am 10.12.2008 23:10, xueming.shen at sun.com schrieb: >>> Changeset: b89ba9a6d9a6 >>> Author: sherman >>> Date: 2008-12-10 14:03 -0800 >>> URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b89ba9a6d9a6 >>> >>> 6642323: Speeding up Single Byte Decoders >>> 6642328: Speeding up Single Byte Encoders >>> Summary: re-implementation of mapping based sbcs charts >>> Reviewed-by: alanb >>> >>> >> > > From Ulf.Zibis at gmx.de Sun Dec 21 20:39:22 2008 From: Ulf.Zibis at gmx.de (Ulf Zibis) Date: Sun, 21 Dec 2008 21:39:22 +0100 Subject: java-nio-charset-enhanced -- Milestone 3 is released Message-ID: <494EA97A.6060404@gmx.de> Hi folks, milestone 3 of charset enhancement is released. - compared to JDK 6 classes, I downsized the footprint to 13 %, which also should perform class loading, because encoder maps will be lazy initialized. - additionally memory consumption of those encoders is reduced to roundabout 30 %, depending on particular charset. - In this release I established an alternative mapping technique, which should be faster for most real text's character distribution with minimal mapping failures, but maybe slower on massive occurrence of unmappable codes or rare characters. See my projects home: ---> https://java-nio-charset-enhanced.dev.java.net/ I believe, these technics could also be used for most multi-byte charsets. Happy holidays, -Ulf From tim.bell at sun.com Mon Dec 22 03:04:59 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:04:59 +0000 Subject: hg: jdk7/tl: 3 new changesets Message-ID: <20081222030459.3F6CEDCC1@hg.openjdk.java.net> Changeset: 60aab86966e9 Author: ohair Date: 2008-12-05 17:18 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/rev/60aab86966e9 6781784: Fix ant link in build readme Reviewed-by: michaelm ! README-builds.html Changeset: 94052b872873 Author: xdono Date: 2008-12-15 10:24 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/rev/94052b872873 Merge Changeset: 848e684279d2 Author: xdono Date: 2008-12-18 21:33 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/rev/848e684279d2 Added tag jdk7-b42 for changeset 94052b872873 ! .hgtags From tim.bell at sun.com Mon Dec 22 03:06:59 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:06:59 +0000 Subject: hg: jdk7/tl/corba: 2 new changesets Message-ID: <20081222030701.1B3D5DCC6@hg.openjdk.java.net> Changeset: ccd6a16502e0 Author: xdono Date: 2008-12-15 16:55 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/ccd6a16502e0 6785258: Update copyright year Summary: Update copyright for files that have been modified starting July 2008 to Dec 2008 Reviewed-by: katleman, ohair, tbell ! make/common/Defs-windows.gmk ! make/common/shared/Compiler-msvc.gmk Changeset: 9cd740d48a48 Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/corba/rev/9cd740d48a48 Added tag jdk7-b42 for changeset ccd6a16502e0 ! .hgtags From tim.bell at sun.com Mon Dec 22 03:10:39 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:10:39 +0000 Subject: hg: jdk7/tl/hotspot: 25 new changesets Message-ID: <20081222031126.98C24DCCB@hg.openjdk.java.net> Changeset: 2b42b31e7928 Author: coleenp Date: 2008-11-21 08:09 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/2b42b31e7928 6676175: BigApps crash JVM Client VM (build 10.0-b22, mixed mode, sharing) with SIGSEGV (0xb) Summary: Add test for biased locking epoch before walking own thread stack in case of rare race Reviewed-by: phh, never ! src/share/vm/runtime/biasedLocking.cpp Changeset: ba7f9d894282 Author: kamg Date: 2008-11-21 15:10 -0500 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/ba7f9d894282 Merge - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.cpp - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.hpp Changeset: 171e581e8161 Author: xlu Date: 2008-11-22 00:16 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/171e581e8161 6554406: Change switch UseVMInterruptibleIO default to false (sol) Summary: The default value of UseVMInterruptibleIO is changed to false for JDK 7, but the default isn't changed for JDK 6 and earlier. Reviewed-by: never, acorn, dholmes, kamg, alanb ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp Changeset: b22701a8b88f Author: coleenp Date: 2008-11-24 14:45 -0500 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/b22701a8b88f 6474243: suspicious jvmti code that uses oop unsafely across GC point Summary: oop stored in unsafely in Lscratch noticed by visual inspection will not be updated by GC. Reviewed-by: kamg, never, kvn ! src/cpu/sparc/vm/templateTable_sparc.cpp Changeset: a60eabc24e2c Author: kamg Date: 2008-11-25 15:59 -0500 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/a60eabc24e2c Merge Changeset: 00b023ae2d78 Author: ysr Date: 2008-11-20 12:27 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/00b023ae2d78 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists Summary: When we encounter marking stack overflow during precleaning of Reference lists, we were using the overflow list mechanism, which can cause problems on account of mutating the mark word of the header because of conflicts with mutator accesses and updates of that field. Instead we should use the usual mechanism for overflow handling in concurrent phases, namely dirtying of the card on which the overflowed object lies. Since precleaning effectively does a form of discovered list processing, albeit with discovery enabled, we needed to adjust some code to be correct in the face of interleaved processing and discovery. Reviewed-by: apetrusenko, jcoomes ! src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp ! src/share/vm/memory/referenceProcessor.cpp ! src/share/vm/runtime/globals.hpp Changeset: c96030fff130 Author: ysr Date: 2008-11-20 16:56 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/c96030fff130 6684579: SoftReference processing can be made more efficient Summary: For current soft-ref clearing policies, we can decide at marking time if a soft-reference will definitely not be cleared, postponing the decision of whether it will definitely be cleared to the final reference processing phase. This can be especially beneficial in the case of concurrent collectors where the marking is usually concurrent but reference processing is usually not. Reviewed-by: jmasa ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/g1/concurrentMark.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1MarkSweep.cpp ! src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp ! src/share/vm/includeDB_core ! src/share/vm/memory/defNewGeneration.cpp ! src/share/vm/memory/genCollectedHeap.cpp ! src/share/vm/memory/genMarkSweep.cpp ! src/share/vm/memory/referencePolicy.cpp ! src/share/vm/memory/referencePolicy.hpp ! src/share/vm/memory/referenceProcessor.cpp ! src/share/vm/memory/referenceProcessor.hpp ! src/share/vm/memory/universe.cpp ! src/share/vm/utilities/macros.hpp Changeset: df4305d4c1a1 Author: ysr Date: 2008-11-24 09:53 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/df4305d4c1a1 6774607: SIGSEGV or (!is_null(v),"oop value can never be zero") assertion when running with CMS and COOPs Summary: Use the more permissive set_klass_or_null() and klass_or_null() interfaces in ParNew's workqueue overflow code that manipulates the klass-word. Reviewed-by: coleenp ! src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ! src/share/vm/oops/oop.inline.hpp Changeset: 434912c745cf Author: iveresov Date: 2008-11-26 09:24 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/434912c745cf Merge ! src/share/vm/runtime/globals.hpp Changeset: b6272ef4a18f Author: poonam Date: 2008-11-27 18:19 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/b6272ef4a18f 6743339: Enable building sa-jdi.jar and sawindbg.dll on Windows with hotspot build Summary: These changes enable the SA binaries build with hotspot build on Windows Reviewed-by: swamyv ! make/windows/build.make ! make/windows/makefiles/defs.make ! make/windows/makefiles/sa.make Changeset: 27a80744a83b Author: ysr Date: 2008-12-01 23:25 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/27a80744a83b 6778647: snap(), snap_policy() should be renamed setup(), setup_policy() Summary: Renamed Reference{Policy,Pocessor} methods from snap{,_policy}() to setup{,_policy}() Reviewed-by: apetrusenko ! src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ! src/share/vm/gc_implementation/g1/concurrentMark.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1MarkSweep.cpp ! src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp ! src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ! src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp ! src/share/vm/memory/defNewGeneration.cpp ! src/share/vm/memory/genCollectedHeap.cpp ! src/share/vm/memory/genMarkSweep.cpp ! src/share/vm/memory/referencePolicy.cpp ! src/share/vm/memory/referencePolicy.hpp ! src/share/vm/memory/referenceProcessor.cpp ! src/share/vm/memory/referenceProcessor.hpp Changeset: 95cad1ab2510 Author: jmasa Date: 2008-12-03 14:44 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/95cad1ab2510 Merge Changeset: 3a86a8dcf27c Author: never Date: 2008-11-25 13:14 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/3a86a8dcf27c 6756768: C1 generates invalid code Reviewed-by: kvn, jrose ! src/share/vm/c1/c1_GraphBuilder.cpp ! src/share/vm/c1/c1_GraphBuilder.hpp ! src/share/vm/c1/c1_ValueMap.hpp + test/compiler/6756768/Test6756768.java + test/compiler/6756768/Test6756768_2.java Changeset: 424f9bfe6b96 Author: kvn Date: 2008-12-03 13:41 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/424f9bfe6b96 6775880: EA +DeoptimizeALot: assert(mon_info->owner()->is_locked(),"object must be locked now") Summary: Create new "eliminated" BoxLock node for monitor debug info when corresponding locks are eliminated. Reviewed-by: never ! src/share/vm/opto/callnode.cpp ! src/share/vm/opto/callnode.hpp ! src/share/vm/opto/compile.cpp ! src/share/vm/opto/escape.cpp ! src/share/vm/opto/locknode.cpp ! src/share/vm/opto/locknode.hpp ! src/share/vm/opto/macro.cpp ! src/share/vm/opto/output.cpp + test/compiler/6775880/Test.java Changeset: 1f54ed41d6ae Author: kvn Date: 2008-12-04 08:55 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/1f54ed41d6ae Merge Changeset: 85f1b9537f70 Author: iveresov Date: 2008-12-03 14:18 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/85f1b9537f70 6779436: NUMA allocator: libnuma expects certain size of the buffer in numa_node_to_cpus() Summary: In os::Linux::rebuild_cpu_to_node_map() fix the size of the CPU bitmap. Fixed arithmetic in MutableNUMASpace::adaptive_chunk_size() that could cause overflows and underflows of the chunk_size variable. Reviewed-by: apetrusenko ! src/os/linux/vm/os_linux.cpp ! src/os/linux/vm/os_linux.hpp ! src/os/solaris/vm/os_solaris.cpp ! src/os/solaris/vm/os_solaris.hpp ! src/os/windows/vm/os_windows.cpp ! src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp ! src/share/vm/runtime/globals.hpp Changeset: ab25f609be4a Author: jmasa Date: 2008-12-04 09:04 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/ab25f609be4a Merge Changeset: 8a0c882e46d6 Author: jmasa Date: 2008-12-04 13:21 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/8a0c882e46d6 Merge Changeset: dc16daa0329d Author: poonam Date: 2008-12-04 17:29 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/dc16daa0329d 6739363: Xcheck jni doesn't check native function arguments Summary: Fix adds support for verifying arguments with -Xcheck:jni. Reviewed-by: coleenp ! src/os/windows/vm/os_windows.cpp ! src/share/vm/includeDB_core ! src/share/vm/includeDB_features ! src/share/vm/prims/jniCheck.cpp ! src/share/vm/prims/jniCheck.hpp ! src/share/vm/runtime/javaCalls.cpp ! src/share/vm/runtime/javaCalls.hpp ! src/share/vm/runtime/sharedRuntime.cpp Changeset: 63d1bf926938 Author: poonam Date: 2008-12-04 17:48 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/63d1bf926938 Merge - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.cpp - src/share/vm/gc_implementation/concurrentMarkSweep/concurrentGCThread.hpp Changeset: 8724fb00c422 Author: blacklion Date: 2008-12-05 15:06 -0500 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/8724fb00c422 Merge ! src/os/windows/vm/os_windows.cpp ! src/share/vm/includeDB_core Changeset: 7cee1a61ffd7 Author: trims Date: 2008-12-05 15:32 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/7cee1a61ffd7 Merge Changeset: 3c4d36b4a7ac Author: trims Date: 2008-12-05 15:45 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/3c4d36b4a7ac 6781742: Bump HS14 build number to 09 Summary: Update Hotspot 14 build number to b09 Reviewed-by: jcoomes ! make/hotspot_version Changeset: ad8c8ca4ab0f Author: xdono Date: 2008-12-15 16:55 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/ad8c8ca4ab0f 6785258: Update copyright year Summary: Update copyright for files that have been modified starting July 2008 to Dec 2008 Reviewed-by: katleman, ohair, tbell ! src/cpu/x86/vm/vm_version_x86_32.hpp ! src/cpu/x86/vm/vm_version_x86_64.hpp ! src/os/linux/launcher/java.c ! src/os/linux/launcher/java.h ! src/os/linux/launcher/java_md.c ! src/os/linux/vm/globals_linux.hpp ! src/os/solaris/launcher/java.c ! src/os/solaris/launcher/java.h ! src/os/solaris/launcher/java_md.c ! src/os/solaris/vm/globals_solaris.hpp ! src/os/windows/vm/globals_windows.hpp ! src/os/windows/vm/os_windows.hpp ! src/os_cpu/linux_x86/vm/linux_x86_32.ad ! src/share/tools/IdealGraphVisualizer/Data/src/com/sun/hotspot/igv/data/serialization/XMLWriter.java ! src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java ! src/share/tools/IdealGraphVisualizer/Filter/src/com/sun/hotspot/igv/filter/CustomFilter.java ! src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/PropertiesSheet.java ! src/share/tools/IdealGraphVisualizer/Util/src/com/sun/hotspot/igv/util/RangeSliderModel.java ! src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramViewModel.java ! src/share/vm/adlc/adlparse.cpp ! src/share/vm/adlc/adlparse.hpp ! src/share/vm/adlc/filebuff.cpp ! src/share/vm/adlc/filebuff.hpp ! src/share/vm/adlc/formssel.hpp ! src/share/vm/c1/c1_GraphBuilder.cpp ! src/share/vm/c1/c1_GraphBuilder.hpp ! src/share/vm/c1/c1_IR.cpp ! src/share/vm/c1/c1_ValueMap.hpp ! src/share/vm/ci/ciEnv.cpp ! src/share/vm/ci/ciTypeFlow.cpp ! src/share/vm/classfile/classFileParser.hpp ! src/share/vm/gc_implementation/g1/concurrentMark.cpp ! src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp ! src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ! src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp ! src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp ! src/share/vm/gc_implementation/g1/g1MarkSweep.cpp ! src/share/vm/gc_implementation/g1/heapRegion.cpp ! src/share/vm/gc_implementation/g1/heapRegion.hpp ! src/share/vm/gc_implementation/g1/heapRegionSeq.cpp ! src/share/vm/gc_implementation/g1/heapRegionSeq.hpp ! src/share/vm/gc_implementation/g1/ptrQueue.cpp ! src/share/vm/gc_implementation/g1/ptrQueue.hpp ! src/share/vm/gc_implementation/includeDB_gc_g1 ! src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp ! src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp ! src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp ! src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.hpp ! src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp ! src/share/vm/interpreter/bytecodeStream.cpp ! src/share/vm/interpreter/bytecodes.cpp ! src/share/vm/interpreter/bytecodes.hpp ! src/share/vm/memory/referencePolicy.cpp ! src/share/vm/memory/referencePolicy.hpp ! src/share/vm/memory/tenuredGeneration.hpp ! src/share/vm/oops/constantPoolOop.cpp ! src/share/vm/opto/block.hpp ! src/share/vm/opto/phase.cpp ! src/share/vm/opto/phase.hpp ! src/share/vm/prims/jniCheck.cpp ! src/share/vm/prims/jniCheck.hpp ! src/share/vm/prims/jvmtiEnvBase.cpp ! src/share/vm/prims/jvmtiTrace.cpp ! src/share/vm/runtime/javaCalls.cpp ! src/share/vm/runtime/javaCalls.hpp ! src/share/vm/runtime/perfMemory.cpp ! src/share/vm/runtime/perfMemory.hpp ! src/share/vm/runtime/thread.hpp ! src/share/vm/services/threadService.hpp ! src/share/vm/utilities/array.hpp ! src/share/vm/utilities/constantTag.hpp ! src/share/vm/utilities/growableArray.hpp ! src/share/vm/utilities/hashtable.cpp ! src/share/vm/utilities/taskqueue.cpp Changeset: 5e5faba1ac11 Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/hotspot/rev/5e5faba1ac11 Added tag jdk7-b42 for changeset ad8c8ca4ab0f ! .hgtags From tim.bell at sun.com Mon Dec 22 03:15:07 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:15:07 +0000 Subject: hg: jdk7/tl/jaxp: Added tag jdk7-b42 for changeset 036e0dca841a Message-ID: <20081222031508.BB2EEDCD0@hg.openjdk.java.net> Changeset: 96fe28d4a913 Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jaxp/rev/96fe28d4a913 Added tag jdk7-b42 for changeset 036e0dca841a ! .hgtags From tim.bell at sun.com Mon Dec 22 03:17:07 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:17:07 +0000 Subject: hg: jdk7/tl/jaxws: Added tag jdk7-b42 for changeset 621c02d83abc Message-ID: <20081222031709.393B7DCD5@hg.openjdk.java.net> Changeset: 1ad2f51564db Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jaxws/rev/1ad2f51564db Added tag jdk7-b42 for changeset 621c02d83abc ! .hgtags From tim.bell at sun.com Mon Dec 22 03:19:17 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:19:17 +0000 Subject: hg: jdk7/tl/jdk: 4 new changesets Message-ID: <20081222032003.A2683DCDA@hg.openjdk.java.net> Changeset: 3ef0bdfa7609 Author: xdono Date: 2008-12-15 16:55 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3ef0bdfa7609 6785258: Update copyright year Summary: Update copyright for files that have been modified starting July 2008 to Dec 2008 Reviewed-by: katleman, ohair, tbell ! make/javax/swing/Makefile ! make/netbeans/jmx/build.xml ! make/sun/net/spi/Makefile ! make/sun/net/spi/nameservice/Makefile ! src/share/classes/com/sun/java/swing/SwingUtilities3.java ! src/share/classes/com/sun/java/swing/plaf/windows/DesktopProperty.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java ! src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java ! src/share/classes/com/sun/jmx/defaults/ServiceName.java ! src/share/classes/com/sun/jmx/mbeanserver/ClassLoaderRepositorySupport.java ! src/share/classes/com/sun/jmx/mbeanserver/ObjectInputStreamWithLoader.java ! src/share/classes/com/sun/jmx/mbeanserver/SecureClassLoaderRepository.java ! src/share/classes/com/sun/jmx/mbeanserver/WeakIdentityHashMap.java ! src/share/classes/com/sun/jmx/remote/internal/ArrayNotificationBuffer.java ! src/share/classes/com/sun/jmx/remote/internal/Unmarshal.java ! src/share/classes/com/sun/jmx/remote/util/ClassLoaderWithRepository.java ! src/share/classes/com/sun/jmx/remote/util/ClassLogger.java ! src/share/classes/com/sun/jmx/remote/util/OrderClassLoaders.java ! src/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java ! src/share/classes/java/awt/EventDispatchThread.java ! src/share/classes/java/net/HttpURLConnection.java ! src/share/classes/java/nio/Buffer.java ! src/share/classes/java/nio/channels/SelectableChannel.java ! src/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java ! src/share/classes/java/text/SimpleDateFormat.java ! src/share/classes/javax/management/ClientContext.java ! src/share/classes/javax/management/DefaultLoaderRepository.java ! src/share/classes/javax/management/JMRuntimeException.java ! src/share/classes/javax/management/MBeanAttributeInfo.java ! src/share/classes/javax/management/MBeanConstructorInfo.java ! src/share/classes/javax/management/MBeanInfo.java ! src/share/classes/javax/management/Notification.java ! src/share/classes/javax/management/NotificationListener.java ! src/share/classes/javax/management/loading/DefaultLoaderRepository.java ! src/share/classes/javax/management/loading/MLetObjectInputStream.java ! src/share/classes/javax/management/modelmbean/ModelMBeanInfo.java ! src/share/classes/javax/management/openmbean/OpenMBeanParameterInfoSupport.java ! src/share/classes/javax/management/relation/MBeanServerNotificationFilter.java ! src/share/classes/javax/management/relation/Role.java ! src/share/classes/javax/management/relation/RoleList.java ! src/share/classes/javax/management/relation/RoleResult.java ! src/share/classes/javax/management/relation/RoleUnresolved.java ! src/share/classes/javax/management/relation/RoleUnresolvedList.java ! src/share/classes/javax/management/remote/rmi/NoCallStackClassLoader.java ! src/share/classes/javax/management/remote/rmi/RMIConnection.java ! src/share/classes/javax/management/remote/rmi/RMIServerImpl.java ! src/share/classes/javax/swing/AbstractCellEditor.java ! src/share/classes/javax/swing/AbstractListModel.java ! src/share/classes/javax/swing/AbstractSpinnerModel.java ! src/share/classes/javax/swing/ActionMap.java ! src/share/classes/javax/swing/AncestorNotifier.java ! src/share/classes/javax/swing/ArrayTable.java ! src/share/classes/javax/swing/ButtonGroup.java ! src/share/classes/javax/swing/DefaultBoundedRangeModel.java ! src/share/classes/javax/swing/DefaultButtonModel.java ! src/share/classes/javax/swing/DefaultFocusManager.java ! src/share/classes/javax/swing/DefaultSingleSelectionModel.java ! src/share/classes/javax/swing/GroupLayout.java ! src/share/classes/javax/swing/InputMap.java ! src/share/classes/javax/swing/JDesktopPane.java ! src/share/classes/javax/swing/JDialog.java ! src/share/classes/javax/swing/JLayeredPane.java ! src/share/classes/javax/swing/JMenu.java ! src/share/classes/javax/swing/JMenuItem.java ! src/share/classes/javax/swing/JSpinner.java ! src/share/classes/javax/swing/JTextField.java ! src/share/classes/javax/swing/JTree.java ! src/share/classes/javax/swing/JWindow.java ! src/share/classes/javax/swing/KeyboardManager.java ! src/share/classes/javax/swing/LayoutComparator.java ! src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java ! src/share/classes/javax/swing/LegacyGlueFocusTraversalPolicy.java ! src/share/classes/javax/swing/MultiUIDefaults.java ! src/share/classes/javax/swing/RepaintManager.java ! src/share/classes/javax/swing/SortingFocusTraversalPolicy.java ! src/share/classes/javax/swing/SpringLayout.java ! src/share/classes/javax/swing/Timer.java ! src/share/classes/javax/swing/TimerQueue.java ! src/share/classes/javax/swing/UIDefaults.java ! src/share/classes/javax/swing/UIManager.java ! src/share/classes/javax/swing/border/CompoundBorder.java ! src/share/classes/javax/swing/plaf/basic/BasicButtonListener.java ! src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java ! src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java ! src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java ! src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java ! src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java ! src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java ! src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java ! src/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java ! src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java ! src/share/classes/javax/swing/plaf/basic/BasicTextUI.java ! src/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java ! src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java ! src/share/classes/javax/swing/plaf/basic/DragRecognitionSupport.java ! src/share/classes/javax/swing/plaf/basic/LazyActionMap.java ! src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java ! src/share/classes/javax/swing/plaf/metal/MetalBumps.java ! src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java ! src/share/classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java ! src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java ! src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java ! src/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java ! src/share/classes/javax/swing/plaf/synth/DefaultSynthStyleFactory.java ! src/share/classes/javax/swing/plaf/synth/ImagePainter.java ! src/share/classes/javax/swing/plaf/synth/Region.java ! src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java ! src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java ! src/share/classes/javax/swing/plaf/synth/SynthContext.java ! src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java ! src/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java ! src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java ! src/share/classes/javax/swing/plaf/synth/SynthParser.java ! src/share/classes/javax/swing/plaf/synth/SynthStyle.java ! src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java ! src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java ! src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java ! src/share/classes/javax/swing/table/AbstractTableModel.java ! src/share/classes/javax/swing/table/DefaultTableModel.java ! src/share/classes/javax/swing/text/AsyncBoxView.java ! src/share/classes/javax/swing/text/ComponentView.java ! src/share/classes/javax/swing/text/DefaultCaret.java ! src/share/classes/javax/swing/text/DefaultFormatter.java ! src/share/classes/javax/swing/text/DefaultHighlighter.java ! src/share/classes/javax/swing/text/DefaultStyledDocument.java ! src/share/classes/javax/swing/text/ElementIterator.java ! src/share/classes/javax/swing/text/GapContent.java ! src/share/classes/javax/swing/text/InternationalFormatter.java ! src/share/classes/javax/swing/text/LayoutQueue.java ! src/share/classes/javax/swing/text/MaskFormatter.java ! src/share/classes/javax/swing/text/SegmentCache.java ! src/share/classes/javax/swing/text/SimpleAttributeSet.java ! src/share/classes/javax/swing/text/StringContent.java ! src/share/classes/javax/swing/text/StyleContext.java ! src/share/classes/javax/swing/text/TableView.java ! src/share/classes/javax/swing/text/TextAction.java ! src/share/classes/javax/swing/text/TextLayoutStrategy.java ! src/share/classes/javax/swing/text/ZoneView.java ! src/share/classes/javax/swing/text/html/HRuleView.java ! src/share/classes/javax/swing/text/html/HTML.java ! src/share/classes/javax/swing/text/html/HTMLDocument.java ! src/share/classes/javax/swing/text/html/HTMLWriter.java ! src/share/classes/javax/swing/text/html/Map.java ! src/share/classes/javax/swing/text/html/MinimalHTMLWriter.java ! src/share/classes/javax/swing/text/html/OptionListModel.java ! src/share/classes/javax/swing/text/html/StyleSheet.java ! src/share/classes/javax/swing/text/html/TableView.java ! src/share/classes/javax/swing/text/html/parser/TagStack.java ! src/share/classes/javax/swing/text/rtf/MockAttributeSet.java ! src/share/classes/javax/swing/text/rtf/RTFParser.java ! src/share/classes/javax/swing/text/rtf/RTFReader.java ! src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java ! src/share/classes/javax/swing/tree/DefaultTreeModel.java ! src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java ! src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java ! src/share/classes/javax/swing/undo/StateEdit.java ! src/share/classes/javax/swing/undo/UndoManager.java ! src/share/classes/javax/swing/undo/UndoableEditSupport.java ! src/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java ! src/share/classes/org/jcp/xml/dsig/internal/SignerOutputStream.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheData.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyName.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMStructure.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMUtils.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.java ! src/share/classes/org/jcp/xml/dsig/internal/dom/Utils.java ! src/share/classes/sun/awt/im/CompositionArea.java ! src/share/classes/sun/management/jmxremote/LocalRMIServerSocketFactory.java ! src/share/classes/sun/net/ProgressEvent.java ! src/share/classes/sun/net/httpserver/ExchangeImpl.java ! src/share/classes/sun/net/httpserver/FixedLengthInputStream.java ! src/share/classes/sun/net/httpserver/Request.java ! src/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java ! src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java ! src/share/classes/sun/security/provider/certpath/OCSPResponse.java ! src/share/classes/sun/swing/AccessibleMethod.java ! src/share/classes/sun/swing/SwingLazyValue.java ! src/share/classes/sun/swing/SwingUtilities2.java ! src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java ! src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java ! src/share/classes/sun/util/calendar/ZoneInfo.java ! src/share/classes/sun/util/resources/TimeZoneNames.java ! src/share/classes/sun/util/resources/TimeZoneNames_de.java ! src/share/classes/sun/util/resources/TimeZoneNames_es.java ! src/share/classes/sun/util/resources/TimeZoneNames_fr.java ! src/share/classes/sun/util/resources/TimeZoneNames_it.java ! src/share/classes/sun/util/resources/TimeZoneNames_ja.java ! src/share/classes/sun/util/resources/TimeZoneNames_ko.java ! src/share/classes/sun/util/resources/TimeZoneNames_sv.java ! src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java ! src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java ! src/share/native/sun/font/bidi/ubidi.c ! src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java ! src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java ! src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java ! test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh ! test/java/nio/Buffer/Basic-X.java ! test/java/nio/Buffer/Basic.java ! test/java/nio/Buffer/BasicByte.java ! test/java/nio/Buffer/BasicChar.java ! test/java/nio/Buffer/BasicDouble.java ! test/java/nio/Buffer/BasicFloat.java ! test/java/nio/Buffer/BasicInt.java ! test/java/nio/Buffer/BasicLong.java ! test/java/nio/Buffer/BasicShort.java ! test/java/nio/Buffer/genBasic.sh ! test/java/nio/Buffer/genCopyDirectMemory.sh ! test/java/nio/channels/Channels/Basic.java ! test/java/util/TimeZone/OldIDMappingTest.sh ! test/javax/management/Introspector/AnnotationTest.java ! test/javax/management/MBeanServer/MBeanExceptionTest.java ! test/javax/management/context/ContextTest.java ! test/javax/management/context/LocaleTest.java ! test/javax/management/context/LocalizableTest.java ! test/javax/management/context/localizable/MBeanDescriptions_fr.java ! test/javax/management/context/localizable/Whatsit.java ! test/javax/management/context/localizable/WhatsitMBean.java ! test/javax/management/remote/mandatory/provider/ProviderTest.java ! test/javax/management/remote/mandatory/subjectDelegation/SimpleStandard.java ! test/javax/swing/RepaintManager/6608456/bug6608456.java ! test/javax/swing/text/html/HRuleView/Test5062055.java ! test/javax/xml/crypto/dsig/GenerationTests.java Changeset: 51a20a7ee9c8 Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/51a20a7ee9c8 Added tag jdk7-b42 for changeset 3ef0bdfa7609 ! .hgtags Changeset: 18ab3173fcec Author: tbell Date: 2008-12-19 10:37 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/18ab3173fcec Merge ! src/share/classes/javax/management/MBeanAttributeInfo.java ! src/share/classes/javax/management/MBeanConstructorInfo.java ! src/share/classes/javax/management/remote/rmi/RMIServerImpl.java Changeset: 850d381fa9aa Author: tbell Date: 2008-12-19 22:07 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/850d381fa9aa Merge From tim.bell at sun.com Mon Dec 22 03:25:07 2008 From: tim.bell at sun.com (tim.bell at sun.com) Date: Mon, 22 Dec 2008 03:25:07 +0000 Subject: hg: jdk7/tl/langtools: 4 new changesets Message-ID: <20081222032514.2D3B4DCDF@hg.openjdk.java.net> Changeset: fdfed22db054 Author: xdono Date: 2008-12-15 16:55 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/fdfed22db054 6785258: Update copyright year Summary: Update copyright for files that have been modified starting July 2008 to Dec 2008 Reviewed-by: katleman, ohair, tbell ! src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java ! src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java ! src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java ! src/share/classes/com/sun/tools/javac/comp/Todo.java ! src/share/classes/com/sun/tools/javac/util/JavacMessages.java ! src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java ! src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java ! src/share/classes/com/sun/tools/javadoc/JavadocTodo.java ! src/share/classes/com/sun/tools/javadoc/Main.java ! src/share/classes/com/sun/tools/javadoc/Start.java ! src/share/classes/javax/tools/FileObject.java ! test/com/sun/javadoc/AuthorDD/AuthorDD.java ! test/com/sun/javadoc/lib/JavadocTester.java ! test/com/sun/javadoc/testSupplementary/TestSupplementary.java ! test/tools/apt/Basics/print.sh ! test/tools/apt/Compile/compile.sh ! test/tools/apt/Discovery/discovery.sh ! test/tools/apt/mirror/declaration/AnnoMirror.java ! test/tools/apt/mirror/declaration/AnnoTypeDecl.java ! test/tools/apt/mirror/declaration/AnnoTypeElemDecl.java ! test/tools/apt/mirror/declaration/AnnoVal.java ! test/tools/apt/mirror/declaration/ClassDecl.java ! test/tools/apt/mirror/declaration/ConstExpr.java ! test/tools/apt/mirror/declaration/ConstructorDecl.java ! test/tools/apt/mirror/declaration/EnumDecl.java ! test/tools/apt/mirror/declaration/FieldDecl.java ! test/tools/apt/mirror/declaration/GetAnno.java ! test/tools/apt/mirror/declaration/InterfaceDecl.java ! test/tools/apt/mirror/declaration/MethodDecl.java ! test/tools/apt/mirror/declaration/PackageDecl.java ! test/tools/apt/mirror/declaration/ParameterDecl.java ! test/tools/apt/mirror/type/AnnoTyp.java ! test/tools/apt/mirror/type/ArrayTyp.java ! test/tools/apt/mirror/type/ClassTyp.java ! test/tools/apt/mirror/type/EnumTyp.java ! test/tools/apt/mirror/type/InterfaceTyp.java ! test/tools/apt/mirror/type/PrimitiveTyp.java ! test/tools/apt/mirror/type/TypeVar.java ! test/tools/apt/mirror/type/WildcardTyp.java ! test/tools/apt/mirror/util/Overrides.java ! test/tools/apt/mirror/util/TypeCreation.java ! test/tools/javac/6457284/T6457284.java ! test/tools/javac/links/T.java ! test/tools/javac/links/links.sh ! test/tools/javac/policy/test1/A.java ! test/tools/javac/policy/test1/D.java ! test/tools/javac/policy/test1/Test1a.java ! test/tools/javac/processing/6348193/T6348193.java ! test/tools/javadoc/BooleanConst.java ! test/tools/javadoc/BreakIteratorWarning.java ! test/tools/javadoc/FlagsTooEarly.java ! test/tools/javadoc/InlineTagsWithBraces.java ! test/tools/javadoc/LangVers.java ! test/tools/javadoc/MethodLinks.java ! test/tools/javadoc/NoStar.java ! test/tools/javadoc/T4994049/T4994049.java ! test/tools/javadoc/XWerror.java ! test/tools/javadoc/completionFailure/CompletionFailure.java ! test/tools/javadoc/dupOk/DupOk.java ! test/tools/javadoc/imports/MissingImport.java ! test/tools/javadoc/lib/Tester.java ! test/tools/javadoc/nestedClass/NestedClass.java ! test/tools/javadoc/sourceOnly/p/SourceOnly.java ! test/tools/javadoc/sourceOption/SourceOption.java ! test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java Changeset: 5e5567c2db56 Author: xdono Date: 2008-12-15 17:13 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/5e5567c2db56 Merge Changeset: b044af4939c9 Author: xdono Date: 2008-12-18 21:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/b044af4939c9 Added tag jdk7-b42 for changeset 5e5567c2db56 ! .hgtags Changeset: e2f8f6daee9d Author: tbell Date: 2008-12-19 10:39 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/e2f8f6daee9d Merge From linuxhippy at gmail.com Mon Dec 22 20:51:24 2008 From: linuxhippy at gmail.com (Clemens Eisserer) Date: Mon, 22 Dec 2008 21:51:24 +0100 Subject: Interest in support for saturated casts? Message-ID: <194f62550812221251w19d2c55aye53c19476275bbce@mail.gmail.com> Hi, I currently use an utility-class heavily for the XRender Java2D backend, which performs saturated casts: 1.) return (short) (x > Short.MAX_VALUE ? Short.MAX_VALUE : (x < Short.MIN_VALUE ? Short.MIN_VALUE : x)); 2.) return (short) (x > 65535 ? 65535 : (x < 0) ? 0 : x); I spent quite some time benchmarking/tuning the protocol-generation-methods, and a lot of cycles are spent in those saturated casts, even if the utility methods are static. E.g. XRenderFillRectangle takes 40 cycles without clamping, but already 70 cycles with on my core2duo with hotspot-server/jdk 14.0. Hotspot seems to solve the problem always with conditional jumps, although well predictable ones. Modern processors seem to have support for this kind of operation, in x86 there's packssdw in MMX/SSE2. I think something like a saturated cast could be quite useful, there are already cast-methods in Long/Integer/Short - what do you think about adding saturated casts to that API? Those could be instrified to use MMX/SSE2 if available. If that would be too specific how hard would it be to add this kind of optimization to hotspot? How far does SIMD support in hotspot go (I read some time ago there've been some optimizations), if SIMD would be supported 4 casts could be done in a single cycle :) Thanks, Clemens From gbenson at redhat.com Tue Dec 23 10:21:19 2008 From: gbenson at redhat.com (Gary Benson) Date: Tue, 23 Dec 2008 10:21:19 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour Message-ID: <20081223102119.GB3241@redhat.com> Hi all, In C, the result of an overflowing add of two signed integers is undefined. The array bounds checks in readBytes and writeBytes in jdk/src/share/native/java/io/io_util.c, however, rely on the assumption that the result of the overflowing add will be negative. The attached patch fixes. Cheers, Gary -- http://gbenson.net/ -------------- next part -------------- diff -r 201a75db9b35 openjdk/jdk/src/share/native/java/io/io_util.c --- openjdk/jdk/src/share/native/java/io/io_util.c Mon Dec 22 12:32:44 2008 +0000 +++ openjdk/jdk/src/share/native/java/io/io_util.c Mon Dec 22 12:48:49 2008 +0000 @@ -25,6 +25,7 @@ #include #include +#include #include "jni.h" #include "jni_util.h" @@ -73,9 +74,10 @@ return -1; } datalen = (*env)->GetArrayLength(env, bytes); + assert(datalen >= 0); - if ((off < 0) || (off > datalen) || - (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { + if ((off < 0) || (len < 0) || + (((uint32_t) off + (uint32_t) len) > (uint32_t) datalen)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0); return -1; } @@ -146,9 +148,10 @@ return; } datalen = (*env)->GetArrayLength(env, bytes); + assert(datalen >= 0); - if ((off < 0) || (off > datalen) || - (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { + if ((off < 0) || (len < 0) || + (((uint32_t) off + (uint32_t) len) > (uint32_t) datalen)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0); return; } -------------- next part -------------- /* @test * @bug 6788196 * @summary Check that file IO array bounds checks are applied */ import java.io.File; import java.io.FileInputStream; public class Test6788196 { public static void main(String[] args) throws Exception { File file = new File( System.getProperty("test.src", "."), "Test6779290.java"); FileInputStream fis = new FileInputStream(file); byte[] b = new byte[20]; try { fis.read(b, 10, Integer.MAX_VALUE); } catch (ArrayIndexOutOfBoundsException e) { throw e; } catch (IndexOutOfBoundsException e) { } } } From gbenson at redhat.com Tue Dec 23 11:23:12 2008 From: gbenson at redhat.com (Gary Benson) Date: Tue, 23 Dec 2008 11:23:12 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <20081223102119.GB3241@redhat.com> References: <20081223102119.GB3241@redhat.com> Message-ID: <20081223112312.GB6286@redhat.com> Gary Benson wrote: > File file = new File( > System.getProperty("test.src", "."), "Test6779290.java"); Oops, that should be "Test6788196.java". Cheers, Gary -- http://gbenson.net/ From alan.bateman at sun.com Tue Dec 23 17:38:36 2008 From: alan.bateman at sun.com (alan.bateman at sun.com) Date: Tue, 23 Dec 2008 17:38:36 +0000 Subject: hg: jdk7/tl/jdk: 6787009: (attach) Stub injection potentially unsafe on windows-x64 Message-ID: <20081223173907.B9D77DDEF@hg.openjdk.java.net> Changeset: 3d09cc6c4ea9 Author: alanb Date: 2008-12-22 19:28 +0000 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3d09cc6c4ea9 6787009: (attach) Stub injection potentially unsafe on windows-x64 Reviewed-by: mchung ! src/windows/native/sun/tools/attach/WindowsVirtualMachine.c From martinrb at google.com Tue Dec 23 20:42:23 2008 From: martinrb at google.com (Martin Buchholz) Date: Tue, 23 Dec 2008 12:42:23 -0800 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <20081223102119.GB3241@redhat.com> References: <20081223102119.GB3241@redhat.com> Message-ID: <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> Hi Gary, Does this actually change the behavior with recent gccs? It seems like the introduction of uint32_t is trading one non-portability for another, namely relying on C99 features. I have been waiting patiently for C99 compilers to emerge, but gcc for example is still not there yet. http://gcc.gnu.org/c99status.html If you are going to use types like uint32_t, you should be including the standard header that defines them - More immediate and obvious improvements to the code would be to change the type of datalen to "jsize" and the type of nread to "jint". I suggest, instead of using unsigned types, is to do what java code would do in a case like this, and cast to jlong instead of uint32_t to avoid overflow. I approve this patch if you make that change. I see you've eliminated one of the checks, which was unnecessary. Thanks for that. Martin On Tue, Dec 23, 2008 at 02:21, Gary Benson wrote: > Hi all, > > In C, the result of an overflowing add of two signed integers is > undefined. The array bounds checks in readBytes and writeBytes > in jdk/src/share/native/java/io/io_util.c, however, rely on the > assumption that the result of the overflowing add will be negative. > The attached patch fixes. > > Cheers, > Gary > > -- > http://gbenson.net/ > From David.Holmes at Sun.COM Wed Dec 24 00:02:02 2008 From: David.Holmes at Sun.COM (David Holmes - Sun Microsystems) Date: Wed, 24 Dec 2008 10:02:02 +1000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> References: <20081223102119.GB3241@redhat.com> <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> Message-ID: <49517BFA.9060907@sun.com> >> In C, the result of an overflowing add of two signed integers is >> undefined. Strewth! That's a surprise to me. I always thought that C defined integer arithmetic to always wrap. Checking for a negative to detect overflow is a common pattern - heck it's THE pattern for detecting overflow according to "Hacker's Delight"! But it isn't valid C ! ??? Even in Java this pattern is used a lot - I guess it's lucky the VM goes straight to machine code not C otherwise we'd be in trouble! David Holmes Martin Buchholz said the following on 12/24/08 06:42: > Hi Gary, > > Does this actually change the behavior with recent gccs? > > It seems like the introduction of uint32_t is trading one > non-portability for another, namely relying on C99 features. > I have been waiting patiently for C99 compilers to emerge, > but gcc for example is still not there yet. > http://gcc.gnu.org/c99status.html > > If you are going to use types like uint32_t, you should > be including the standard header that defines them - > > More immediate and obvious improvements to the code would > be to change the type of datalen to "jsize" and the type of nread > to "jint". > > I suggest, instead of using unsigned types, is to do what > java code would do in a case like this, and cast to jlong > instead of uint32_t to avoid overflow. I approve this patch > if you make that change. > > I see you've eliminated one of the checks, which was unnecessary. > Thanks for that. > > Martin > > On Tue, Dec 23, 2008 at 02:21, Gary Benson wrote: >> Hi all, >> >> In C, the result of an overflowing add of two signed integers is >> undefined. The array bounds checks in readBytes and writeBytes >> in jdk/src/share/native/java/io/io_util.c, however, rely on the >> assumption that the result of the overflowing add will be negative. >> The attached patch fixes. >> >> Cheers, >> Gary >> >> -- >> http://gbenson.net/ >> From Dalibor.Topic at Sun.COM Wed Dec 24 01:43:17 2008 From: Dalibor.Topic at Sun.COM (Dalibor Topic) Date: Wed, 24 Dec 2008 02:43:17 +0100 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <49517BFA.9060907@sun.com> References: <20081223102119.GB3241@redhat.com> <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> <49517BFA.9060907@sun.com> Message-ID: <495193B5.9090106@sun.com> David Holmes - Sun Microsystems wrote: > >> In C, the result of an overflowing add of two signed integers is > >> undefined. > > Strewth! That's a surprise to me. I always thought that C defined > integer arithmetic to always wrap. Only for unsigned operands (from 6.2.5 - Types): "A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value modulo reduced that can be represented by the resulting type." see p. 496 in the "The New C Standard: An Economic and Cultural Commentary" for more details then most people care. ;) cheers, dalibor topic -- ******************************************************************* Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:Dalibor.Topic at sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht M?nchen: HRB 161028 Gesch?ftsf?hrer: Thomas Schr?der, Wolfgang Engels, Dr. Roland B?mer Vorsitzender des Aufsichtsrates: Martin H?ring From gbenson at redhat.com Wed Dec 24 10:12:25 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 24 Dec 2008 10:12:25 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <495193B5.9090106@sun.com> References: <20081223102119.GB3241@redhat.com> <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> <49517BFA.9060907@sun.com> <495193B5.9090106@sun.com> Message-ID: <20081224101225.GA3229@redhat.com> Dalibor Topic wrote: > David Holmes - Sun Microsystems wrote: > > > In C, the result of an overflowing add of two signed integers is > > > undefined. > > > > Strewth! That's a surprise to me. I always thought that C defined > > integer arithmetic to always wrap. > > Only for unsigned operands (from 6.2.5 - Types): > > "A computation involving unsigned operands can never overflow, > because a result that cannot be represented by the resulting > unsigned integer type is reduced modulo the number that is one > greater than the largest value modulo reduced that can be > represented by the resulting type." If I remember rightly the logic behind this is that having to worry about overflows makes a number of loop optimizations impossible. Most loop counters are signed, they made the result of signed overflows undefined while defining the result of unsigned overflow so that there was something you could use if you wanted to detect them. Cheers, Gary -- http://gbenson.net/ From gbenson at redhat.com Wed Dec 24 10:25:43 2008 From: gbenson at redhat.com (Gary Benson) Date: Wed, 24 Dec 2008 10:25:43 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> References: <20081223102119.GB3241@redhat.com> <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> Message-ID: <20081224102543.GC3229@redhat.com> Martin Buchholz wrote: > Does this actually change the behavior with recent gccs? I don't think anything changed recently, not on Intel or SPARC, but I develop on PowerPC, and GCC on 32-bit PowerPC seems to overflow to 1, -1 or 0... sometimes. But that's not the point; the behaviour is undefined, so the result could be anything, on any platform. > It seems like the introduction of uint32_t is trading one > non-portability for another, namely relying on C99 features. > I have been waiting patiently for C99 compilers to emerge, > but gcc for example is still not there yet. > http://gcc.gnu.org/c99status.html > > If you are going to use types like uint32_t, you should > be including the standard header that defines them - I didn't realise there was a header required. I remembered I'd seen something similar in HotSpot so I just copied that piece of code. > More immediate and obvious improvements to the code would be to > change the type of datalen to "jsize" and the type of nread to > "jint". > > I suggest, instead of using unsigned types, is to do what > java code would do in a case like this, and cast to jlong > instead of uint32_t to avoid overflow. I approve this patch > if you make that change. Would it not simply be better to cast to unsigned int? I don't know about other platforms, but on 32-bit PowerPC casting to jlong would use three more registers and add a load of extra instructions whereas casting to unsigned int adds none. The impact on performance and memory usage would be negligable of course, but using 64-bit types where I don't need to makes me a little uneasy... > I see you've eliminated one of the checks, which was unnecessary. > Thanks for that. No problem :) Cheers, Gary -- http://gbenson.net/ From aph at redhat.com Wed Dec 24 14:06:29 2008 From: aph at redhat.com (Andrew Haley) Date: Wed, 24 Dec 2008 14:06:29 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour Message-ID: <495241E5.40800@redhat.com> > >> In C, the result of an overflowing add of two signed integers is > >> undefined. > > Strewth! That's a surprise to me. I always thought that C defined > integer arithmetic to always wrap. Checking for a negative to detect > overflow is a common pattern - heck it's THE pattern for detecting > overflow according to "Hacker's Delight"! But it isn't valid C ! ??? Yep, it's really true. gcc assumes that signed arithmetic can never overflow, so if ((off < 0) || (off > datalen) || (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) can be optimized to if ((off < 0) || (off > datalen) || (len < 0) || ((off + len) > datalen)) because we know that off and len are positive. This optimization doesn't seem very useful here, but it means you can do things like transforming for (int i = N; i < N + m; i++) foo(); into for (int i = m; --i >= 0;) foo(); This is not a change. gcc has done this for years, but it's a bit more aggressive than it used to be. Andrew. From aph at redhat.com Wed Dec 24 13:31:12 2008 From: aph at redhat.com (aph at redhat.com) Date: Wed, 24 Dec 2008 13:31:12 +0000 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour Message-ID: <18770.14752.594729.561605@zebedee.pink> > >> In C, the result of an overflowing add of two signed integers is > >> undefined. > > Strewth! That's a surprise to me. I always thought that C defined > integer arithmetic to always wrap. Checking for a negative to detect > overflow is a common pattern - heck it's THE pattern for detecting > overflow according to "Hacker's Delight"! But it isn't valid C ! ??? Yep, it's really true. gcc assumes that signed arithmetic can never overflow, so if ((off < 0) || (off > datalen) || (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) can be optimized to if ((off < 0) || (off > datalen) || (len < 0) || ((off + len) > datalen)) because we know that off and len are positive. This optimization doesn't seem very useful here, but it means you can do things like transforming for (int i = N; i < N + m; i++) foo(); into for (int i = m; --i >= 0;) foo(); This is not a change. gcc has done this for years, but it's a bit more aggressive than it used to be. Andrew. From martinrb at google.com Wed Dec 24 22:41:16 2008 From: martinrb at google.com (Martin Buchholz) Date: Wed, 24 Dec 2008 14:41:16 -0800 Subject: [PATCH] 6788196: Array bounds checks in io_util.c rely on undefined behaviour In-Reply-To: <20081224102543.GC3229@redhat.com> References: <20081223102119.GB3241@redhat.com> <1ccfd1c10812231242o458a2b06k4db729f7c72dc71c@mail.gmail.com> <20081224102543.GC3229@redhat.com> Message-ID: <1ccfd1c10812241441m76667f0dk97f51621b732081b@mail.gmail.com> I have sympathy for Gary's reluctance to use jlong, even though we all know that here the performance of 64-bit operands doesn't matter. I propose an alternate patch, which avoids the overflow problem by simply rearranging the operands, and adds other pedantic improvements. I believe it may not be 100% portable to replace (len < 0) || (off < 0) with ((len | off) < 0) I'll leave that optimization to the compiler. diff --git a/src/share/native/java/io/io_util.c b/src/share/native/java/io/io_util.c --- a/src/share/native/java/io/io_util.c +++ b/src/share/native/java/io/io_util.c @@ -25,6 +25,7 @@ #include #include +#include #include "jni.h" #include "jni_util.h" @@ -34,9 +35,9 @@ /* IO helper functions */ -int +jint readSingle(JNIEnv *env, jobject this, jfieldID fid) { - int nread; + jint nread; char ret; FD fd = GET_FD(this, fid); if (fd == -1) { @@ -59,13 +60,14 @@ readSingle(JNIEnv *env, jobject this, jf #define BUF_SIZE 8192 -int +jint readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, jint len, jfieldID fid) { - int nread, datalen; + jint nread; + jsize datalen; char stackBuf[BUF_SIZE]; - char *buf = 0; + char *buf = NULL; FD fd; if (IS_NULL(bytes)) { @@ -74,8 +76,10 @@ readBytes(JNIEnv *env, jobject this, jby } datalen = (*env)->GetArrayLength(env, bytes); - if ((off < 0) || (off > datalen) || - (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { + if ((off < 0) || + (len < 0) || + /* Avoid undefined signed integer overflow. */ + (datalen - off < len)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0); return -1; } @@ -84,7 +88,7 @@ readBytes(JNIEnv *env, jobject this, jby return 0; } else if (len > BUF_SIZE) { buf = malloc(len); - if (buf == 0) { + if (buf == NULL) { JNU_ThrowOutOfMemoryError(env, 0); return 0; } @@ -118,7 +122,7 @@ void void writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid) { char c = byte; - int n; + jint n; FD fd = GET_FD(this, fid); if (fd == -1) { JNU_ThrowIOException(env, "Stream Closed"); @@ -134,11 +138,12 @@ writeSingle(JNIEnv *env, jobject this, j void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, - jint off, jint len, jfieldID fid) + jint off, jint len, jfieldID fid) { - int n, datalen; + jint n; + jsize datalen; char stackBuf[BUF_SIZE]; - char *buf = 0; + char *buf = NULL; FD fd; if (IS_NULL(bytes)) { @@ -147,8 +152,10 @@ writeBytes(JNIEnv *env, jobject this, jb } datalen = (*env)->GetArrayLength(env, bytes); - if ((off < 0) || (off > datalen) || - (len < 0) || ((off + len) > datalen) || ((off + len) < 0)) { + if ((off < 0) || + (len < 0) || + /* Avoid undefined signed integer overflow. */ + (datalen - off < len)) { JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", 0); return; } @@ -157,7 +164,7 @@ writeBytes(JNIEnv *env, jobject this, jb return; } else if (len > BUF_SIZE) { buf = malloc(len); - if (buf == 0) { + if (buf == NULL) { JNU_ThrowOutOfMemoryError(env, 0); return; } @@ -196,19 +203,19 @@ throwFileNotFoundException(JNIEnv *env, throwFileNotFoundException(JNIEnv *env, jstring path) { char buf[256]; - int n; + jint n; jobject x; jstring why = NULL; n = JVM_GetLastErrorString(buf, sizeof(buf)); if (n > 0) { - why = JNU_NewStringPlatform(env, buf); + why = JNU_NewStringPlatform(env, buf); } x = JNU_NewObjectByName(env, "java/io/FileNotFoundException", "(Ljava/lang/String;Ljava/lang/String;)V", path, why); if (x != NULL) { - (*env)->Throw(env, x); + (*env)->Throw(env, x); } } diff --git a/src/share/native/java/io/io_util.h b/src/share/native/java/io/io_util.h --- a/src/share/native/java/io/io_util.h +++ b/src/share/native/java/io/io_util.h @@ -38,9 +38,9 @@ extern jfieldID IO_handle_fdID; * IO helper functions */ -int readSingle(JNIEnv *env, jobject this, jfieldID fid); -int readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, - jint len, jfieldID fid); +jint readSingle(JNIEnv *env, jobject this, jfieldID fid); +jint readBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, + jint len, jfieldID fid); void writeSingle(JNIEnv *env, jobject this, jint byte, jfieldID fid); void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, jint len, jfieldID fid); Martin On Wed, Dec 24, 2008 at 02:25, Gary Benson wrote: > Martin Buchholz wrote: >> Does this actually change the behavior with recent gccs? > > I don't think anything changed recently, not on Intel or SPARC, > but I develop on PowerPC, and GCC on 32-bit PowerPC seems to > overflow to 1, -1 or 0... sometimes. But that's not the point; > the behaviour is undefined, so the result could be anything, > on any platform. > >> It seems like the introduction of uint32_t is trading one >> non-portability for another, namely relying on C99 features. >> I have been waiting patiently for C99 compilers to emerge, >> but gcc for example is still not there yet. >> http://gcc.gnu.org/c99status.html >> >> If you are going to use types like uint32_t, you should >> be including the standard header that defines them - > > I didn't realise there was a header required. I remembered I'd > seen something similar in HotSpot so I just copied that piece of > code. > >> More immediate and obvious improvements to the code would be to >> change the type of datalen to "jsize" and the type of nread to >> "jint". >> >> I suggest, instead of using unsigned types, is to do what >> java code would do in a case like this, and cast to jlong >> instead of uint32_t to avoid overflow. I approve this patch >> if you make that change. > > Would it not simply be better to cast to unsigned int? I don't > know about other platforms, but on 32-bit PowerPC casting to > jlong would use three more registers and add a load of extra > instructions whereas casting to unsigned int adds none. The > impact on performance and memory usage would be negligable of > course, but using 64-bit types where I don't need to makes me > a little uneasy... > >> I see you've eliminated one of the checks, which was unnecessary. >> Thanks for that. > > No problem :) > > Cheers, > Gary > > -- > http://gbenson.net/ >