from a Spliterator extends T> it
> wouldn't help here, since we can't create Spliterator extends T>
> from two spliterators: Spliterator extends T> and Spliterator
> extends T> without unsafe cast in the first place...
>
> So maybe we should bury the unsafe cast in the ConcatSpliterator's
> constructor then...
>
> Regards, Peter
>
>>
>>>
>>> Regards, Peter
>>>
>>
>> cheers,
>> R?mi
>>
>
From mandy.chung at oracle.com Mon Jul 1 17:57:32 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Mon, 01 Jul 2013 10:57:32 -0700
Subject: RFR: JDK-7184195 - java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
In-Reply-To: <51D18365.3040409@oracle.com>
References: <51C1CEE9.9010200@oracle.com> <51CDE603.1030309@oracle.com>
<51D18365.3040409@oracle.com>
Message-ID: <51D1C30C.1070408@oracle.com>
On 7/1/13 6:25 AM, Daniel Fuchs wrote:
>
>> Looks good in general. Some comments:
>>
>> Logger.global is deprecated. In LogManager static initializer, we
>> should have @SuppressWarnings("deprecation") on Logger.global (probably
>> need to define a local variable) to suppress the warning and together
>> with your comment it will make it clear that accessing this deprecated
>> field is intentional.
>
> Right. I can do that. But I don't see any warnings when compiling
> (with make) - maybe they're turned out by default?
Deprecation and a few other javac warnings are disabled (see
jdk/makefiles/Setup.gmk).
>
>>
>> As you pointed out, the same pattern is used in the checkPermission()
>> method. Might be worth having a private getManager() method to replace
>> direct access to the manager field in the Logger class - just a thought
>> to prevent similar bug from happening again.
>
> Well - hmm - I'd prefer to do that in a later cleanup.
> I'd want first to analyze all the places where manager is used.
> Plus there is Peter's suggestion about changing the dynamics
> between LogManager & Logger.
> Both are excellent suggestions but I think I'd like to dedicate
> a whole changeset for this kind of cleanup, without mixing it
> with bug fix.
Agree. It's good to do it in a separate fix especially it may involve
untangling the Logger and LogManager initialization.
Mandy
From daniel.fuchs at oracle.com Mon Jul 1 18:07:33 2013
From: daniel.fuchs at oracle.com (Daniel Fuchs)
Date: Mon, 01 Jul 2013 20:07:33 +0200
Subject: RFR: JDK-7184195 - java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
In-Reply-To: <51D1C1B0.7050107@oracle.com>
References: <51C1CEE9.9010200@oracle.com> <51CECB3E.2010501@gmail.com>
<51D1C1B0.7050107@oracle.com>
Message-ID: <51D1C565.7040004@oracle.com>
On 7/1/13 7:51 PM, Mandy Chung wrote:
> On 6/29/13 4:55 AM, Peter Levart wrote:
>> Hi,
>>
>> I haven't studied this deeply yet, but maybe somebody knows the
>> answer: Why is it necessary to add root and global loggers to
>> LogManager in it's static initializer? Global Logger could be created
>> and initialized lazily, when 1st requested (in static initialization
>> of Logger class), and the root Logger is always "ensured" lazily
>> before any other Logger is initialized. If the dependency on Logger
>> class was removed from LogManager static initialization, then Logger
>> static/lazy initialization could depend on LogManager (either just
>> LogManager.manager field when fully configured LogManager is not
>> needed/can't be requested or LogManager.getLogManager() for fully
>> configured LogManager) ...
>>
>> The initialization of LogManager, root & default Loggers is very
>> entangled currently and any change to such code can be fragile.
>>
>> What dou you think of untangling it?
>
> This is a good suggestion. Daniel has a patch to ensure both the root
> logger and global logger in the LoggerContext [1] and untangling the
> LogManager and Logger initialization would be possible.
HI Peter, Mandy,
Well - yes - this is certainly an excellent suggestion, but I think
I'd like to do it in a separate changeset dedicated to cleanup.
The trouble here is that we would want the LogManager instance to have
a root and global logger added to it - but we would also not want
any other private LogManager instances created by the application to
have any such loggers added lazily.
We would thus need a way to know whether 'this' LogManager instance
is the default, and this can only be done by comparing to the
value of the LogManager.manager field - which could pause interesting
challenges if the said field is still null...
I'd prefer to log that as a separate issue. But this is definitely
something I want to investigate in the short term.
Would that be OK with you Peter?
best regards,
-- daniel
>
> Mandy
> [1]
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018518.html
>>
>> Regards, Peter
>>
>> On 06/19/2013 05:31 PM, Daniel Fuchs wrote:
>>> Hi,
>>>
>>> Please find below a proposed fix for:
>>>
>>> 7184195 - java.util.logging.Logger.getGlobal().info()
>>> doesn't log without configuration
>>>
>>> Jim who was the original evaluator of this bug find out
>>> that the root cause of the issue was that LogManager hadn't been
>>> initialized yet, and therefore the global Logger returned had its
>>> manager instance 'null' - and more to the point - had no configuration
>>> since the configuration is established by the LogManager.
>>>
>>> The fix proposed is simple. In getGlobal() we check whether
>>> the 'manager' variable is null - and if it is, we initialize it
>>> by calling LogManager.getLogManager().
>>> This is a pattern which is already present at other places in
>>> the Logger.java class file.
>>>
>>>
>>>
>>> However - initialization of LogManager has proved to be fragile
>>> in the past - in particular wrt deadlocks between Logger and
>>> LogManager caused by circular class initialization.
>>>
>>> Therefore, I have added two test files TestGetGlobal.java and
>>> TestGetGlobal2.java which try to trigger such deadlocks by
>>> calling Logger.getGlobal()
>>> or Logger.getLogger(Logger.GLOBAL_LOGGER_NAME) before the
>>> LogManager class is initialized.
>>>
>>> The tests have a bunch of @run line trying to do so with
>>> different configurations, including by using custom LogManager
>>> subclasses, with and without a security manager on.
>>>
>>> I have seen no issue so far.
>>>
>>> best regards,
>>>
>>> -- daniel
>>
>
From mandy.chung at oracle.com Mon Jul 1 18:14:04 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Mon, 01 Jul 2013 11:14:04 -0700
Subject: RFR: 8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about
1 GB of data in work directory after execution
In-Reply-To: <51CF91CD.9040901@oracle.com>
References: <51CF91CD.9040901@oracle.com>
Message-ID: <51D1C6EC.8040106@oracle.com>
On 6/29/13 7:02 PM, Kumar Srinivasan wrote:
> Hi,
>
> Please review changes to cleanup the test area after pack200 test
> completion. Some tests generally use large jars and a local copy of
> the JDK to
> test with, created a generic utility to nuke most of the remains.
>
> The webrev:
> http://cr.openjdk.java.net/~ksrini/8017463/webrev.0/
>
In Utils.cleanup, it will delete the files with certain extensions in
the current directory. I skimmed on the tests and look to me that those
files can be altered with a different path and not necessary in the
current directory. Just wonder if you want to make cleanup to take a
path parameter instead of hardcoding the cwd. Otherwise, this change
looks fine with me.
Mandy
> The bug:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8017463
>
> Thanks
> Kumar
>
From daniel.fuchs at oracle.com Mon Jul 1 18:23:47 2013
From: daniel.fuchs at oracle.com (Daniel Fuchs)
Date: Mon, 01 Jul 2013 20:23:47 +0200
Subject: RFR: JDK-7184195 - java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
In-Reply-To: <51D1C30C.1070408@oracle.com>
References: <51C1CEE9.9010200@oracle.com> <51CDE603.1030309@oracle.com>
<51D18365.3040409@oracle.com> <51D1C30C.1070408@oracle.com>
Message-ID: <51D1C933.7040607@oracle.com>
Hi Mandy,
Please find an updated webrev.
I have refactored the tests a bit:
renamed "TestGetGlobal2" into "TestGetGlobalByName"
put the auxiliary classes in a sub directory
removed the 'Test' prefix from the auxiliary classes,
added comments in the various LogManagerImpl* classes
updated the 3 tests summary.
added "." as default value for test.src.
Hope you find it more to your liking!
Best regards,
-- daniel
On 7/1/13 7:57 PM, Mandy Chung wrote:
> On 7/1/13 6:25 AM, Daniel Fuchs wrote:
>>
>>> Looks good in general. Some comments:
>>>
>>> Logger.global is deprecated. In LogManager static initializer, we
>>> should have @SuppressWarnings("deprecation") on Logger.global (probably
>>> need to define a local variable) to suppress the warning and together
>>> with your comment it will make it clear that accessing this deprecated
>>> field is intentional.
>>
>> Right. I can do that. But I don't see any warnings when compiling
>> (with make) - maybe they're turned out by default?
>
> Deprecation and a few other javac warnings are disabled (see
> jdk/makefiles/Setup.gmk).
>>
>>>
>>> As you pointed out, the same pattern is used in the checkPermission()
>>> method. Might be worth having a private getManager() method to replace
>>> direct access to the manager field in the Logger class - just a thought
>>> to prevent similar bug from happening again.
>>
>> Well - hmm - I'd prefer to do that in a later cleanup.
>> I'd want first to analyze all the places where manager is used.
>> Plus there is Peter's suggestion about changing the dynamics
>> between LogManager & Logger.
>> Both are excellent suggestions but I think I'd like to dedicate
>> a whole changeset for this kind of cleanup, without mixing it
>> with bug fix.
>
> Agree. It's good to do it in a separate fix especially it may involve
> untangling the Logger and LogManager initialization.
>
> Mandy
From joe.darcy at oracle.com Mon Jul 1 18:24:52 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Mon, 01 Jul 2013 11:24:52 -0700
Subject: JDK 8 code review request for doclint issues in java.lang.instrument
Message-ID: <51D1C974.80704@oracle.com>
Hello,
Yet another found of doclint fixes for review; this batch to
java.lang.instrument.
Thanks,
-Joe
diff -r 9eaeb1a0aa46
src/share/classes/java/lang/instrument/Instrumentation.java
--- a/src/share/classes/java/lang/instrument/Instrumentation.java Sun
Jun 30 17:15:47 2013 -0700
+++ b/src/share/classes/java/lang/instrument/Instrumentation.java Mon
Jul 01 11:23:19 2013 -0700
@@ -363,6 +363,8 @@
* Primitive classes (for example,
java.lang.Integer.TYPE
)
* and array classes are never modifiable.
*
+ * @param theClass the class to check for being modifiable
+ * @return whether or not the argument class is modifiable
* @throws java.lang.NullPointerException if the specified class
is null
.
*
* @see #retransformClasses
@@ -549,14 +551,14 @@
* {@link java.lang.instrument.ClassFileTransformer
ClassFileTransformer},
* it enables native methods to be
* instrumented.
- *
+ *
* Since native methods cannot be directly instrumented
* (they have no bytecodes), they must be wrapped with
* a non-native method which can be instrumented.
* For example, if we had:
*
* native boolean foo(int x);
- *
+ *
* We could transform the class file (with the
* ClassFileTransformer during the initial definition
* of the class) so that this becomes:
@@ -567,14 +569,14 @@
* }
*
* native boolean wrapped_foo(int x);
- *
+ *
* Where foo
becomes a wrapper for the actual native
* method with the appended prefix "wrapped_". Note that
* "wrapped_" would be a poor choice of prefix since it
* might conceivably form the name of an existing method
* thus something like "$$$MyAgentWrapped$$$_" would be
* better but would make these examples less readable.
- *
+ *
* The wrapper will allow data to be collected on the native
* method call, but now the problem becomes linking up the
* wrapped method with the native implementation.
@@ -583,7 +585,7 @@
* which might be:
*
* Java_somePackage_someClass_foo(JNIEnv* env, jint x)
- *
+ *
* This function allows the prefix to be specified and the
* proper resolution to occur.
* Specifically, when the standard resolution fails, the
@@ -596,29 +598,29 @@
*
{@code
* method(foo) -> nativeImplementation(foo)
* }
- *
+ *
* When this fails, the resolution will be retried with
* the specified prefix prepended to the method name,
* yielding the correct resolution:
*
{@code
* method(wrapped_foo) -> nativeImplementation(foo)
* }
- *
+ *
* For automatic resolution, the JVM will attempt:
*
{@code
* method(wrapped_foo) -> nativeImplementation(wrapped_foo)
* }
- *
+ *
* When this fails, the resolution will be retried with
* the specified prefix deleted from the implementation name,
* yielding the correct resolution:
*
{@code
* method(wrapped_foo) -> nativeImplementation(foo)
* }
- *
+ *
* Note that since the prefix is only used when standard
* resolution fails, native methods can be wrapped selectively.
- *
+ *
* Since each ClassFileTransformer
* can do its own transformation of the bytecodes, more
* than one layer of wrappers may be applied. Thus each
From mandy.chung at oracle.com Mon Jul 1 18:24:04 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Mon, 01 Jul 2013 11:24:04 -0700
Subject: RFR: JDK-7184195 - java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
In-Reply-To: <51D1C933.7040607@oracle.com>
References: <51C1CEE9.9010200@oracle.com> <51CDE603.1030309@oracle.com>
<51D18365.3040409@oracle.com> <51D1C30C.1070408@oracle.com>
<51D1C933.7040607@oracle.com>
Message-ID: <51D1C944.9060801@oracle.com>
On 7/1/13 11:23 AM, Daniel Fuchs wrote:
> Hi Mandy,
>
> Please find an updated webrev.
>
> I have refactored the tests a bit:
>
> renamed "TestGetGlobal2" into "TestGetGlobalByName"
> put the auxiliary classes in a sub directory
> removed the 'Test' prefix from the auxiliary classes,
> added comments in the various LogManagerImpl* classes
> updated the 3 tests summary.
> added "." as default value for test.src.
>
>
Looks good. Thanks for the update.
Mandy
From brian.burkhalter at oracle.com Mon Jul 1 18:32:18 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Mon, 1 Jul 2013 11:32:18 -0700
Subject: Refresh - Java 8 RFR 8017540: Improve multi-threaded contention
behavior of BigInteger.toString() radix conversion cache
In-Reply-To: <51D13D6F.6010109@oracle.com>
References:
<51D13D6F.6010109@oracle.com>
Message-ID: <9ABA8055-A4F6-4263-A776-24A97BDF44FE@oracle.com>
On Jul 1, 2013, at 1:27 AM, Aleksey Shipilev wrote:
> On 06/28/2013 10:24 PM, Brian Burkhalter wrote:
>> http://cr.openjdk.java.net/~bpb/8017540/
>
> Thumbs up.
Thanks. Now all we need is the imprimatur of an OpenJDK Reviewer.
> -Aleksey.
>
> N.B.: You can put me in with "Reviewed-by: shade".
Done.
Brian
From huizhe.wang at oracle.com Mon Jul 1 18:33:56 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Mon, 01 Jul 2013 11:33:56 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D1A3F2.2000707@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
Message-ID: <51D1CB94.90901@oracle.com>
On 7/1/2013 8:44 AM, Alan Bateman wrote:
> On 01/07/2013 09:09, huizhe wang wrote:
>> Hi,
>>
>> There have been two revisions in JAXP 1.5 specification: 1) the
>> relationship between the JAXP 1.5 properties and
>> FEATURE_SECURE_PROCESSING (FSP) is now a recommendation. It is up to
>> the implementation to decide if it wants to restrict when FSP is
>> set. 2) System properties will override that may have been set by FSP.
>>
>> In the following patch, a JDK version detection code is added so that
>> when FSP is set explicitly, for JDK7, there will be no restrictions,
>> but for JDK8 and above, the restrictions are on.
>>
>> The effective order is changed so that JAXP 1.5 defined system
>> properties will override that may be set by enabling FSP.
>>
>> Please review:
>> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>>
>> Note that the patch is identical for JDK7 and 8, and I plan to ask
>> approval for 7u40 integration.
>>
>> Thanks,
>> Joe
>
> Are there tests that can be used to verify this (both for 8 and 7u40?
> Are you confident that tests cover all the overrides scenarios?
I've updated the jaxp 1.5 tests. I'll send a separate link since it's
internal. Indeed, I missed a couple of scenarios: 1) FSP can be set
after jaxp 1.5 properties are set through the API; 2) Validator does not
require, but does support FSP.
>
> I think isJDKandAbove has the assume the long standing format for
> java.version. If someone really did change the format to what you are
> suggesting then the code would fail with a value such as "7.40".
The code does support both the current and possible new format by
comparing the 0 element, e.g. Integer.parseInt(versions[0]) >=
compareTo. But I see Joe's comment provided a better way to handle this.
>
> In getJAXPSystemProperty's comment then I assume it should be
> ${java.home}.
Ok.
Thanks,
Joe
>
> -Alan
>
>
>
From huizhe.wang at oracle.com Mon Jul 1 18:34:44 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Mon, 01 Jul 2013 11:34:44 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D1A98C.70301@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1A98C.70301@oracle.com>
Message-ID: <51D1CBC4.4050904@oracle.com>
Thanks Joe! That's the API I was looking for!
On 7/1/2013 9:08 AM, Joe Darcy wrote:
> If you just want to test for platform version (7 vs 8), you might also
> look at javax.lang.model.SourceVersion.latest().
>
> -Joe
>
> On 7/1/2013 8:44 AM, Alan Bateman wrote:
>> On 01/07/2013 09:09, huizhe wang wrote:
>>> Hi,
>>>
>>> There have been two revisions in JAXP 1.5 specification: 1) the
>>> relationship between the JAXP 1.5 properties and
>>> FEATURE_SECURE_PROCESSING (FSP) is now a recommendation. It is up to
>>> the implementation to decide if it wants to restrict when FSP is
>>> set. 2) System properties will override that may have been set by FSP.
>>>
>>> In the following patch, a JDK version detection code is added so
>>> that when FSP is set explicitly, for JDK7, there will be no
>>> restrictions, but for JDK8 and above, the restrictions are on.
>>>
>>> The effective order is changed so that JAXP 1.5 defined system
>>> properties will override that may be set by enabling FSP.
>>>
>>> Please review:
>>> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>>>
>>> Note that the patch is identical for JDK7 and 8, and I plan to ask
>>> approval for 7u40 integration.
>>>
>>> Thanks,
>>> Joe
>>
>> Are there tests that can be used to verify this (both for 8 and 7u40?
>> Are you confident that tests cover all the overrides scenarios?
>>
>> I think isJDKandAbove has the assume the long standing format for
>> java.version. If someone really did change the format to what you are
>> suggesting then the code would fail with a value such as "7.40".
>>
>> In getJAXPSystemProperty's comment then I assume it should be
>> ${java.home}.
>>
>> -Alan
>>
>>
>>
>
From lance.andersen at oracle.com Mon Jul 1 18:38:43 2013
From: lance.andersen at oracle.com (Lance @ Oracle)
Date: Mon, 1 Jul 2013 14:38:43 -0400
Subject: JDK 8 code review request for doclint issues in
java.lang.instrument
In-Reply-To: <51D1C974.80704@oracle.com>
References: <51D1C974.80704@oracle.com>
Message-ID: <83B8EC57-0197-45CE-B2FD-2C654304BC9E@oracle.com>
Looks good
Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com
Sent from my iPad
On Jul 1, 2013, at 2:24 PM, Joe Darcy wrote:
> Hello,
>
> Yet another found of doclint fixes for review; this batch to java.lang.instrument.
>
> Thanks,
>
> -Joe
>
> diff -r 9eaeb1a0aa46 src/share/classes/java/lang/instrument/Instrumentation.java
> --- a/src/share/classes/java/lang/instrument/Instrumentation.java Sun Jun 30 17:15:47 2013 -0700
> +++ b/src/share/classes/java/lang/instrument/Instrumentation.java Mon Jul 01 11:23:19 2013 -0700
> @@ -363,6 +363,8 @@
> * Primitive classes (for example, java.lang.Integer.TYPE
)
> * and array classes are never modifiable.
> *
> + * @param theClass the class to check for being modifiable
> + * @return whether or not the argument class is modifiable
> * @throws java.lang.NullPointerException if the specified class is null
.
> *
> * @see #retransformClasses
> @@ -549,14 +551,14 @@
> * {@link java.lang.instrument.ClassFileTransformer ClassFileTransformer},
> * it enables native methods to be
> * instrumented.
> - *
> + *
> * Since native methods cannot be directly instrumented
> * (they have no bytecodes), they must be wrapped with
> * a non-native method which can be instrumented.
> * For example, if we had:
> *
> * native boolean foo(int x);
> - *
> + *
> * We could transform the class file (with the
> * ClassFileTransformer during the initial definition
> * of the class) so that this becomes:
> @@ -567,14 +569,14 @@
> * }
> *
> * native boolean wrapped_foo(int x);
> - *
> + *
> * Where foo
becomes a wrapper for the actual native
> * method with the appended prefix "wrapped_". Note that
> * "wrapped_" would be a poor choice of prefix since it
> * might conceivably form the name of an existing method
> * thus something like "$$$MyAgentWrapped$$$_" would be
> * better but would make these examples less readable.
> - *
> + *
> * The wrapper will allow data to be collected on the native
> * method call, but now the problem becomes linking up the
> * wrapped method with the native implementation.
> @@ -583,7 +585,7 @@
> * which might be:
> *
> * Java_somePackage_someClass_foo(JNIEnv* env, jint x)
> - *
> + *
> * This function allows the prefix to be specified and the
> * proper resolution to occur.
> * Specifically, when the standard resolution fails, the
> @@ -596,29 +598,29 @@
> *
{@code
> * method(foo) -> nativeImplementation(foo)
> * }
> - *
> + *
> * When this fails, the resolution will be retried with
> * the specified prefix prepended to the method name,
> * yielding the correct resolution:
> *
{@code
> * method(wrapped_foo) -> nativeImplementation(foo)
> * }
> - *
> + *
> * For automatic resolution, the JVM will attempt:
> *
{@code
> * method(wrapped_foo) -> nativeImplementation(wrapped_foo)
> * }
> - *
> + *
> * When this fails, the resolution will be retried with
> * the specified prefix deleted from the implementation name,
> * yielding the correct resolution:
> *
{@code
> * method(wrapped_foo) -> nativeImplementation(foo)
> * }
> - *
> + *
> * Note that since the prefix is only used when standard
> * resolution fails, native methods can be wrapped selectively.
> - *
> + *
> * Since each ClassFileTransformer
> * can do its own transformation of the bytecodes, more
> * than one layer of wrappers may be applied. Thus each
>
From Alan.Bateman at oracle.com Mon Jul 1 18:47:34 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Mon, 01 Jul 2013 19:47:34 +0100
Subject: JDK 8 code review request for doclint issues in
java.lang.instrument
In-Reply-To: <51D1C974.80704@oracle.com>
References: <51D1C974.80704@oracle.com>
Message-ID: <51D1CEC6.7080702@oracle.com>
On 01/07/2013 19:24, Joe Darcy wrote:
> Hello,
>
> Yet another found of doclint fixes for review; this batch to
> java.lang.instrument.
>
> Thanks,
>
> -Joe
This looks okay to me.
-Alan
From peter.levart at gmail.com Mon Jul 1 19:15:27 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Mon, 01 Jul 2013 21:15:27 +0200
Subject: RFR: JDK-7184195 - java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
In-Reply-To: <51D1C565.7040004@oracle.com>
References: <51C1CEE9.9010200@oracle.com> <51CECB3E.2010501@gmail.com>
<51D1C1B0.7050107@oracle.com> <51D1C565.7040004@oracle.com>
Message-ID: <51D1D54F.3000006@gmail.com>
On 07/01/2013 08:07 PM, Daniel Fuchs wrote:
> On 7/1/13 7:51 PM, Mandy Chung wrote:
>> On 6/29/13 4:55 AM, Peter Levart wrote:
>>> Hi,
>>>
>>> I haven't studied this deeply yet, but maybe somebody knows the
>>> answer: Why is it necessary to add root and global loggers to
>>> LogManager in it's static initializer? Global Logger could be created
>>> and initialized lazily, when 1st requested (in static initialization
>>> of Logger class), and the root Logger is always "ensured" lazily
>>> before any other Logger is initialized. If the dependency on Logger
>>> class was removed from LogManager static initialization, then Logger
>>> static/lazy initialization could depend on LogManager (either just
>>> LogManager.manager field when fully configured LogManager is not
>>> needed/can't be requested or LogManager.getLogManager() for fully
>>> configured LogManager) ...
>>>
>>> The initialization of LogManager, root & default Loggers is very
>>> entangled currently and any change to such code can be fragile.
>>>
>>> What dou you think of untangling it?
>>
>> This is a good suggestion. Daniel has a patch to ensure both the root
>> logger and global logger in the LoggerContext [1] and untangling the
>> LogManager and Logger initialization would be possible.
>
> HI Peter, Mandy,
>
> Well - yes - this is certainly an excellent suggestion, but I think
> I'd like to do it in a separate changeset dedicated to cleanup.
>
> The trouble here is that we would want the LogManager instance to have
> a root and global logger added to it - but we would also not want
> any other private LogManager instances created by the application to
> have any such loggers added lazily.
>
> We would thus need a way to know whether 'this' LogManager instance
> is the default, and this can only be done by comparing to the
> value of the LogManager.manager field - which could pause interesting
> challenges if the said field is still null...
>
> I'd prefer to log that as a separate issue. But this is definitely
> something I want to investigate in the short term.
> Would that be OK with you Peter?
Of course.
Regards, Peter
>
> best regards,
>
> -- daniel
>
>>
>> Mandy
>> [1]
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018518.html
>>
>>>
>>> Regards, Peter
>>>
>>> On 06/19/2013 05:31 PM, Daniel Fuchs wrote:
>>>> Hi,
>>>>
>>>> Please find below a proposed fix for:
>>>>
>>>> 7184195 - java.util.logging.Logger.getGlobal().info()
>>>> doesn't log without configuration
>>>>
>>>> Jim who was the original evaluator of this bug find out
>>>> that the root cause of the issue was that LogManager hadn't been
>>>> initialized yet, and therefore the global Logger returned had its
>>>> manager instance 'null' - and more to the point - had no configuration
>>>> since the configuration is established by the LogManager.
>>>>
>>>> The fix proposed is simple. In getGlobal() we check whether
>>>> the 'manager' variable is null - and if it is, we initialize it
>>>> by calling LogManager.getLogManager().
>>>> This is a pattern which is already present at other places in
>>>> the Logger.java class file.
>>>>
>>>>
>>>>
>>>> However - initialization of LogManager has proved to be fragile
>>>> in the past - in particular wrt deadlocks between Logger and
>>>> LogManager caused by circular class initialization.
>>>>
>>>> Therefore, I have added two test files TestGetGlobal.java and
>>>> TestGetGlobal2.java which try to trigger such deadlocks by
>>>> calling Logger.getGlobal()
>>>> or Logger.getLogger(Logger.GLOBAL_LOGGER_NAME) before the
>>>> LogManager class is initialized.
>>>>
>>>> The tests have a bunch of @run line trying to do so with
>>>> different configurations, including by using custom LogManager
>>>> subclasses, with and without a security manager on.
>>>>
>>>> I have seen no issue so far.
>>>>
>>>> best regards,
>>>>
>>>> -- daniel
>>>
>>
>
From joe.darcy at oracle.com Mon Jul 1 18:59:03 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Mon, 01 Jul 2013 18:59:03 +0000
Subject: hg: jdk8/tl/langtools: 7162089: Add support for repeating annotations
to javax.annotation.processing
Message-ID: <20130701185910.5457F486D4@hg.openjdk.java.net>
Changeset: 1908e86ee49a
Author: darcy
Date: 2013-07-01 11:58 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/1908e86ee49a
7162089: Add support for repeating annotations to javax.annotation.processing
Reviewed-by: abuckley, jjg, jfranck
! src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
! src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
! src/share/classes/javax/annotation/processing/AbstractProcessor.java
! src/share/classes/javax/annotation/processing/Processor.java
! test/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java
+ test/tools/javac/processing/environment/round/TpAnno.java
+ test/tools/javac/processing/environment/round/TypeParameterAnnotations.java
From alan.bateman at oracle.com Mon Jul 1 19:41:10 2013
From: alan.bateman at oracle.com (alan.bateman at oracle.com)
Date: Mon, 01 Jul 2013 19:41:10 +0000
Subject: hg: jdk8/tl/jdk: 8017540: Improve multi-threaded contention behavior
of radix conversion cache
Message-ID: <20130701194122.08C8B486DC@hg.openjdk.java.net>
Changeset: c8cf01de8fa8
Author: bpb
Date: 2013-07-01 11:30 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c8cf01de8fa8
8017540: Improve multi-threaded contention behavior of radix conversion cache
Summary: Replace array of ArrayList of BigIntegers with a volatile two-dimensional BigInteger array eliminate the synchronization of getRadixConversionCache()
Reviewed-by: plevart, shade, bpb, alanb
Contributed-by: Peter Levart , Dmitry Nadezhin , Aleksey Shipilev
! src/share/classes/java/math/BigInteger.java
From brian.burkhalter at oracle.com Mon Jul 1 19:47:17 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Mon, 1 Jul 2013 12:47:17 -0700
Subject: Code update for 8014319: Faster division of large integers
In-Reply-To:
References:
Message-ID: <5D364847-297D-4317-AA31-8B6A0ACD90BC@oracle.com>
Tim,
On Jun 30, 2013, at 4:20 PM, Tim Buktu wrote:
> I made a few changes to the BigInteger code in my GitHub repo:
> * Moved Burnikel-Ziegler division to MutableBigInteger
> * Added more comments to the Burnikel-Ziegler code
> * Updated Barrett thresholds
> * Merged BigInteger.java and BigIntegerTest.java with the latest from hg
That would be starting from this changeset?
changeset: 7498:01fcca3d2b8c
user: bpb
date: Thu Jun 20 12:15:24 2013 -0700
summary: 4641897: Faster string conversion of large integers
> The files at the links below contain the latest code for bugs 8014319 and 8014320.
> Brian, if you want me to, I can make an updated patch for just 8014319.
That would be helpful if you don't mind. Note that this changeset modifying BigInteger
http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c8cf01de8fa8
was just applied today.
> https://raw.github.com/tbuktu/bigint/4c24162e99227e177f17f5db9b8ca2757820d2cd/src/main/java/java/math/BigInteger.java
> https://raw.github.com/tbuktu/bigint/95f1158d2205614c8739344df07ee35523b8ad89/src/main/java/java/math/MutableBigInteger.java
> https://raw.github.com/tbuktu/bigint/95f1158d2205614c8739344df07ee35523b8ad89/src/main/java/java/math/MutableBigInteger.java
>
> Is 8014319 going to be next up for review?
I had planned to try to post it this week, but I am not certain at this point, especially given the short week due to the US July 4 holiday.
> Also, would it be okay to do a s/Reminder/Remainder/g on
> MutableBigInteger.java and include it in 8014319?
That's already been done in the phase{3,4} patched provided by Alan:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-May/016783.html
Thanks,
Brian
From Alan.Bateman at oracle.com Mon Jul 1 19:54:37 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Mon, 01 Jul 2013 20:54:37 +0100
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D1CB94.90901@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com>
Message-ID: <51D1DE7D.3030105@oracle.com>
On 01/07/2013 19:33, huizhe wang wrote:
> :
>
> I've updated the jaxp 1.5 tests. I'll send a separate link since it's
> internal. Indeed, I missed a couple of scenarios: 1) FSP can be set
> after jaxp 1.5 properties are set through the API; 2) Validator does
> not require, but does support FSP.
Given the number of parsers involved, the various ways to set
properties, the FSP hammer, security manager, ... then it's really
important that there is a good set of tests that exercise all the
combinations. So I encourage you to put in as much effort as it required
to get a good set of tests. It would be great to get them into OpenJDK
too, if that is possible.
>>
>> I think isJDKandAbove has the assume the long standing format for
>> java.version. If someone really did change the format to what you are
>> suggesting then the code would fail with a value such as "7.40".
>
> The code does support both the current and possible new format by
> comparing the 0 element, e.g. Integer.parseInt(versions[0]) >=
> compareTo. But I see Joe's comment provided a better way to handle this.
>
Okay, I'll wait for the second webrev to see how this looks.
-Alan.
From joe.darcy at oracle.com Mon Jul 1 20:30:53 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Mon, 01 Jul 2013 20:30:53 +0000
Subject: hg: jdk8/tl/jdk: 8019527: Fix doclint issues in java.lang.instrument
Message-ID: <20130701203106.934D4486DE@hg.openjdk.java.net>
Changeset: 3736ad2636aa
Author: darcy
Date: 2013-07-01 13:29 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3736ad2636aa
8019527: Fix doclint issues in java.lang.instrument
Reviewed-by: lancea, alanb
! src/share/classes/java/lang/instrument/Instrumentation.java
From joe.darcy at oracle.com Mon Jul 1 20:35:18 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Mon, 01 Jul 2013 13:35:18 -0700
Subject: JDK 8 code review request for doclint issues in java.util.spi
Message-ID: <51D1E806.9000002@oracle.com>
Hello,
There are a few doclint issues to be fixed in java.util.spi; thanks,
-Joe
diff -r 3736ad2636aa
src/share/classes/java/util/spi/LocaleServiceProvider.java
--- a/src/share/classes/java/util/spi/LocaleServiceProvider.java Mon Jul
01 13:29:32 2013 -0700
+++ b/src/share/classes/java/util/spi/LocaleServiceProvider.java Mon Jul
01 13:34:11 2013 -0700
@@ -42,7 +42,7 @@
* interfaces to offer support for locales beyond the set of locales
* supported by the Java runtime environment itself.
*
- *
Packaging of Locale Sensitive Service Provider Implementations
+ * Packaging of Locale Sensitive Service Provider Implementations
* Implementations of these locale sensitive services are packaged
using the
* Java
Extension Mechanism
* as installed extensions. A provider identifies itself with a
@@ -165,7 +165,7 @@
/**
* Returns {@code true} if the given {@code locale} is supported by
* this locale service provider. The given {@code locale} may contain
- * extensions that
should be
+ * extensions that
should be
* taken into account for the support determination.
*
* The default implementation returns {@code true} if the given
{@code locale}
From lance.andersen at oracle.com Mon Jul 1 20:37:47 2013
From: lance.andersen at oracle.com (Lance @ Oracle)
Date: Mon, 1 Jul 2013 16:37:47 -0400
Subject: JDK 8 code review request for doclint issues in java.util.spi
In-Reply-To: <51D1E806.9000002@oracle.com>
References: <51D1E806.9000002@oracle.com>
Message-ID: <818344E8-FF11-423F-BB1E-D6464EB6D342@oracle.com>
Looks fine
Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com
Sent from my iPad
On Jul 1, 2013, at 4:35 PM, Joe Darcy wrote:
> Hello,
>
> There are a few doclint issues to be fixed in java.util.spi; thanks,
>
> -Joe
>
> diff -r 3736ad2636aa src/share/classes/java/util/spi/LocaleServiceProvider.java
> --- a/src/share/classes/java/util/spi/LocaleServiceProvider.java Mon Jul 01 13:29:32 2013 -0700
> +++ b/src/share/classes/java/util/spi/LocaleServiceProvider.java Mon Jul 01 13:34:11 2013 -0700
> @@ -42,7 +42,7 @@
> * interfaces to offer support for locales beyond the set of locales
> * supported by the Java runtime environment itself.
> *
> - *
Packaging of Locale Sensitive Service Provider Implementations
> + * Packaging of Locale Sensitive Service Provider Implementations
> * Implementations of these locale sensitive services are packaged using the
> * Java Extension Mechanism
> * as installed extensions. A provider identifies itself with a
> @@ -165,7 +165,7 @@
> /**
> * Returns {@code true} if the given {@code locale} is supported by
> * this locale service provider. The given {@code locale} may contain
> - * extensions that should be
> + * extensions that should be
> * taken into account for the support determination.
> *
> * The default implementation returns {@code true} if the given {@code locale}
>
From martinrb at google.com Mon Jul 1 20:38:23 2013
From: martinrb at google.com (Martin Buchholz)
Date: Mon, 1 Jul 2013 13:38:23 -0700
Subject: RFR 8019481 Sync misc j.u.c classes from 166 to tl
In-Reply-To:
References:
Message-ID:
Looks Good To Me!
On Mon, Jul 1, 2013 at 3:52 AM, Paul Sandoz wrote:
> Hi,
>
> The following patch syncs misc-related classes from 166 j.u.c to tl.
> Basically stuff that has not already been committed or submitted for review
> except CHM stuff (which i will submit next).
>
> Again this contains docs (+ formatting changes) in addition to
> improvements (mainly to Exchanger and Phaser):
>
> http://cr.openjdk.java.net/~psandoz/tl/JDK-8019481-concur-misc/webrev/
>
> Paul.
From joe.darcy at oracle.com Mon Jul 1 20:43:20 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Mon, 01 Jul 2013 20:43:20 +0000
Subject: hg: jdk8/tl/jdk: 8019529: Fix doclint issues in java.util.spi
Message-ID: <20130701204333.CB309486DF@hg.openjdk.java.net>
Changeset: 8e5376324e4b
Author: darcy
Date: 2013-07-01 13:42 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8e5376324e4b
8019529: Fix doclint issues in java.util.spi
Reviewed-by: lancea
! src/share/classes/java/util/spi/LocaleServiceProvider.java
From joe.darcy at oracle.com Mon Jul 1 20:55:27 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Mon, 01 Jul 2013 13:55:27 -0700
Subject: JDK 8 code review request for doclint fixes in java.time.format
Message-ID: <51D1ECBF.6040603@oracle.com>
Hello,
The patch below resolves the two remaining doclint issues in
java.time.format.
Thanks,
-Joe
--- a/src/share/classes/java/time/format/DateTimeFormatter.java Mon Jul
01 13:42:03 2013 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatter.java Mon Jul
01 13:53:45 2013 -0700
@@ -1304,6 +1304,7 @@
* LocalTime time = parsed.query(LocalTime::from);
* Period extraDays =
parsed.query(DateTimeFormatter.parsedExcessDays());
*
+ * @return a query that provides access to the excess days that
were parsed
*/
public static final TemporalQuery parsedExcessDays() {
return PARSED_EXCESS_DAYS;
@@ -1344,6 +1345,7 @@
* // validate leap-second is correct and apply correct smoothing
* }
*
+ * @return a query that provides access to whether a leap-second
was parsed
*/
public static final TemporalQuery parsedLeapSecond() {
return PARSED_LEAP_SECOND;
From joe.darcy at oracle.com Mon Jul 1 21:12:19 2013
From: joe.darcy at oracle.com (Joseph Darcy)
Date: Mon, 01 Jul 2013 14:12:19 -0700
Subject: JDK-8016285: Add java.lang.reflect.Parameter.isNamePresent()
In-Reply-To: <51D19A6C.7090406@oracle.com>
References: <51C4B02B.7040004@oracle.com> <51C4B47E.4060702@oracle.com>
<51C4E010.1050603@oracle.com> <51C89C00.20604@oracle.com>
<51D19A6C.7090406@oracle.com>
Message-ID: <51D1F0B3.2020909@oracle.com>
We generally don't delve into low-level presentation details, but the
change looks fine -- approved to go back.
Cheers,
-Joe
On 7/1/2013 8:04 AM, Eric McCorkle wrote:
> Pinging this one again...
>
> On 06/24/13 15:20, Eric McCorkle wrote:
>> Pinging this RFR. It still needs a capital R reviewer.
>> http://cr.openjdk.java.net/~emc/8016285/
>>
>> On 06/21/13 19:21, Eric McCorkle wrote:
>>> On 06/21/13 16:15, Aleksey Shipilev wrote:
>>>> On 06/21/2013 11:57 PM, Eric McCorkle wrote:
>>>>> The webrev is here:
>>>>> http://cr.openjdk.java.net/~emc/8016285/
>>>> Looks generally good (but not a Reviewer).
>>>>
>>>> A few questions though:
>>>> a) Are we em-bracing the brace-less control flow blocks?
>>> Fixed it.
>>>
>>>> b) Should hasRealParameterData be transient?
>>>> c) Should hasRealParameterData be volatile? (now is being implicitly
>>>> protected by $parameters volatile write/read, but it is fragile)
>>> Transient yes. Volatile, I'd say I think not, since It's written before
>>> it's read on all possible paths, and all writes are the same value.
>>> But... I set it volatile just to be safe from reordering problems.
>>>
>>> Webrev's been updated.
>>> http://cr.openjdk.java.net/~emc/8016285/
>>>
From roger.riggs at oracle.com Mon Jul 1 21:09:45 2013
From: roger.riggs at oracle.com (roger riggs)
Date: Mon, 01 Jul 2013 17:09:45 -0400
Subject: JDK 8 code review request for doclint fixes in java.time.format
In-Reply-To: <51D1ECBF.6040603@oracle.com>
References: <51D1ECBF.6040603@oracle.com>
Message-ID: <51D1F019.2010102@oracle.com>
These look fine.
(But I'm not an official reviewer.)
On 7/1/2013 4:55 PM, Joe Darcy wrote:
> Hello,
>
> The patch below resolves the two remaining doclint issues in
> java.time.format.
>
> Thanks,
>
> -Joe
>
> --- a/src/share/classes/java/time/format/DateTimeFormatter.java Mon
> Jul 01 13:42:03 2013 -0700
> +++ b/src/share/classes/java/time/format/DateTimeFormatter.java Mon
> Jul 01 13:53:45 2013 -0700
> @@ -1304,6 +1304,7 @@
> * LocalTime time = parsed.query(LocalTime::from);
> * Period extraDays =
> parsed.query(DateTimeFormatter.parsedExcessDays());
> *
> + * @return a query that provides access to the excess days that
> were parsed
> */
> public static final TemporalQuery parsedExcessDays() {
> return PARSED_EXCESS_DAYS;
> @@ -1344,6 +1345,7 @@
> * // validate leap-second is correct and apply correct smoothing
> * }
> *
> + * @return a query that provides access to whether a leap-second
> was parsed
> */
> public static final TemporalQuery parsedLeapSecond() {
> return PARSED_LEAP_SECOND;
>
From kumar.x.srinivasan at oracle.com Mon Jul 1 21:11:37 2013
From: kumar.x.srinivasan at oracle.com (Kumar Srinivasan)
Date: Mon, 01 Jul 2013 14:11:37 -0700
Subject: RFR: 8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about
1 GB of data in work directory after execution
In-Reply-To: <51D1C6EC.8040106@oracle.com>
References: <51CF91CD.9040901@oracle.com> <51D1C6EC.8040106@oracle.com>
Message-ID: <51D1F089.80300@oracle.com>
On 7/1/2013 11:14 AM, Mandy Chung wrote:
> On 6/29/13 7:02 PM, Kumar Srinivasan wrote:
>> Hi,
>>
>> Please review changes to cleanup the test area after pack200 test
>> completion. Some tests generally use large jars and a local copy of
>> the JDK to
>> test with, created a generic utility to nuke most of the remains.
>>
>> The webrev:
>> http://cr.openjdk.java.net/~ksrini/8017463/webrev.0/
>>
>
> In Utils.cleanup, it will delete the files with certain extensions in
> the current directory. I skimmed on the tests and look to me that
> those files can be altered with a different path and not necessary in
> the current directory. Just wonder if you want to make cleanup to
> take a path parameter instead of hardcoding the cwd. Otherwise, this
> change looks fine with me.
AFAICT all the test files are in "." which is the scratch directory that
jtreg provides,
some tests may/could obtain the absolute path to this.
Can you please point me to the place where you found the doubt ?
Kumar
>
> Mandy
>
>> The bug:
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8017463
>>
>> Thanks
>> Kumar
>>
>
From Lance.Andersen at oracle.com Mon Jul 1 21:24:14 2013
From: Lance.Andersen at oracle.com (Lance Andersen)
Date: Mon, 1 Jul 2013 17:24:14 -0400
Subject: JDK 8 code review request for doclint fixes in java.time.format
In-Reply-To: <51D1ECBF.6040603@oracle.com>
References: <51D1ECBF.6040603@oracle.com>
Message-ID: <28BD87F9-9A16-4579-872C-A9C55BC90B08@oracle.com>
+1 joe
--
Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com
Sent from my iPhone
On Jul 1, 2013, at 4:55 PM, Joe Darcy wrote:
> Hello,
>
> The patch below resolves the two remaining doclint issues in java.time.format.
>
> Thanks,
>
> -Joe
>
> --- a/src/share/classes/java/time/format/DateTimeFormatter.java Mon Jul 01 13:42:03 2013 -0700
> +++ b/src/share/classes/java/time/format/DateTimeFormatter.java Mon Jul 01 13:53:45 2013 -0700
> @@ -1304,6 +1304,7 @@
> * LocalTime time = parsed.query(LocalTime::from);
> * Period extraDays = parsed.query(DateTimeFormatter.parsedExcessDays());
> *
> + * @return a query that provides access to the excess days that were parsed
> */
> public static final TemporalQuery parsedExcessDays() {
> return PARSED_EXCESS_DAYS;
> @@ -1344,6 +1345,7 @@
> * // validate leap-second is correct and apply correct smoothing
> * }
> *
> + * @return a query that provides access to whether a leap-second was parsed
> */
> public static final TemporalQuery parsedLeapSecond() {
> return PARSED_LEAP_SECOND;
>
From mandy.chung at oracle.com Mon Jul 1 21:45:42 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Mon, 01 Jul 2013 14:45:42 -0700
Subject: RFR: 8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about
1 GB of data in work directory after execution
In-Reply-To: <51D1F089.80300@oracle.com>
References: <51CF91CD.9040901@oracle.com> <51D1C6EC.8040106@oracle.com>
<51D1F089.80300@oracle.com>
Message-ID: <51D1F886.2060000@oracle.com>
On 7/1/2013 2:11 PM, Kumar Srinivasan wrote:
>> In Utils.cleanup, it will delete the files with certain extensions in
>> the current directory. I skimmed on the tests and look to me that
>> those files can be altered with a different path and not necessary in
>> the current directory. Just wonder if you want to make cleanup to
>> take a path parameter instead of hardcoding the cwd. Otherwise, this
>> change looks fine with me.
>
> AFAICT all the test files are in "." which is the scratch directory
> that jtreg provides,
> some tests may/could obtain the absolute path to this.
>
> Can you please point me to the place where you found the doubt ?
Your fix is fine as all the test files follow the convention to
put under ".".
My question was led by these methods in the Utils class:
static void pack(JarFile jarFile, File packFile)
static void unpackj(File inFile, JarOutputStream jarStream)
For example Pack200Test calls these methods by passing a File object
and JarOutputStream and the test itself uses the basename that
makes sure that the file is in ".". Is the cleanup() trying to
delete the files created during pack and unpack in the test?
That's what my comment is about.
Mandy
From joe.darcy at oracle.com Mon Jul 1 21:34:19 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Mon, 01 Jul 2013 21:34:19 +0000
Subject: hg: jdk8/tl/jdk: 8019535: Fix doclint issues in java.time.format
Message-ID: <20130701213430.EA27D486E0@hg.openjdk.java.net>
Changeset: 5427f7316633
Author: darcy
Date: 2013-07-01 14:33 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5427f7316633
8019535: Fix doclint issues in java.time.format
Reviewed-by: lancea, rriggs
! src/share/classes/java/time/format/DateTimeFormatter.java
From kumar.x.srinivasan at oracle.com Mon Jul 1 23:12:10 2013
From: kumar.x.srinivasan at oracle.com (Kumar Srinivasan)
Date: Mon, 01 Jul 2013 16:12:10 -0700
Subject: RFR: 8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about
1 GB of data in work directory after execution
In-Reply-To: <51D1F886.2060000@oracle.com>
References: <51CF91CD.9040901@oracle.com> <51D1C6EC.8040106@oracle.com>
<51D1F089.80300@oracle.com> <51D1F886.2060000@oracle.com>
Message-ID: <51D20CCA.8070700@oracle.com>
On 7/1/2013 2:45 PM, Mandy Chung wrote:
>
> On 7/1/2013 2:11 PM, Kumar Srinivasan wrote:
>>> In Utils.cleanup, it will delete the files with certain extensions
>>> in the current directory. I skimmed on the tests and look to me
>>> that those files can be altered with a different path and not
>>> necessary in the current directory. Just wonder if you want to make
>>> cleanup to take a path parameter instead of hardcoding the cwd.
>>> Otherwise, this change looks fine with me.
>>
>> AFAICT all the test files are in "." which is the scratch directory
>> that jtreg provides,
>> some tests may/could obtain the absolute path to this.
>>
>> Can you please point me to the place where you found the doubt ?
>
> Your fix is fine as all the test files follow the convention to
> put under ".".
>
> My question was led by these methods in the Utils class:
>
> static void pack(JarFile jarFile, File packFile)
> static void unpackj(File inFile, JarOutputStream jarStream)
>
> For example Pack200Test calls these methods by passing a File object
> and JarOutputStream and the test itself uses the basename that
> makes sure that the file is in ".". Is the cleanup() trying to
> delete the files created during pack and unpack in the test?
Yes. and other temporary/transient files that might turn up.
Thanks for reviewing Mandy.
Kumar
> That's what my comment is about.
>
> Mandy
>
From joe.darcy at oracle.com Tue Jul 2 00:37:45 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Mon, 01 Jul 2013 17:37:45 -0700
Subject: Java 8 RFR: 6178739 - Formatter - Zero padding flag with zero
width
In-Reply-To: <227132A3-5CC5-4D8C-A57A-20A3E36A21C4@oracle.com>
References: <227132A3-5CC5-4D8C-A57A-20A3E36A21C4@oracle.com>
Message-ID: <51D220D9.5080101@oracle.com>
On 06/28/2013 12:10 PM, Brian Burkhalter wrote:
> Continuing this thread
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018326.html
>
> with respect to this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178739
>
> this Request for Review proposes the following change to the Formatter javadoc specification:
>
> diff -r 8d577b3a6ca4 src/share/classes/java/util/Formatter.java
> --- a/src/share/classes/java/util/Formatter.java Fri Jun 28 11:09:10 2013 -0700
> +++ b/src/share/classes/java/util/Formatter.java Fri Jun 28 11:58:45 2013 -0700
> @@ -190,7 +190,7 @@
> * The optional flags is a set of characters that modify the output
> * format. The set of valid flags depends on the conversion.
> *
> - *
The optional width is a non-negative decimal integer indicating
> + *
The optional width is a positive decimal integer indicating
> * the minimum number of characters to be written to the output.
> *
> *
The optional precision is a non-negative decimal integer usually
>
> The change is to require the field width to be positive rather than non-negative. Allowing a zero minimum field width seems meaningless. This matches the current behavior as defined by the format specifier regular expression:
>
> private static final String formatSpecifier
> = "%(\\d+\\$)?([-#+ 0,(\\<]*)?(\\d+)?(\\.\\d+)?([tT])?([a-zA-Z%])";
>
> A CCC request for the above would naturally need to be approved if this is change were deemed acceptable.
>
> An alternative, as previously stated, would be to handle cases like %0.4f specially but this seems to violate the letter of the specification as currently written. It would however match the behavior of C and not require a CCC request, FWIW.
>
> Thanks,
>
> Brian
Hello,
Our default policy when a case like this is found is to change the
specification to match the implementation.
While matching the C behavior is generally desirable, if no one has
requested that in the many years Formatter has been in the platform, I
think it is reasonable to change the specification to require a positive
argument in this case.
Cheers,
-Joe
From jason.uh at oracle.com Tue Jul 2 00:46:46 2013
From: jason.uh at oracle.com (jason.uh at oracle.com)
Date: Tue, 02 Jul 2013 00:46:46 +0000
Subject: hg: jdk8/tl/jdk: 8019539: Fix doclint errors in java.security and its
subpackages
Message-ID: <20130702004713.5D7BC486E3@hg.openjdk.java.net>
Changeset: 17f44b2dde41
Author: juh
Date: 2013-07-01 17:46 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/17f44b2dde41
8019539: Fix doclint errors in java.security and its subpackages
Reviewed-by: darcy
! src/share/classes/java/security/KeyStore.java
! src/share/classes/java/security/Provider.java
! src/share/classes/java/security/Security.java
! src/share/classes/java/security/cert/X509CRL.java
! src/share/classes/java/security/cert/X509CRLEntry.java
! src/share/classes/java/security/cert/X509Certificate.java
From david.holmes at oracle.com Tue Jul 2 04:38:10 2013
From: david.holmes at oracle.com (David Holmes)
Date: Tue, 02 Jul 2013 14:38:10 +1000
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
Message-ID: <51D25932.7040303@oracle.com>
This recently added test was found to fail under some conditions -
namely client compiler with -Xcomp. It seems that the use of all local
variables enabled the compiler to optimize things in a way that stopped
the weakref from being enqueued as expected. Simple fix was to make the
weakref a field.
http://cr.openjdk.java.net/~dholmes/8016341/webrev/
Thanks,
David
From peter.levart at gmail.com Tue Jul 2 07:19:33 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Tue, 02 Jul 2013 09:19:33 +0200
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51D25932.7040303@oracle.com>
References: <51D25932.7040303@oracle.com>
Message-ID: <51D27F05.5020201@gmail.com>
Hi David,
Looking at original code once again, I think this was actually a bug.
The WeakReference instance constructed in (old) line 82, can be GCed
right away, since nobody is using the local variable after assignment. I
f WeakReference is GCed it can not be enqueued. The promotion of local
variable into a field is one way to fix this. The other would be to use
the local variable somewhere down the code path, like for example in a
final throw statement:
110 throw new IllegalStateException("Reference Handler thread stuck. weakRef.get(): " + weakRef.get());
This would also reveal some more info about the WeakReference when
there's no sure answer after 10 seconds and could be added to the test
anyway.
Regards, Peter
On 07/02/2013 06:38 AM, David Holmes wrote:
> This recently added test was found to fail under some conditions -
> namely client compiler with -Xcomp. It seems that the use of all local
> variables enabled the compiler to optimize things in a way that
> stopped the weakref from being enqueued as expected. Simple fix was to
> make the weakref a field.
>
> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>
> Thanks,
> David
From Alan.Bateman at oracle.com Tue Jul 2 09:11:30 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Tue, 02 Jul 2013 10:11:30 +0100
Subject: RFR: 8019500: Exclude MemoryTest.java and MemoryTestAllGC.sh
to enable integration
In-Reply-To: <20130701153202.GE2213@ehelin-thinkpad>
References: <20130701153202.GE2213@ehelin-thinkpad>
Message-ID: <51D29942.4090802@oracle.com>
On 01/07/2013 16:32, Erik Helin wrote:
> Hi all,
>
> this change excludes the following two MemoryMXBean tests:
> - java/lang/management/MemoryMXBean/MemoryTestAllGC.sh
> - java/lang/management/MemoryMXBean/MemoryTest.java
>
> This is needed since a change in hotspot added a new memory pool for
> metaspace:
>
>> hg log hotspot-main/hotspot:
>> changeset: 4861:71963b3f802a
>> user: ehelin
>> date: Wed Jun 26 16:58:37 2013
>> summary: 8013590: NPG: Add a memory pool MXBean for Metaspace
> These tests need to be excluded for a (very short) time to be able to
> integrate hotspot-main into jdk8/jdk8.
>
> Webrev: http://cr.openjdk.java.net/~ehelin/8019500/webrev.00/
>
> Please note that the change is for jdk8/jdk8 (not jdk8/tl) since hotspot
> needs to be integrated into jdk8/jdk8.
>
> I have also sent out a review request for a change that fixes the test
> and removes the tests from ProblemList.txt. This change can be applied
> to jdk8/tl as soon as hotspot has been integrated and pulled down to jdk8/tl.
>
> Thanks,
> Erik
This looks okay to me, although you might want to push-out "generic-all"
so that it's consistent with the other lines.
-Alan
From vicente.romero at oracle.com Tue Jul 2 09:22:30 2013
From: vicente.romero at oracle.com (vicente.romero at oracle.com)
Date: Tue, 02 Jul 2013 09:22:30 +0000
Subject: hg: jdk8/tl/langtools: 8019397: javap does not show
SourceDebugExtension properly
Message-ID: <20130702092238.4CEA6486F9@hg.openjdk.java.net>
Changeset: 27a2e8c78bd0
Author: vromero
Date: 2013-07-02 10:21 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/27a2e8c78bd0
8019397: javap does not show SourceDebugExtension properly
Reviewed-by: jjg
Contributed-by: dmytro_sheyko at hotmail.com
! src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
! src/share/classes/com/sun/tools/javap/AttributeWriter.java
From erik.helin at oracle.com Tue Jul 2 09:27:44 2013
From: erik.helin at oracle.com (Erik Helin)
Date: Tue, 2 Jul 2013 11:27:44 +0200
Subject: RFR: 8019500: Exclude MemoryTest.java and MemoryTestAllGC.sh to
enable integration
In-Reply-To: <51D29942.4090802@oracle.com>
References: <20130701153202.GE2213@ehelin-thinkpad>
<51D29942.4090802@oracle.com>
Message-ID: <20130702092744.GE1976@ehelin-thinkpad>
On 2013-07-02, Alan Bateman wrote:
> On 01/07/2013 16:32, Erik Helin wrote:
> >Hi all,
> >
> >this change excludes the following two MemoryMXBean tests:
> >- java/lang/management/MemoryMXBean/MemoryTestAllGC.sh
> >- java/lang/management/MemoryMXBean/MemoryTest.java
> >
> >This is needed since a change in hotspot added a new memory pool for
> >metaspace:
> >
> >>hg log hotspot-main/hotspot:
> >> changeset: 4861:71963b3f802a
> >> user: ehelin
> >> date: Wed Jun 26 16:58:37 2013
> >> summary: 8013590: NPG: Add a memory pool MXBean for Metaspace
> >These tests need to be excluded for a (very short) time to be able to
> >integrate hotspot-main into jdk8/jdk8.
> >
> >Webrev: http://cr.openjdk.java.net/~ehelin/8019500/webrev.00/
> >
> >Please note that the change is for jdk8/jdk8 (not jdk8/tl) since hotspot
> >needs to be integrated into jdk8/jdk8.
> >
> >I have also sent out a review request for a change that fixes the test
> >and removes the tests from ProblemList.txt. This change can be applied
> >to jdk8/tl as soon as hotspot has been integrated and pulled down to jdk8/tl.
> >
> >Thanks,
> >Erik
> This looks okay to me, although you might want to push-out
> "generic-all" so that it's consistent with the other lines.
Thanks! I will make sure to use the correct alignment for "generic-all"
before I push.
Again, thanks for your quick reply!
Erik
> -Alan
From daniel.fuchs at oracle.com Tue Jul 2 10:07:24 2013
From: daniel.fuchs at oracle.com (daniel.fuchs at oracle.com)
Date: Tue, 02 Jul 2013 10:07:24 +0000
Subject: hg: jdk8/tl/jdk: 8017174: NPE when using Logger.getAnonymousLogger or
LogManager.getLogManager().getLogger
Message-ID: <20130702100749.8AFAA486FB@hg.openjdk.java.net>
Changeset: 020f023f87d1
Author: dfuchs
Date: 2013-07-02 11:30 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/020f023f87d1
8017174: NPE when using Logger.getAnonymousLogger or LogManager.getLogManager().getLogger
Summary: This patch makes sure that LoggerContext instances created for applets have a root and global logger.
Reviewed-by: mchung
! src/share/classes/java/util/logging/LogManager.java
! test/java/util/logging/LogManagerInstanceTest.java
+ test/java/util/logging/TestAppletLoggerContext.java
From kumar.x.srinivasan at oracle.com Tue Jul 2 12:30:26 2013
From: kumar.x.srinivasan at oracle.com (kumar.x.srinivasan at oracle.com)
Date: Tue, 02 Jul 2013 12:30:26 +0000
Subject: hg: jdk8/tl/jdk: 8017463: [TEST_BUG] 2 tests from tools/pack200/
remain about 1 GB of data in work directory after execution
Message-ID: <20130702123051.57A2948703@hg.openjdk.java.net>
Changeset: b1fffbbdf58c
Author: ksrini
Date: 2013-07-02 05:28 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/b1fffbbdf58c
8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about 1 GB of data in work directory after execution
Reviewed-by: mchung
! test/tools/pack200/AttributeTests.java
! test/tools/pack200/BandIntegrity.java
! test/tools/pack200/CommandLineTests.java
! test/tools/pack200/InstructionTests.java
! test/tools/pack200/Pack200Props.java
! test/tools/pack200/Pack200Test.java
! test/tools/pack200/PackageVersionTest.java
! test/tools/pack200/RepackTest.java
! test/tools/pack200/T7007157.java
! test/tools/pack200/TestExceptions.java
! test/tools/pack200/TimeStamp.java
! test/tools/pack200/UnpackerMemoryTest.java
! test/tools/pack200/Utils.java
! test/tools/pack200/typeannos/TestTypeAnnotations.java
From sundararajan.athijegannathan at oracle.com Tue Jul 2 13:21:03 2013
From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com)
Date: Tue, 02 Jul 2013 13:21:03 +0000
Subject: hg: jdk8/tl/nashorn: 12 new changesets
Message-ID: <20130702132114.5AF2E48706@hg.openjdk.java.net>
Changeset: 218c2833c344
Author: sundar
Date: 2013-06-28 19:36 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/218c2833c344
8019365: Error stack format
Reviewed-by: hannesw
! src/jdk/nashorn/api/scripting/NashornException.java
! src/jdk/nashorn/internal/objects/NativeError.java
! test/script/basic/JDK-8014781.js.EXPECTED
! test/script/basic/JDK-8017950.js.EXPECTED
! test/script/basic/JDK-8019226.js
! test/script/basic/JDK-8019226.js.EXPECTED
Changeset: 02588d68399d
Author: sundar
Date: 2013-07-01 12:38 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/02588d68399d
8019473: Parser issues related to functions and blocks
Reviewed-by: lagergren
! src/jdk/nashorn/internal/parser/Parser.java
+ test/script/basic/JDK-8019473.js
Changeset: 10c7a1e9e24f
Author: sundar
Date: 2013-07-01 14:15 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/10c7a1e9e24f
8019478: Object.prototype.toString.call(/a/.exec("a")) === "[object Array]" should be true
Reviewed-by: hannesw
! src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
+ test/script/basic/JDK-8019478.js
Changeset: 47099609a48b
Author: sundar
Date: 2013-07-01 17:21 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/47099609a48b
8019482: Number("0x0.0p0") should evaluate to NaN
Reviewed-by: lagergren
! src/jdk/nashorn/internal/objects/NativeError.java
! src/jdk/nashorn/internal/runtime/ECMAException.java
! src/jdk/nashorn/internal/runtime/JSType.java
+ test/script/basic/JDK-8019482.js
Changeset: ab3ea5b3e507
Author: sundar
Date: 2013-07-01 19:52 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/ab3ea5b3e507
8019488: switch on literals result in NoSuchMethodError or VerifyError
Reviewed-by: hannesw
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/runtime/ScriptRuntime.java
+ test/script/basic/JDK-8019488.js
Changeset: 9165138b427c
Author: sundar
Date: 2013-07-01 23:36 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/9165138b427c
8019508: Comma handling in object literal parsing is wrong
Reviewed-by: hannesw
! src/jdk/nashorn/internal/parser/Parser.java
! src/jdk/nashorn/internal/runtime/resources/Messages.properties
+ test/script/basic/JDK-8019508.js
+ test/script/basic/JDK-8019508.js.EXPECTED
Changeset: 5f9abeb0bb50
Author: jlaskey
Date: 2013-07-02 07:45 -0300
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/5f9abeb0bb50
8019580: Build Script Change for Nashorn promotion testing
Reviewed-by: jlaskey
Contributed-by: eugene.drobitko at oracle.com
! make/build.xml
Changeset: a7b82e333c31
Author: lagergren
Date: 2013-07-02 13:50 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/a7b82e333c31
8016667: Wrong bytecode when testing/setting due to null check shortcut checking against primitive too
Reviewed-by: jlaskey, sundar
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
+ test/script/basic/JDK-8016667.js
Changeset: 74049fe3ba46
Author: sundar
Date: 2013-07-02 18:00 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/74049fe3ba46
8019553: NPE on illegal l-value for increment and decrement
Reviewed-by: jlaskey, attila, lagergren
! src/jdk/nashorn/internal/parser/Parser.java
! src/jdk/nashorn/internal/runtime/resources/Messages.properties
+ test/script/basic/JDK-8019553.js
+ test/script/basic/JDK-8019553.js.EXPECTED
! test/script/basic/NASHORN-51.js
! test/script/basic/NASHORN-51.js.EXPECTED
! test/script/error/NASHORN-57.js.EXPECTED
Changeset: 9396e42bae4f
Author: lagergren
Date: 2013-07-02 14:50 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/9396e42bae4f
8017082: Long array literals were slightly broken
Reviewed-by: sundar, attila
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/codegen/types/Type.java
! src/jdk/nashorn/internal/ir/LiteralNode.java
+ test/script/basic/JDK-8017082.js
Changeset: 69ec02d12a31
Author: lagergren
Date: 2013-07-02 15:01 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/69ec02d12a31
Merge
Changeset: 16c4535abcf8
Author: sundar
Date: 2013-07-02 18:39 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/16c4535abcf8
Merge
From Alan.Bateman at oracle.com Tue Jul 2 15:41:10 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Tue, 02 Jul 2013 16:41:10 +0100
Subject: Request for Review: 5049299: (process) Use posix_spawn, not fork,
on S10 to avoid swap exhaustion
In-Reply-To: <50D65C3F.2040004@oracle.com>
References: <50AE98B1.2040200@oracle.com> <50B81A8D.2040403@oracle.com>
<50B82C94.90109@oracle.com> <50D277BE.8060705@oracle.com>
<50D65C3F.2040004@oracle.com>
Message-ID: <51D2F496.6050400@oracle.com>
On 23/12/2012 01:19, Rob McKenna wrote:
> Hi Martin, thanks a lot for this.
>
> I've renamed LINKFLAG to the more appropriate (and common) ARCHFLAG.
> It seems to pop up all around our source but if build-dev know of a
> better (or canonical) way of doing it I'll take it!
>
> The BUILD_JEXEC differences don't show up in my webrev or hg diff, but
> I see them in the jdk.patch generated by webrev. I have no idea why
> this is. (I did use the JEXEC stuff as a template for the JSPAWNHELPER
> code, but I don't recall altering the JEXEC stuff in any way. It looks
> like its limited to indentation. Strange.)
>
> W.r.t. useFork, I'll discuss this with Alan once he has a spare
> minute. I believe he may have had some concerns, but I'll let you know
> how that goes either way.
>
> The only __APPLE__ should be to get the call to _NSGetEnviron().
> Everything else should be bsd.
>
> I've put a webrev at:
>
> http://cr.openjdk.java.net/~robm/5049299/webrev.03/
>
>
> I hope this addresses the rest of your comments.
>
> -Rob
Rob - this was great work but I don't think we brought it to a
conclusion. Are you planning to re-base the patch and send out a new webrev?
-Alan
From brian.burkhalter at oracle.com Tue Jul 2 18:01:39 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Tue, 2 Jul 2013 11:01:39 -0700
Subject: Java 8 RFR: 6178739 - Formatter - Zero padding flag with zero
width
In-Reply-To: <51D220D9.5080101@oracle.com>
References: <227132A3-5CC5-4D8C-A57A-20A3E36A21C4@oracle.com>
<51D220D9.5080101@oracle.com>
Message-ID: <29900BE1-FDF4-4172-831F-9A840EA1FD84@oracle.com>
On Jul 1, 2013, at 5:37 PM, Joe Darcy wrote:
> While matching the C behavior is generally desirable, if no one has requested that in the many years Formatter has been in the platform, I think it is reasonable to change the specification to require a positive argument in this case.
All right, I will pursue this CCC.
Thanks,
Brian
From kumar.x.srinivasan at oracle.com Tue Jul 2 18:02:51 2013
From: kumar.x.srinivasan at oracle.com (kumar.x.srinivasan at oracle.com)
Date: Tue, 02 Jul 2013 18:02:51 +0000
Subject: hg: jdk8/tl/langtools: 8019460: tests in changeset do not have @bug
tag
Message-ID: <20130702180256.6783C48710@hg.openjdk.java.net>
Changeset: 565341d436e2
Author: ksrini
Date: 2013-07-01 16:36 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/565341d436e2
8019460: tests in changeset do not have @bug tag
Reviewed-by: darcy
! test/tools/javac/warnings/AuxiliaryClass/ClassUsingAnotherAuxiliary.java
! test/tools/javac/warnings/AuxiliaryClass/ClassUsingAnotherAuxiliary.out
! test/tools/javac/warnings/AuxiliaryClass/ClassUsingAuxiliary.java
! test/tools/javac/warnings/AuxiliaryClass/ClassUsingAuxiliary1.out
! test/tools/javac/warnings/AuxiliaryClass/ClassUsingAuxiliary2.out
! test/tools/javac/warnings/AuxiliaryClass/SelfClassWithAux.java
From daniel.fuchs at oracle.com Tue Jul 2 18:26:15 2013
From: daniel.fuchs at oracle.com (daniel.fuchs at oracle.com)
Date: Tue, 02 Jul 2013 18:26:15 +0000
Subject: hg: jdk8/tl/jdk: 7184195: java.util.logging.Logger.getGlobal().info()
doesn't log without configuration
Message-ID: <20130702182637.740EA48712@hg.openjdk.java.net>
Changeset: 70bff2d12af0
Author: dfuchs
Date: 2013-07-02 19:47 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/70bff2d12af0
7184195: java.util.logging.Logger.getGlobal().info() doesn't log without configuration
Summary: Due to subtle synchronization issues between LogManager & Logger class initialization the global logger doesn't have its 'manager' field initialized until the LogManager is initialized. This fix will ensure that the global logger has its 'manager' field set when getGlobal() is called.
Reviewed-by: mchung, plevart
! src/share/classes/java/util/logging/LogManager.java
! src/share/classes/java/util/logging/Logger.java
+ test/java/util/logging/Logger/getGlobal/TestGetGlobal.java
+ test/java/util/logging/Logger/getGlobal/TestGetGlobalByName.java
+ test/java/util/logging/Logger/getGlobal/TestGetGlobalConcurrent.java
+ test/java/util/logging/Logger/getGlobal/logging.properties
+ test/java/util/logging/Logger/getGlobal/policy
+ test/java/util/logging/Logger/getGlobal/testgetglobal/BadLogManagerImpl.java
+ test/java/util/logging/Logger/getGlobal/testgetglobal/DummyLogManagerImpl.java
+ test/java/util/logging/Logger/getGlobal/testgetglobal/HandlerImpl.java
+ test/java/util/logging/Logger/getGlobal/testgetglobal/LogManagerImpl1.java
+ test/java/util/logging/Logger/getGlobal/testgetglobal/LogManagerImpl2.java
+ test/java/util/logging/Logger/getGlobal/testgetglobal/LogManagerImpl3.java
From xueming.shen at oracle.com Tue Jul 2 18:29:08 2013
From: xueming.shen at oracle.com (Xueming Shen)
Date: Tue, 02 Jul 2013 11:29:08 -0700
Subject: RFR: 8015666: test/tools/pack200/TimeStamp.java failing
In-Reply-To: <51CDA1ED.9040302@oracle.com>
References: <51C34E6D.4000502@oracle.com> <51CC7099.2050007@oracle.com>
<51CC7291.1080602@oracle.com> <51CDA1ED.9040302@oracle.com>
Message-ID: <51D31BF4.3000900@oracle.com>
On 06/28/2013 07:47 AM, Kumar Srinivasan wrote:
> Some nits while reading the changes:
> 1. ZipEntry.java
> a. typo:
>
> + * Sets the laste access time of the entry.
>
>
> b. extra space
>
> + case EXTID_ZIP64 :
>
> 2. ZipOutputStream.java
> I think it would be nice to have the flags 0x1, 0x2 and 0x4 defined
> as constants, this will also help a casual reader as to what this means.
>
>
> Besides my previous concern with finish(), everything else appears to be ok.
Kumar,
I have the dostime "cached" in XEntry, so the writeCEN() and writeLOC() will
always write out the same local msdos time. The cache should help the perf
a little, as the javaToDosTime() now only invoked once for the same entry.
Nothing needs to be updated in unpack side now. (I took a look at the API,
it appears there is no way to do anything on unpack side to workaround
this issue, without the possibility of breaking someone's code)
http://cr.openjdk.java.net/~sherman/8015666/webrev/
-Sherman
>
> Kumar
>
>
>> On 06/27/2013 10:04 AM, Kumar Srinivasan wrote:
>>> Hi Sherman,
>>>
>>> I started looking at this, my initial comment, the Unpacker.unpack
>>> does not close its output and we allow multiple pack files to be concatenated,
>>> I am assuming out.finish() will allow further jar files to be appended ?
>>> or would this cause a problem ?
>>
>> No, out.finish() will not allow further entry appending. Then, it appears
>> we need to have a different approach to "finish" the Jar/ZipOutputStream.
>> What need to be done here is that either out.close/finish() need to be
>> invoked under the UTC locale as well (to output the time stamps in cen
>> table correctly). This is another "incompatible" change of the previous
>> change, in which the msdosTime<->javaTime conversion no longer
>> occurs during the ZipEntry.set/getTime(), but during the read and write
>> the ZipEntry from/to the zip file.
>>
>> -Sherman
>>
>>
>>>
>>> Kumar
>>>
>>>> Hi,
>>>>
>>>> The zip time related changes[1] I pushed back last month appears
>>>> to have the compatibility risk of breaking existing code. The main
>>>> idea in that changeset is to use the more accurate and timezone
>>>> insensitive utc time stored in the extra field for the ZipEntry.set/getTime()
>>>> if possible. However it turns out the reality is that the code out there
>>>> might have already had some interesting workaround/hack solution
>>>> to workaround the problem that the time stamp stored in the "standard'
>>>> zip entry header is a MS-DOS standard date/time, which is a "local
>>>> date/time" and sensitive to timezone, in which, if the zip is archived
>>>> in time zone A (our implementation converts the "java" time to dos
>>>> time by using the default tz A) and then transferred/un-archived in
>>>> a different zone B (use default tz B to convert back to java time), we
>>>> have a time stamp mess up. The "workaround" from pack200 for this
>>>> issue when pack/unpacking a jar file is to "specify/recommend/suggest"
>>>> in its spec that the "time zone" in a jar file entry is assumed to be "UTC",
>>>> so the pack/unpack200 implementation set the "default time" to utc
>>>> before the pack/unpack and set it back to the original after that. It worked
>>>> "perfectly" for a roundtrip pack/unpacking, until the changeset [2], in
>>>> which ZipEntry.getTime() (packing) returns a real utc time and the following
>>>> ZipEntry.setTime() (unpacking), then mess up the MS-DOS date/time
>>>> entry, this is the root cause of this regression.
>>>>
>>>> Given the facts that
>>>> (1) there are actually two real physical time stamps in a zip file header,
>>>> one is in the date/time fields, which is MS-DOS-local-date/time-with-2-
>>>> seconds-granularity , one is in the extra data field, which is UTC-1-second
>>>> -granularity
>>>> (2) and there are applications over there that have dependency on the
>>>> MS-DOS date/time stamp.
>>>>
>>>> I'm proposing the following approach to add the functionality of supporting
>>>> the "utc-date/time-with-1-second granularity" and keep the old behavior
>>>> of the get/setTime() of the ZipEntry.
>>>>
>>>> (1) keep the time/setTime()/getTime() for the MS-DOS standard date/time.
>>>> To set via the old setTime() will only store the time into zip's standard
>>>> date/time field, which is in MS-DOS date/time. And getTime() only returns
>>>> the date/time from that field, when read from the zip file/stream.
>>>> (2) add mtime/set/getLastModifiedTime() to work on the UTC time fields,
>>>> and the last modified time set via the new method will also set the "time",
>>>> and the getLastModifiedTime() also returns the "time", if the UTC time
>>>> stamp fields are not set in the zip file header. The idea is that for the new
>>>> application, the recommendation is to use ZipEntry.set/getLastModifiedTime()
>>>> for better/correct time stamp, but the existing apps keep the same behavior.
>>>> (3) jar and ZipOutputStream are updated to use the set/getLastModifiedTime().
>>>> (4) Pack/unpack continues to use the set/getTime(), so the current workaround
>>>> continues work. I will leave this to Kuma to decide how it should be handled
>>>> going forward. (there are two facts need to be considered here, a) the
>>>> existing jar file might not have the utc time instored, and b) all "extra" data
>>>> are wiped out during the pack/unpacking process)
>>>> (5) additionally add another pair of atime/get/setLastAccessTime and
>>>> ctime/get/setCreationTime().
>>>> (6) The newly added 3 pairs of the m/a/ctime get/set methods use the "new"
>>>> nio FileTime, instead of the "long". This may add some additional cost of
>>>> conversion when working with them, but may also help improve the
>>>> performance if the time stamps are directly from nio file system when
>>>> get/set XYZTime. Good/bad?
>>>>
>>>> http://cr.openjdk.java.net/~sherman/8015666/webrev/
>>>>
>>>> Comment, option and suggestion are appreciated.
>>>>
>>>> -Sherman
>>>>
>>>> [1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/90df6756406f
>>>
>>
>
From vicente.romero at oracle.com Tue Jul 2 21:50:44 2013
From: vicente.romero at oracle.com (vicente.romero at oracle.com)
Date: Tue, 02 Jul 2013 21:50:44 +0000
Subject: hg: jdk8/tl/langtools: 6326693: variable x might already have been
assigned, when assignment is in catch block
Message-ID: <20130702215049.B6D8C48724@hg.openjdk.java.net>
Changeset: 3b4f92a3797f
Author: vromero
Date: 2013-07-02 22:49 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/3b4f92a3797f
6326693: variable x might already have been assigned, when assignment is in catch block
Reviewed-by: mcimadamore
! src/share/classes/com/sun/tools/javac/comp/Flow.java
+ test/tools/javac/T6326693/FinalVariableAssignedToInCatchBlockTest.java
+ test/tools/javac/T6326693/FinalVariableAssignedToInCatchBlockTest.out
From tbuktu at hotmail.com Tue Jul 2 22:31:36 2013
From: tbuktu at hotmail.com (Tim Buktu)
Date: Wed, 3 Jul 2013 00:31:36 +0200
Subject: Code update for 8014319: Faster division of large integers
In-Reply-To: <5D364847-297D-4317-AA31-8B6A0ACD90BC@oracle.com>
References:
<5D364847-297D-4317-AA31-8B6A0ACD90BC@oracle.com>
Message-ID:
Hi Brian,
>
> That would be helpful if you don't mind. Note that this changeset
> modifying BigInteger
>
> http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c8cf01de8fa8
>
> was just applied today.
The latest files for phase 3 are up at
https://gist.github.com/tbuktu/1576025/raw/f93093a412eac86d8d81e03b8b9135eb827f2a84/BigInteger.java.phase3
https://gist.github.com/tbuktu/1576025/raw/237f2687b9a6cb49ab17ddffd77412b2e8bbc518/MutableBigInteger.java.phase3
https://gist.github.com/tbuktu/1576025/raw/4c3faad4cdebffbd77485482a1e61c9a7a475060/BigIntegerTest.java.phase3
>> Also, would it be okay to do a s/Reminder/Remainder/g on
>> MutableBigInteger.java and include it in 8014319?
>
> That's already been done in the phase{3,4} patched provided by Alan:
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-May/016783.html
>
The MutableBigInteger.java.* files I extracted from BigIntegerPatch.zip
still say "reminder". Maybe I have an older version of the .zip file.
Anyway, I fixed it in the files linked above.
Tim
From mandy.chung at oracle.com Tue Jul 2 23:01:31 2013
From: mandy.chung at oracle.com (mandy.chung at oracle.com)
Date: Tue, 02 Jul 2013 23:01:31 +0000
Subject: hg: jdk8/tl/jdk: 8007035: deprecate public void
SecurityManager.checkMemberAccess(Class> clazz, int which)
Message-ID: <20130702230213.79CF848732@hg.openjdk.java.net>
Changeset: cf7202b32a34
Author: mchung
Date: 2013-07-02 15:58 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/cf7202b32a34
8007035: deprecate public void SecurityManager.checkMemberAccess(Class> clazz, int which)
Reviewed-by: jrose, alanb, dfuchs
! src/share/classes/java/lang/Class.java
! src/share/classes/java/lang/SecurityManager.java
! src/share/classes/java/lang/invoke/MethodHandles.java
! src/share/classes/java/lang/reflect/Member.java
! test/java/lang/invoke/InvokeDynamicPrintArgs.java
+ test/java/lang/invoke/TestPrivateMember.java
From brian.burkhalter at oracle.com Wed Jul 3 00:21:06 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Tue, 2 Jul 2013 17:21:06 -0700
Subject: Code update for 8014319: Faster division of large integers
In-Reply-To:
References:
<5D364847-297D-4317-AA31-8B6A0ACD90BC@oracle.com>
Message-ID: <93545924-32EE-44EF-9CC3-8F88174DAA8D@oracle.com>
Hi Tim,
On Jul 2, 2013, at 3:31 PM, Tim Buktu wrote:
>> That would be helpful if you don't mind. Note that this changeset
>> modifying BigInteger
>>
>> http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c8cf01de8fa8
>>
>> was just applied today.
> The latest files for phase 3 are up at
>
> https://gist.github.com/tbuktu/1576025/raw/f93093a412eac86d8d81e03b8b9135eb827f2a84/BigInteger.java.phase3
>
> https://gist.github.com/tbuktu/1576025/raw/237f2687b9a6cb49ab17ddffd77412b2e8bbc518/MutableBigInteger.java.phase3
>
> https://gist.github.com/tbuktu/1576025/raw/4c3faad4cdebffbd77485482a1e61c9a7a475060/BigIntegerTest.java.phase3
Great!
>>> Also, would it be okay to do a s/Reminder/Remainder/g on
>>> MutableBigInteger.java and include it in 8014319?
>>
>> That's already been done in the phase{3,4} patched provided by Alan:
>>
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-May/016783.html
>>
> The MutableBigInteger.java.* files I extracted from BigIntegerPatch.zip
> still say "reminder". Maybe I have an older version of the .zip file.
> Anyway, I fixed it in the files linked above.
Now I recall that I changed that myself after Alan pointed it out.
Thanks,
Brian
From joe.darcy at oracle.com Wed Jul 3 02:06:08 2013
From: joe.darcy at oracle.com (Joseph Darcy)
Date: Tue, 02 Jul 2013 19:06:08 -0700
Subject: RFC 6910473: BigInteger negative bit length, value range, and
future prospects
In-Reply-To: <3C28D178-09DF-4CBC-93B2-272C0407D27C@oracle.com>
References: <3C28D178-09DF-4CBC-93B2-272C0407D27C@oracle.com>
Message-ID: <51D38710.30804@oracle.com>
Hello,
A quick note on this issue, before the recent work to use better
algorithms for BigInteger arithmetic operation, working with huge
numbers was impractical and thus BigInteger.bitLength misbehavior was
mostly an academic concern. With the better algorithms, exposure to
these large values is likely to increase so BigInteger.bitLength should
do something reasonable.
There are at least two implementation limits of note in the current code:
* Total bit length given a single backing array
* Max size of serializable BigInteger given old byte-array based format.
My preference for addressing this issue includes adding an
implementation note along the lines of "in JDK 8, BigInteger operates on
values in the range ...." without requiring that range to be part of the
specification.
Cheers,
-Joe
On 6/25/2013 6:18 PM, Brian Burkhalter wrote:
> This request for comment regards this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6910473
> BigInteger.bigLength() may return negative value for large numbers
>
> but more importantly Dmitry's thread
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018345.html
> What is the range of BigInteger values?
>
> The issue may be fixed superficially simply by throwing an ArithmeticException if the bit length as an int would be negative. A better fix suggested both in the issue description and in the aforementioned thread (option 1 of 3), is to define BigInteger to support a limited range and to clamp to that range in the constructor, throwing an ArithmeticException if the supplied parameter(s) would cause the BigInteger to overflow. This check would be relatively inexpensive. The suggested constraint range is
> [ -pow(2, pow(2,31) - 1), pow(2, pow(2,31) - 1) )
> This constraint would guarantee that all BigInteger instances are capable of accurately returning their properties such as bit length, bit count, etc.
>
> This naturally would require a minor specification change to BigInteger. The question is whether this change would limit any future developments of this and related classes. For example, one could envision BigInteger supporting bit lengths representable by a long instead of an int. In this case the second option would be preferable.
>
> It has been suggested that an alternative to extending the ranges supported by BigInteger would be to define a different class altogether to handle the larger ranges, keeping BigInteger as a well-specified API for the ranges it supports. Other related classes for arbitrary precision binary floating point and rational numbers might also be considered.
>
> In summary the specific questions being posed here are:
>
> 1) what is the general opinion on clamping the range of BigInteger and the various options suggested at the end of
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018345.html ?
>
> 2) what are the forward looking thoughts on handling integers outside the current BigInteger range?
>
> From a practical point of view, any changes need to be considered with respect to what may be done in the short term (JDK 8) versus the long (JDK 9), so to speak.
>
> Thanks,
>
> Brian
From zhangshj at linux.vnet.ibm.com Wed Jul 3 03:04:52 2013
From: zhangshj at linux.vnet.ibm.com (Shi Jun Zhang)
Date: Wed, 03 Jul 2013 11:04:52 +0800
Subject: RFR: 8019381: HashMap.isEmpty is non-final, potential issues
for get/remove
In-Reply-To: <450D0C6E-3BA7-40AD-B415-6659A6FDDA91@oracle.com>
References: <51CBF181.1020301@linux.vnet.ibm.com>
<51CCAAE5.4010707@univ-mlv.fr> <51CD896D.9030807@oracle.com>
<51CDB453.5010003@linux.vnet.ibm.com> <51D13323.9030601@linux.vnet.ibm.com>
<51D19EAE.2010201@univ-mlv.fr>
<450D0C6E-3BA7-40AD-B415-6659A6FDDA91@oracle.com>
Message-ID: <51D394D4.7090706@linux.vnet.ibm.com>
On 7/1/2013 11:49 PM, Chris Hegarty wrote:
> On 1 Jul 2013, at 17:22, Remi Forax wrote:
>
>> On 07/01/2013 09:43 AM, Shi Jun Zhang wrote:
>>> On 6/29/2013 12:05 AM, Shi Jun Zhang wrote:
>>>> On 6/28/2013 9:02 PM, Alan Bateman wrote:
>>>>> On 27/06/2013 22:13, Remi Forax wrote:
>>>>>> On 06/27/2013 10:02 AM, Shi Jun Zhang wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> There are some isEmpty() check added into get/remove methods since 8011200 to return directly if HashMap is empty. However isEmpty is a non-final public method which can be overridden by subclass. If the subclass defines isEmpty differently from HashMap, it would cause problem while getting or removing elements.
>>>>>> yes, it's a bug.
>>>>>> Could you report it ?
>>>>>>
>>>>>> R?mi
>>>>> I've created a bug to track this:
>>>>>
>>>>> 8019381: HashMap.isEmpty is non-final, potential issues for get/remove
>>>>>
>>>>> -Alan
>>>> Thanks, Alan.
>>>>
>>>> I'm quite busy today and do not have time to report it until now. Thanks for your help.
>>>>
>>>> I will provide a webrev next Monday for review.
>>> Hi,
>>>
>>> Here is the webrev
>>>
>>> http://cr.openjdk.java.net/~zhangshj/8019381/webrev.00/
>> This looks Ok for me.
> +1
>
> -Chris
>
>> R?mi
>>
Thanks all for the review.
Jonathan,
Could you help to push the changeset?
--
Regards,
Shi Jun Zhang
From henry.jen at oracle.com Wed Jul 3 08:03:03 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 03 Jul 2013 01:03:03 -0700
Subject: RFR: 8017231: Add StringJoiner.merge
Message-ID: <51D3DAB7.9050109@oracle.com>
Hi,
Please review a simple addition of StringJoiner.merge method. This is
useful to combine StringJoiners used in parallel doing joining works.
The webrev can be found at
http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
Also included is a little clean up for StringJoinerTest.
Cheers,
Henry
From peter.levart at gmail.com Wed Jul 3 09:18:01 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Wed, 03 Jul 2013 11:18:01 +0200
Subject: RFR: 8015315: Stream.concat methods
In-Reply-To: <51CE3142.60800@oracle.com>
References: <51CE3142.60800@oracle.com>
Message-ID: <51D3EC49.2020003@gmail.com>
Hi Henry,
I think that ConcatSpliterator.characteristics() method is not honoring
the spec which says:
* Returns a set of characteristics of this Spliterator and its
* elements. The result is represented as ORed values from {@link
* #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
* {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
* {@link #SUBSIZED}. *Repeated calls to {@code characteristics()} on**
** * a given spliterator should always return the same result.*
*
* If a Spliterator reports an inconsistent set of
* characteristics (either those returned from a single invocation
* or across multiple invocations), no guarantees can be made
* about any computation using this Spliterator.
*
* @return a representation of characteristics
*/
int characteristics();
The implementation:
736 @Override
737 public int characteristics() {
738 if (beforeSplit) {
739 // Concatenation loses DISTINCT and SORTED characteristics
740 return aSpliterator.characteristics() & bSpliterator.characteristics()
741 & ~(Spliterator.DISTINCT | Spliterator.SORTED
742 | (unsized ? Spliterator.SIZED | Spliterator.SUBSIZED : 0));
743 }
744 else {
745 return bSpliterator.characteristics();
746 }
747 }
...is such that repeated calls to the method can return different
results over time.
The question is whether the spec. is OK as it is. No constraints are put
on the characteristics of the Spliterator returned from the trySplit()
method, so why should "this" Spliterator have constant characteristics
for the entire lifetime? That is not symmetric. Perhaps the spec. should
only constrain characteristics to be constant between two consecutive
calls to trySplit() and only allow characteristics to change as a result
of trySplit() returning non-null...
Regards, Peter
On 06/29/2013 02:58 AM, Henry Jen wrote:
> Hi,
>
> Please review the webrev that add concat static method to Stream and
> primitive Streams.
>
> http://cr.openjdk.java.net/~henryjen/ccc/8015315.0/webrev/
>
> Cheers,
> Henry
From paul.sandoz at oracle.com Wed Jul 3 09:31:59 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Wed, 3 Jul 2013 11:31:59 +0200
Subject: RFR: 8017231: Add StringJoiner.merge
In-Reply-To: <51D3DAB7.9050109@oracle.com>
References: <51D3DAB7.9050109@oracle.com>
Message-ID: <57C58D2D-54F2-4F5B-A2A9-DA02C4F85DF6@oracle.com>
On Jul 3, 2013, at 10:03 AM, Henry Jen wrote:
> Hi,
>
> Please review a simple addition of StringJoiner.merge method. This is
> useful to combine StringJoiners used in parallel doing joining works.
>
> The webrev can be found at
> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
>
In StringJoiner:
For:
+ * A {@code StringJoiner} is empty if {@link add(CharSequence) add()}
+ * has never been called, and if {@code merge()} has never been called
+ * with a non- empty {@code StringJoiner} argument.
Suggest:
*
A {@code StringJoiner} is empty if neither {@link add(CharSequence) add()}
* or {@code merge()} have been called with a non-empty {@code StringJoiner}
* argument.
Missing a "then" after the ",":
+ *
If the other {@code StringJoiner} is using a different delimiter,
+ * elements from the other {@code StringJoiner} are concatenated with that
Otherwise looks good.
Paul.
From paul.sandoz at oracle.com Wed Jul 3 09:44:29 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Wed, 3 Jul 2013 11:44:29 +0200
Subject: RFR: 8015315: Stream.concat methods
In-Reply-To: <51D3EC49.2020003@gmail.com>
References: <51CE3142.60800@oracle.com> <51D3EC49.2020003@gmail.com>
Message-ID: <3A169692-CD56-4093-8AFA-27E2603131C3@oracle.com>
On Jul 3, 2013, at 11:18 AM, Peter Levart wrote:
> Hi Henry,
>
> I think that ConcatSpliterator.characteristics() method is not honoring
> the spec which says:
>
> * Returns a set of characteristics of this Spliterator and its
> * elements. The result is represented as ORed values from {@link
> * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
> * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
> * {@link #SUBSIZED}. *Repeated calls to {@code characteristics()} on**
> ** * a given spliterator should always return the same result.*
> *
> * If a Spliterator reports an inconsistent set of
> * characteristics (either those returned from a single invocation
> * or across multiple invocations), no guarantees can be made
> * about any computation using this Spliterator.
> *
> * @return a representation of characteristics
> */
> int characteristics();
>
>
> The implementation:
>
> 736 @Override
> 737 public int characteristics() {
> 738 if (beforeSplit) {
> 739 // Concatenation loses DISTINCT and SORTED characteristics
> 740 return aSpliterator.characteristics() & bSpliterator.characteristics()
> 741 & ~(Spliterator.DISTINCT | Spliterator.SORTED
> 742 | (unsized ? Spliterator.SIZED | Spliterator.SUBSIZED : 0));
> 743 }
> 744 else {
> 745 return bSpliterator.characteristics();
> 746 }
> 747 }
>
>
> ...is such that repeated calls to the method can return different
> results over time.
>
>
> The question is whether the spec. is OK as it is. No constraints are put
> on the characteristics of the Spliterator returned from the trySplit()
> method, so why should "this" Spliterator have constant characteristics
> for the entire lifetime? That is not symmetric. Perhaps the spec. should
> only constrain characteristics to be constant between two consecutive
> calls to trySplit() and only allow characteristics to change as a result
> of trySplit() returning non-null...
>
Yes, I think that was the general intention. A given spliterator "morphs" into another when it is split.
Many spliterators will change characteristics when split e.g. for maps the top level spliterator will report SIZED, but when split it will not.
I think we can say:
* {@link #SUBSIZED}. Repeated calls to {@code characteristics()} on
* a given spliterator, prior to splitting, should always return the same result.
Paul.
From paul.sandoz at oracle.com Wed Jul 3 12:54:18 2013
From: paul.sandoz at oracle.com (paul.sandoz at oracle.com)
Date: Wed, 03 Jul 2013 12:54:18 +0000
Subject: hg: jdk8/tl/jdk: 2 new changesets
Message-ID: <20130703125507.2369B4875F@hg.openjdk.java.net>
Changeset: dfd7fb0ce54b
Author: psandoz
Date: 2013-07-03 11:58 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/dfd7fb0ce54b
8011427: java.util.concurrent collection Spliterator implementations
Reviewed-by: martin
Contributed-by: Doug Lea
! src/share/classes/java/util/concurrent/ArrayBlockingQueue.java
! src/share/classes/java/util/concurrent/BlockingDeque.java
! src/share/classes/java/util/concurrent/BlockingQueue.java
! src/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
! src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
! src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java
! src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java
! src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
! src/share/classes/java/util/concurrent/CopyOnWriteArraySet.java
! src/share/classes/java/util/concurrent/DelayQueue.java
! src/share/classes/java/util/concurrent/Delayed.java
! src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
! src/share/classes/java/util/concurrent/LinkedBlockingQueue.java
! src/share/classes/java/util/concurrent/LinkedTransferQueue.java
! src/share/classes/java/util/concurrent/PriorityBlockingQueue.java
! src/share/classes/java/util/concurrent/SynchronousQueue.java
Changeset: bb4ae17c98cf
Author: psandoz
Date: 2013-07-03 11:58 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/bb4ae17c98cf
8019481: Sync misc j.u.c classes from 166 to tl
Reviewed-by: martin
Contributed-by: Doug Lea
! src/share/classes/java/util/concurrent/BrokenBarrierException.java
! src/share/classes/java/util/concurrent/CountDownLatch.java
! src/share/classes/java/util/concurrent/CyclicBarrier.java
! src/share/classes/java/util/concurrent/Exchanger.java
! src/share/classes/java/util/concurrent/Phaser.java
! src/share/classes/java/util/concurrent/TimeUnit.java
! src/share/classes/java/util/concurrent/TimeoutException.java
! src/share/classes/java/util/concurrent/package-info.java
From Alan.Bateman at oracle.com Wed Jul 3 14:51:30 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 15:51:30 +0100
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51C88EBF.9020704@gmail.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com>
Message-ID: <51D43A72.8090508@oracle.com>
On 24/06/2013 19:23, Peter Levart wrote:
>
> Hi Alan,
>
> I have prepared the 2nd revision of the patch:
>
> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.02/
>
> There is a little change in AnnotationParser's alternative parsing
> method. This time the parser does not assume anything about
> annotations being parsed (previously it assumed that they had RUNTIME
> retention). The only difference from standard parsing is that only the
> select annotation types are parsed and the rest are quickly skipped.
> Infinite recursion is broken by the special cased evaluation in
> AnnotationType constructor:
>
> 129 // Initialize retention,& inherited fields. Special treatment
> 130 // of the corresponding annotation types breaks infinite recursion.
> 131 if (annotationClass != Retention.class&&
> 132 annotationClass != Inherited.class) {
> 133 JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
> 134 Map, Annotation> metaAnnotations =
> 135 AnnotationParser.parseAnnotations(
> 136 jla.getRawClassAnnotations(annotationClass),
> 137 jla.getConstantPool(annotationClass),
> 138 annotationClass,
> 139 Retention.class, Inherited.class
> 140 );
> 141 Retention ret = (Retention) metaAnnotations.get(Retention.class);
> 142 retention = (ret == null ? RetentionPolicy.CLASS : ret.value());
> 143 inherited = metaAnnotations.containsKey(Inherited.class);
> 144 }
> 145 else {
> 146 retention = RetentionPolicy.RUNTIME;
> 147 inherited = false;
> 148 }
>
> This is enough to break recursion. The RUNTIME and !inherited
> assumptions for @Retention and @Inherited meta-annotations are
> therefore localized in this code only.
>
> I have also added two tests. The one for detecting deadlock situation
> and the other for consistent parsing of mutually recursive annotations
> in presence of separate compilation.
Sorry for the delay getting back to you on this, I've been busy with
other things.
I'm not an expert on the annotation code but the updated approach to
break the recursion looks good good to me (and a clever approach). Joel
has been on vacation but he told me that he plans to look at this too
(I'm happy to sponsor it in the mean-time as I think the approach is
good and we should get this fix in).
There's another usage of AnnotationParser.parseAnnotation in
TypeAnnotationParser that will need to be updated (I only noticed it
when I grabbed your patch to try it).
A minor comment is that the alignment of the parameter declarations when
they go over multiple lines should probably be fixed up to be consistent
with the other usages.
Thanks for adding tests. One comment on AnnotationTypeDeadlockTest is
that the join(500) might not be sufficient on a very busy system (say
when running tests concurrently) or on a low-end embedded system. So I
think it would be good to bump this up x10. An alternative would be to
not set the daemon status and just let the test timeout if there is a
deadlock. The spin-waits can consume cycles when running tests
concurrently but I don't expect it's an issue here.
A typo in the @summary of AnnotationTypeRuntimeAssumptionTest ("si" ->
"is"). I guess I'd go for slightly shorter lines to make future
side-by-side reviews easier.
Otherwise, this looks good to me.
-Alan.
From brian.burkhalter at oracle.com Wed Jul 3 15:46:51 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 08:46:51 -0700
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect on
zero itself ("0.0")
Message-ID:
Hello,
The patch here
http://cr.openjdk.java.net/~bpb/6480539/
is proposed to resolve this issue
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6480539
which was most recently discussed in this thread
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-February/014252.html
The proposed fix in this prior thread is withdrawn.
Thanks,
Brian
From Alan.Bateman at oracle.com Wed Jul 3 16:09:30 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 17:09:30 +0100
Subject: RFR: 8017231: Add StringJoiner.merge
In-Reply-To: <51D3DAB7.9050109@oracle.com>
References: <51D3DAB7.9050109@oracle.com>
Message-ID: <51D44CBA.8010001@oracle.com>
On 03/07/2013 09:03, Henry Jen wrote:
> Hi,
>
> Please review a simple addition of StringJoiner.merge method. This is
> useful to combine StringJoiners used in parallel doing joining works.
>
> The webrev can be found at
> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
>
> Also included is a little clean up for StringJoinerTest.
>
> Cheers,
> Henry
Is this named "merge" to disambiguate it from "add"? Just wondering.
A minor point but I think the wider javadoc tends to use "the given XYZ"
when referring to parameters rather than the "the supplied XYZ".
Typo "nonempty" -> "non-empty".
I assume you meant to name the local otherBuilder rather than an
otherBuffer. Also is there any reason not to use
append(CharSequence,int,int) here?
The test looks good to me, I guess an alternative would be to just add
to the existing test so that we have one test for StringJoiner (it
doesn't matter either way).
-Alan.
From Alan.Bateman at oracle.com Wed Jul 3 16:15:02 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 17:15:02 +0100
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and usages
are in different contexts
Message-ID: <51D44E06.6030204@oracle.com>
When running with a security manager, ServiceLoader isn't currently very
predictable when created and used in different contexts. For the
ServiceLoader usages in the JDK then isn't a problem because all (bar
one or two uninteresting cases) involve creating the ServiceLoader and
immediately iterating over the providers. However for other usages then
it may be an issue as the iteration over the providers may or may not
have the expected permissions. The webrev with the proposed changes is here:
http://cr.openjdk.java.net/~alanb/8019622/webrev/
Mandy - this is one that we've chatted about a few times so you are
probably the best to review it (if you have time of course).
-Alan.
From forax at univ-mlv.fr Wed Jul 3 16:24:51 2013
From: forax at univ-mlv.fr (Remi Forax)
Date: Wed, 03 Jul 2013 18:24:51 +0200
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D44E06.6030204@oracle.com>
References: <51D44E06.6030204@oracle.com>
Message-ID: <51D45053.6030509@univ-mlv.fr>
On 07/03/2013 06:15 PM, Alan Bateman wrote:
>
> When running with a security manager, ServiceLoader isn't currently
> very predictable when created and used in different contexts. For the
> ServiceLoader usages in the JDK then isn't a problem because all (bar
> one or two uninteresting cases) involve creating the ServiceLoader and
> immediately iterating over the providers. However for other usages
> then it may be an issue as the iteration over the providers may or may
> not have the expected permissions. The webrev with the proposed
> changes is here:
>
> http://cr.openjdk.java.net/~alanb/8019622/webrev/
>
> Mandy - this is one that we've chatted about a few times so you are
> probably the best to review it (if you have time of course).
>
> -Alan.
Hi Alan,
you can use a method reference instead a lambda here,
so
PrivilegedAction action = () -> hasNextService();
return AccessController.doPrivileged(action, acc);
can be written
return AccessController.doPrivileged(this::hasNextService, acc);
(me crossing my fingers in hope that the compiler will not be confused
by the overloads).
cheers,
R?mi
From henry.jen at oracle.com Wed Jul 3 16:57:23 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 3 Jul 2013 09:57:23 -0700
Subject: RFR: 8017231: Add StringJoiner.merge
In-Reply-To: <51D44CBA.8010001@oracle.com>
References: <51D3DAB7.9050109@oracle.com> <51D44CBA.8010001@oracle.com>
Message-ID:
On Jul 3, 2013, at 9:09 AM, Alan Bateman wrote:
> On 03/07/2013 09:03, Henry Jen wrote:
>> Hi,
>>
>> Please review a simple addition of StringJoiner.merge method. This is
>> useful to combine StringJoiners used in parallel doing joining works.
>>
>> The webrev can be found at
>> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
>>
>> Also included is a little clean up for StringJoinerTest.
>>
>> Cheers,
>> Henry
> Is this named "merge" to disambiguate it from "add"? Just wondering.
>
I think it's a better reflection on the fact of "merge" of elements like collections, instead of feels like add(StringJoiner.toString()).
> A minor point but I think the wider javadoc tends to use "the given XYZ" when referring to parameters rather than the "the supplied XYZ".
>
> Typo "nonempty" -> "non-empty".
>
Will fix those.
> I assume you meant to name the local otherBuilder rather than an otherBuffer. Also is there any reason not to use append(CharSequence,int,int) here?
>
Will fix the naming as well.
As for append, I don't think there is a particular reason.
It would be best if we can do append(char[], start, end), but I don't see there is any way to do that. I suspect append(CS, int, int) should be a little faster without increasing the count each time give a check of range.
I'll update it to use append(CharSequence, int, int).
> The test looks good to me, I guess an alternative would be to just add to the existing test so that we have one test for StringJoiner (it doesn't matter either way).
>
I'll leave it out, I think it is easier to navigate that way.
Do we need another round for above updates?
Cheers,
Henry
From Alan.Bateman at oracle.com Wed Jul 3 17:01:27 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 18:01:27 +0100
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D45053.6030509@univ-mlv.fr>
References: <51D44E06.6030204@oracle.com> <51D45053.6030509@univ-mlv.fr>
Message-ID: <51D458E7.7080107@oracle.com>
On 03/07/2013 17:24, Remi Forax wrote:
>
> Hi Alan,
> you can use a method reference instead a lambda here,
> so
> PrivilegedAction action = () -> hasNextService();
> return AccessController.doPrivileged(action, acc);
> can be written
> return AccessController.doPrivileged(this::hasNextService, acc);
> (me crossing my fingers in hope that the compiler will not be confused
> by the overloads).
There is a problem using method references here that need to be tracked
down. In TypeConvertingMethodAdapter where it handles boxing then
String.format is used but that triggers the loading of formatter
providers and recursive initialization that blows the stack and
manifests as a BootstrapMethodError. I need to ask Robert about this or
bring it up on lambda-dev as I'm not sure why this doesn't happen with a
lambda. If we have a bootstrapping issue then it may be that
ServiceLoader will need to use an inner class here.
AccessController.doPrivileged does have overloads that javac reports as
ambiguous. As it happens someone made a good suggestion recently on
security-dev that the new limited doPrivlieged methods take this into
account.
-Alan.
From joel.franck at oracle.com Wed Jul 3 17:09:49 2013
From: joel.franck at oracle.com (=?iso-8859-1?Q?Joel_Borggr=E9n-Franck?=)
Date: Wed, 3 Jul 2013 19:09:49 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51C88EBF.9020704@gmail.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com>
Message-ID: <00288C7A-5455-48E3-A5D3-0D3330B8E796@oracle.com>
Hi Peter,
As Alan said, a big thanks for looking into this.
I have been toying with a slightly different approach to breaking the infinite recursion by pre-construct AnnotationType instances for Retention and Inherited. While cleaner in some places others became uglier. I'm fine with this approach.
As Alan said, you need to update the patch with a modification in TypeAnnotationParser. After doing that all java/lang tests in the jdk/test directory passes.
Also, can you please explain to me why the update race is safe. I have done the/some research myself but I would like to know which angles you have covered.
Given that and that you fix Alan's comments I think this is good to go.
Thanks again!
cheers
/Joel
On Jun 24, 2013, at 8:23 PM, Peter Levart wrote:
> On 06/19/2013 08:54 PM, Alan Bateman wrote:
>> Thank you for coming back to this.
>>
>> I've looked over the webrev and the approach looks good to me. Joel might want to look at this too. Do you think you could include a test (as we try to include a test with all fixes if we can)?
>>
>> It would be good to remove the synchronizaiton on initAnnotationsIfNecessary too, but one step as time (and smaller changes are always easier to discuss).
>>
>> -Alan
>
> Hi Alan,
>
> I have prepared the 2nd revision of the patch:
>
> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.02/
>
> There is a little change in AnnotationParser's alternative parsing method. This time the parser does not assume anything about annotations being parsed (previously it assumed that they had RUNTIME retention). The only difference from standard parsing is that only the select annotation types are parsed and the rest are quickly skipped. Infinite recursion is broken by the special cased evaluation in AnnotationType constructor:
>
> 129 // Initialize retention, & inherited fields. Special treatment
> 130 // of the corresponding annotation types breaks infinite recursion.
> 131 if (annotationClass != Retention.class &&
> 132 annotationClass != Inherited.class) {
> 133 JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
> 134 Map, Annotation> metaAnnotations =
> 135 AnnotationParser.parseAnnotations(
> 136 jla.getRawClassAnnotations(annotationClass),
> 137 jla.getConstantPool(annotationClass),
> 138 annotationClass,
> 139 Retention.class, Inherited.class
> 140 );
> 141 Retention ret = (Retention) metaAnnotations.get(Retention.class);
> 142 retention = (ret == null ? RetentionPolicy.CLASS : ret.value());
> 143 inherited = metaAnnotations.containsKey(Inherited.class);
> 144 }
> 145 else {
> 146 retention = RetentionPolicy.RUNTIME;
> 147 inherited = false;
> 148 }
>
>
> This is enough to break recursion. The RUNTIME and !inherited assumptions for @Retention and @Inherited meta-annotations are therefore localized in this code only.
>
> I have also added two tests. The one for detecting deadlock situation and the other for consistent parsing of mutually recursive annotations in presence of separate compilation.
>
>
>
> Regards, Peter
>
From ivan.gerasimov at oracle.com Wed Jul 3 17:12:44 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Wed, 03 Jul 2013 21:12:44 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
Message-ID: <51D45B8C.7010109@oracle.com>
Hello everybody!
We have a request to improve jtreg test.
The test had been written to verify fix for memory leak during class
redefinition.
The problem is that it always is reported as PASSED even in the presence
of the leak.
The proposed change is platform specific.
It allows memory leak detection only on Linux.
This is because the memory leak was in native code, so there's no easy
way to detect it from within Java code.
Here's the webrev for JDK8 repository:
http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
The surprising thing is that modified test detected the leak with the
latest JDK8!
Latest 6 and 7 are fine, so it might be regression in JDK8.
I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845 "Memory
leak during class redefenition" (not yet available.)
Sincerely yours,
Ivan Gerasimov
From henry.jen at oracle.com Wed Jul 3 17:14:02 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 3 Jul 2013 10:14:02 -0700
Subject: RFR: 8017231: Add StringJoiner.merge
In-Reply-To:
References: <51D3DAB7.9050109@oracle.com> <51D44CBA.8010001@oracle.com>
Message-ID:
On Jul 3, 2013, at 9:57 AM, Henry Jen wrote:
>
> On Jul 3, 2013, at 9:09 AM, Alan Bateman wrote:
>
>> On 03/07/2013 09:03, Henry Jen wrote:
>>> Hi,
>>>
>>> Please review a simple addition of StringJoiner.merge method. This is
>>> useful to combine StringJoiners used in parallel doing joining works.
>>>
>>> The webrev can be found at
>>> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
>>>
>>> Also included is a little clean up for StringJoinerTest.
>>>
>>> Cheers,
>>> Henry
>> Is this named "merge" to disambiguate it from "add"? Just wondering.
>>
>
> I think it's a better reflection on the fact of "merge" of elements like collections, instead of feels like add(StringJoiner.toString()).
>
>> A minor point but I think the wider javadoc tends to use "the given XYZ" when referring to parameters rather than the "the supplied XYZ".
>>
>> Typo "nonempty" -> "non-empty".
>>
>
> Will fix those.
>
>> I assume you meant to name the local otherBuilder rather than an otherBuffer. Also is there any reason not to use append(CharSequence,int,int) here?
>>
>
> Will fix the naming as well.
>
> As for append, I don't think there is a particular reason.
>
I should said the range check is the reason.
Cheers,
Henry
> It would be best if we can do append(char[], start, end), but I don't see there is any way to do that. I suspect append(CS, int, int) should be a little faster without increasing the count each time give a check of range.
>
> I'll update it to use append(CharSequence, int, int).
>
From mandy.chung at oracle.com Wed Jul 3 17:29:53 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Wed, 03 Jul 2013 10:29:53 -0700
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D44E06.6030204@oracle.com>
References: <51D44E06.6030204@oracle.com>
Message-ID: <51D45F91.8040709@oracle.com>
On 7/3/13 9:15 AM, Alan Bateman wrote:
>
> When running with a security manager, ServiceLoader isn't currently
> very predictable when created and used in different contexts. For the
> ServiceLoader usages in the JDK then isn't a problem because all (bar
> one or two uninteresting cases) involve creating the ServiceLoader and
> immediately iterating over the providers. However for other usages
> then it may be an issue as the iteration over the providers may or may
> not have the expected permissions. The webrev with the proposed
> changes is here:
>
> http://cr.openjdk.java.net/~alanb/8019622/webrev/
>
> Mandy - this is one that we've chatted about a few times so you are
> probably the best to review it (if you have time of course).
>
We've talked about this a few times and it's good to see this fixed.
The fix is reasonable to capture the ACC at creation time and use that
for iteration.
Looks good.
Mandy
From joe.darcy at oracle.com Wed Jul 3 17:35:47 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Wed, 03 Jul 2013 10:35:47 -0700
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect
on zero itself ("0.0")
In-Reply-To:
References:
Message-ID: <51D460F3.5070103@oracle.com>
Hi Brian,
I have some concerns with this patch.
First, I think the stripTrailingZeros specification should explicitly
call out what happens with a numerically zero value.
Second, I would have expected the code change to be limited to the
stripTrailingZeros method. The private createAndStripZerosToMatchScale
methods are used during rounding operations and unconditionally set the
scale of a zero value to zero, which is incorrect according to the
specification.
I believe sufficiently thorough tests of divide should fail with the
current changes to createAndStripZerosToMatchScale.
Cheers,
-Joe
On 07/03/2013 08:46 AM, Brian Burkhalter wrote:
> Hello,
>
> The patch here
>
> http://cr.openjdk.java.net/~bpb/6480539/
>
> is proposed to resolve this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6480539
>
> which was most recently discussed in this thread
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-February/014252.html
>
> The proposed fix in this prior thread is withdrawn.
>
> Thanks,
>
> Brian
From brian.burkhalter at oracle.com Wed Jul 3 17:47:47 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 10:47:47 -0700
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect
on zero itself ("0.0")
In-Reply-To: <51D460F3.5070103@oracle.com>
References:
<51D460F3.5070103@oracle.com>
Message-ID:
Hi Joe,
Thanks for pointing out the problems with modifying the private methods. I'll update this only to change the one public method and to modify its specification.
Thanks,
Brian
On Jul 3, 2013, at 10:35 AM, Joe Darcy wrote:
> I have some concerns with this patch.
>
> First, I think the stripTrailingZeros specification should explicitly call out what happens with a numerically zero value.
>
> Second, I would have expected the code change to be limited to the stripTrailingZeros method. The private createAndStripZerosToMatchScale methods are used during rounding operations and unconditionally set the scale of a zero value to zero, which is incorrect according to the specification.
>
> I believe sufficiently thorough tests of divide should fail with the current changes to createAndStripZerosToMatchScale.
From forax at univ-mlv.fr Wed Jul 3 17:56:19 2013
From: forax at univ-mlv.fr (Remi Forax)
Date: Wed, 03 Jul 2013 19:56:19 +0200
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D458E7.7080107@oracle.com>
References: <51D44E06.6030204@oracle.com> <51D45053.6030509@univ-mlv.fr>
<51D458E7.7080107@oracle.com>
Message-ID: <51D465C3.9080900@univ-mlv.fr>
On 07/03/2013 07:01 PM, Alan Bateman wrote:
> On 03/07/2013 17:24, Remi Forax wrote:
>>
>> Hi Alan,
>> you can use a method reference instead a lambda here,
>> so
>> PrivilegedAction action = () -> hasNextService();
>> return AccessController.doPrivileged(action, acc);
>> can be written
>> return AccessController.doPrivileged(this::hasNextService, acc);
>> (me crossing my fingers in hope that the compiler will not be
>> confused by the overloads).
> There is a problem using method references here that need to be
> tracked down. In TypeConvertingMethodAdapter where it handles boxing
> then String.format is used but that triggers the loading of formatter
> providers and recursive initialization that blows the stack and
> manifests as a BootstrapMethodError. I need to ask Robert about this
> or bring it up on lambda-dev as I'm not sure why this doesn't happen
> with a lambda. If we have a bootstrapping issue then it may be that
> ServiceLoader will need to use an inner class here.
Interesting !
it's related to the way the compiler desugar lambda vs method reference.
I've not taken a look to the generated code but I think I know why the
behaviour is different.
If the code uses a lambda:
PrivilegedAction action = () -> hasNextService();
the compiler will create a private method lambda$n and will infer it's
parameter type and return type,
here the infered return type is Boolean and not boolean, so the boxing
of the result of hasNextService()
is done inside the method lambda$n.
If the code uses a method reference:
PrivilegedAction action = this::hasNextService;
No method lambda$n is generated, the compiler uses the method
hasNextService, so the boxing
need to be done in the generated proxy at runtime.
So the way to fix this issue is to not use String.format in boxingDescriptor
(It's the only method in TypeConvertingMethodAdapter that uses format)
private static String boxingDescriptor(Wrapper w) {
return '(' + w.basicTypeChar() + ")L" + wrapperName(w) + ';'
}
>
> AccessController.doPrivileged does have overloads that javac reports
> as ambiguous.
Yes, after sending this mail, I recall that the EG decide to not
disambiguate overloads based
on the fact that the lambda/method reference declare to throw an
exception or not.
> As it happens someone made a good suggestion recently on security-dev
> that the new limited doPrivlieged methods take this into account.
or to write two lines instead of one:
PrivilegedAction action = this::hasNextService;
return AccessController.doPrivileged(action, acc);
>
> -Alan.
>
>
R?mi
From brian.burkhalter at oracle.com Wed Jul 3 18:09:01 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 11:09:01 -0700
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect
on zero itself ("0.0")
In-Reply-To:
References:
<51D460F3.5070103@oracle.com>
Message-ID:
On Jul 3, 2013, at 10:47 AM, Brian Burkhalter wrote:
> I'll update this only to change the one public method and to modify its specification.
I've updated the webrev
http://cr.openjdk.java.net/~bpb/6480539/
and rerun JTREG as well as modifying and resubmitting the CCC request (it had been filed for the previous fix proposal).
Thanks,
Brian
From joe.darcy at oracle.com Wed Jul 3 18:40:03 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Wed, 03 Jul 2013 11:40:03 -0700
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect
on zero itself ("0.0")
In-Reply-To:
References:
<51D460F3.5070103@oracle.com>
Message-ID: <51D47003.3050302@oracle.com>
On 07/03/2013 11:09 AM, Brian Burkhalter wrote:
> On Jul 3, 2013, at 10:47 AM, Brian Burkhalter wrote:
>
>> I'll update this only to change the one public method and to modify its specification.
> I've updated the webrev
>
> http://cr.openjdk.java.net/~bpb/6480539/
>
> and rerun JTREG as well as modifying and resubmitting the CCC request (it had been filed for the previous fix proposal).
>
The compareMagnitude method is private so shouldn't be used in the
behavioral description. I recommend something like, "If this {@code
BigDecimal} is numerically equal to zero, {@code BigDecimal.ZERO} is
returned."
Also, in the initial check, instead of
2604 if (compareMagnitude(BigDecimal.ZERO) == 0) {
2605 return BigDecimal.ZERO;
2606 } else if (intCompact != INFLATED) {
something like
if (intCompact == 0 or intVal.signum() == 0)
might be faster.
Also, I recommend adding a few more test cases for zeros with small
exponents, e.g. "0e2", "0e-2".
thanks,
-Joe
From Alan.Bateman at oracle.com Wed Jul 3 18:41:56 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 19:41:56 +0100
Subject: RFR 8017329 8b92-lambda regression: TreeSet("a",
"b").stream().substream(1).parallel().iterator() is empty
In-Reply-To: <6C3ED24A-9A28-403E-B995-9C09C69571C2@oracle.com>
References: <6C3ED24A-9A28-403E-B995-9C09C69571C2@oracle.com>
Message-ID: <51D47074.3030009@oracle.com>
On 27/06/2013 10:38, Paul Sandoz wrote:
> Hi,
>
> Please review a fix for a regression with using Stream.substream for an ORDERED but not SUBSIZED spliterator that does not split.
>
> This is based off:
>
> http://cr.openjdk.java.net/~psandoz/tl/JDK-8012987-slice/webrev/
>
> which is blocked waiting for the Comparator API webrev to go into tl, which should be soon (waiting on CCC approval).
>
> Paul.
>
From what I understand of this then it looks fine to me.
-Alan.
From christian.thalinger at oracle.com Wed Jul 3 18:35:35 2013
From: christian.thalinger at oracle.com (christian.thalinger at oracle.com)
Date: Wed, 03 Jul 2013 18:35:35 +0000
Subject: hg: jdk8/tl/jdk: 8019184: MethodHandles.catchException() fails when
methods have 8 args + varargs
Message-ID: <20130703183551.94D184877E@hg.openjdk.java.net>
Changeset: bd6949f9dbb2
Author: twisti
Date: 2013-07-03 11:35 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/bd6949f9dbb2
8019184: MethodHandles.catchException() fails when methods have 8 args + varargs
Reviewed-by: jrose
! src/share/classes/java/lang/invoke/MethodHandleImpl.java
+ test/java/lang/invoke/TestCatchExceptionWithVarargs.java
From Alan.Bateman at oracle.com Wed Jul 3 19:35:29 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 20:35:29 +0100
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D465C3.9080900@univ-mlv.fr>
References: <51D44E06.6030204@oracle.com> <51D45053.6030509@univ-mlv.fr>
<51D458E7.7080107@oracle.com> <51D465C3.9080900@univ-mlv.fr>
Message-ID: <51D47D01.80201@oracle.com>
On 03/07/2013 18:56, Remi Forax wrote:
>
> Interesting !
> it's related to the way the compiler desugar lambda vs method reference.
>
> I've not taken a look to the generated code but I think I know why the
> behaviour is different.
> If the code uses a lambda:
> PrivilegedAction action = () -> hasNextService();
> the compiler will create a private method lambda$n and will infer it's
> parameter type and return type,
> here the infered return type is Boolean and not boolean, so the boxing
> of the result of hasNextService()
> is done inside the method lambda$n.
>
> If the code uses a method reference:
> PrivilegedAction action = this::hasNextService;
> No method lambda$n is generated, the compiler uses the method
> hasNextService, so the boxing
> need to be done in the generated proxy at runtime.
I've checked the generated code and this does seem to be the case (thanks!).
>
> So the way to fix this issue is to not use String.format in
> boxingDescriptor
> (It's the only method in TypeConvertingMethodAdapter that uses format)
>
> private static String boxingDescriptor(Wrapper w) {
> return '(' + w.basicTypeChar() + ")L" + wrapperName(w) + ';'
> }
I assume you mean "(" to avoid another puzzle :-)
That should fix it but I worry that this might be a bit brittle and
maybe there be other code paths that will trigger loading of providers
when building call sites that result in the same thing. It might be
safer for now to just use inner classes here.
-Alan.
From henry.jen at oracle.com Wed Jul 3 19:46:06 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 03 Jul 2013 12:46:06 -0700
Subject: RFR (2nd): 8017231: Add StringJoiner.merge
Message-ID: <51D47F7E.4080600@oracle.com>
Hi,
Adapted comments from Alan and Paul, thanks for reviewing.
http://cr.openjdk.java.net/~henryjen/ccc/8017231.1/webrev/
Cheers,
Henry
From paul.sandoz at oracle.com Wed Jul 3 19:45:33 2013
From: paul.sandoz at oracle.com (paul.sandoz at oracle.com)
Date: Wed, 03 Jul 2013 19:45:33 +0000
Subject: hg: jdk8/tl/jdk: 8017329: 8b92-lambda regression: TreeSet("a",
"b").stream().substream(1).parallel().iterator() is empty
Message-ID: <20130703194555.B9B5748789@hg.openjdk.java.net>
Changeset: 7532bb2d6476
Author: psandoz
Date: 2013-07-03 21:19 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7532bb2d6476
8017329: 8b92-lambda regression: TreeSet("a", "b").stream().substream(1).parallel().iterator() is empty
Reviewed-by: alanb
! src/share/classes/java/util/stream/SliceOps.java
! test/java/util/stream/test/org/openjdk/tests/java/util/stream/SliceOpTest.java
From jason.uh at oracle.com Wed Jul 3 19:52:27 2013
From: jason.uh at oracle.com (jason.uh at oracle.com)
Date: Wed, 03 Jul 2013 19:52:27 +0000
Subject: hg: jdk8/tl/jdk: 8019772: Fix doclint issues in javax.crypto and
javax.security subpackages
Message-ID: <20130703195302.91BF24878A@hg.openjdk.java.net>
Changeset: d5de500c99a3
Author: juh
Date: 2013-07-03 12:51 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d5de500c99a3
8019772: Fix doclint issues in javax.crypto and javax.security subpackages
Reviewed-by: darcy
! src/share/classes/javax/crypto/Cipher.java
! src/share/classes/javax/crypto/CipherInputStream.java
! src/share/classes/javax/crypto/ExemptionMechanism.java
! src/share/classes/javax/crypto/KeyAgreement.java
! src/share/classes/javax/crypto/KeyGenerator.java
! src/share/classes/javax/crypto/NullCipher.java
! src/share/classes/javax/security/auth/Subject.java
! src/share/classes/javax/security/cert/X509Certificate.java
From brian.burkhalter at oracle.com Wed Jul 3 20:01:41 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 13:01:41 -0700
Subject: Java 8 RFR 8019857: Fix doclint errors in java.util.Format*
Message-ID: <9A7DE880-5213-4B31-8E7F-00C65C245C19@oracle.com>
Reviewers:
For this issue
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019857 (should be public "soon").
here is the proposed update
http://cr.openjdk.java.net/~bpb/8019857/
Note that the diff starting at line 2593 is to correct a warning, not an error, and would require a CCC request (I think).
Thanks,
Brian
From joe.darcy at oracle.com Wed Jul 3 20:26:15 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Wed, 03 Jul 2013 13:26:15 -0700
Subject: Java 8 RFR 8019857: Fix doclint errors in java.util.Format*
In-Reply-To: <9A7DE880-5213-4B31-8E7F-00C65C245C19@oracle.com>
References: <9A7DE880-5213-4B31-8E7F-00C65C245C19@oracle.com>
Message-ID: <51D488E7.70504@oracle.com>
Hi Brian,
Looks good; approved to go back. The enum BigDecimalLayoutForm seems to
have escaped notice previously; since the comments being added are
"obvious", I don't think a ccc request is necessary.
Thanks for fixing these,
-Joe
On 07/03/2013 01:01 PM, Brian Burkhalter wrote:
> Reviewers:
>
> For this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019857 (should be public "soon").
>
> here is the proposed update
>
> http://cr.openjdk.java.net/~bpb/8019857/
>
> Note that the diff starting at line 2593 is to correct a warning, not an error, and would require a CCC request (I think).
>
> Thanks,
>
> Brian
From Alan.Bateman at oracle.com Wed Jul 3 20:36:02 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Wed, 03 Jul 2013 21:36:02 +0100
Subject: RFR (2nd): 8017231: Add StringJoiner.merge
In-Reply-To: <51D47F7E.4080600@oracle.com>
References: <51D47F7E.4080600@oracle.com>
Message-ID: <51D48B32.6020508@oracle.com>
On 03/07/2013 20:46, Henry Jen wrote:
> Hi,
>
> Adapted comments from Alan and Paul, thanks for reviewing.
>
> http://cr.openjdk.java.net/~henryjen/ccc/8017231.1/webrev/
>
This looks good to me.
(I see you took the suggestion to s/supplied/given. There's another one
in the add(CharSequence) method that could be changed too).
-Alan
From henry.jen at oracle.com Wed Jul 3 21:10:01 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 3 Jul 2013 14:10:01 -0700
Subject: RFR (2nd): 8017231: Add StringJoiner.merge
In-Reply-To: <51D48B32.6020508@oracle.com>
References: <51D47F7E.4080600@oracle.com> <51D48B32.6020508@oracle.com>
Message-ID:
Yes, when I looked at it, there are other places as well. But I decided to leave those alone as for delimiter/prefix/suffix, 'supplied' seems to be fine and consistent.
add() is perhaps a good change. I updated the webrev with this simple change, then I'll need a sponsor to push for me.
Cheers,
Henry
On Jul 3, 2013, at 1:36 PM, Alan Bateman wrote:
> On 03/07/2013 20:46, Henry Jen wrote:
>> Hi,
>>
>> Adapted comments from Alan and Paul, thanks for reviewing.
>>
>> http://cr.openjdk.java.net/~henryjen/ccc/8017231.1/webrev/
>>
> This looks good to me.
>
> (I see you took the suggestion to s/supplied/given. There's another one in the add(CharSequence) method that could be changed too).
>
> -Alan
From bill.pittore at oracle.com Wed Jul 3 21:17:29 2013
From: bill.pittore at oracle.com (BILL PITTORE)
Date: Wed, 03 Jul 2013 17:17:29 -0400
Subject: RFR - Changes to address CCC 8014135: Support for statically linked
agents
Message-ID: <51D494E9.2020200@oracle.com>
These changes address bug 8014135 which adds support for statically
linked agents in the VM. This is a followup to the recent JNI spec
changes that addressed statically linked JNI libraries( 8005716).
The JEP for this change is the same JEP as the JNI changes:
http://openjdk.java.net/jeps/178
Webrevs are here:
http://cr.openjdk.java.net/~bpittore/8014135/jdk/webrev.00/
http://cr.openjdk.java.net/~bpittore/8014135/hotspot/webrev.00/
The changes to jvmti.xml can also be seen in the output file that I
placed here:
http://cr.openjdk.java.net/~bpittore/8014135/hotspot/webrev.00/jvmti.html
Thanks,
bill
From henry.jen at oracle.com Wed Jul 3 21:20:55 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 03 Jul 2013 14:20:55 -0700
Subject: RFR: 8015315: Stream.concat methods
In-Reply-To: <51D15168.2020403@univ-mlv.fr>
References: <51CE3142.60800@oracle.com> <51D15168.2020403@univ-mlv.fr>
Message-ID: <51D495B7.5030304@oracle.com>
On 07/01/2013 02:52 AM, Remi Forax wrote:
> On 06/29/2013 02:58 AM, Henry Jen wrote:
>> Hi,
>>
>> Please review the webrev that add concat static method to Stream and
>> primitive Streams.
>>
>> http://cr.openjdk.java.net/~henryjen/ccc/8015315.0/webrev/
>>
>> Cheers,
>> Henry
>
> Hi Henry,
> I find the the cast to Spliterator in Streams.concat() dubious,
> I can not see how it can be correct, could you explain why this cast is Ok.
>
As Peter pointed out, it's convariant like Iterator, so it is a safe cast.
The public API had correct signature, as the internal implementation,
looks like we just have to push the cast around as we work out the
Spliterator type system with primitives. Thus current implementation
seems to be just fine.
Cheers,
Henry
From vincent.x.ryan at oracle.com Wed Jul 3 21:38:21 2013
From: vincent.x.ryan at oracle.com (vincent.x.ryan at oracle.com)
Date: Wed, 03 Jul 2013 21:38:21 +0000
Subject: hg: jdk8/tl/jdk: 2 new changesets
Message-ID: <20130703213902.CE2F048792@hg.openjdk.java.net>
Changeset: e594ee7a7c2f
Author: vinnie
Date: 2013-07-02 16:38 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e594ee7a7c2f
7165807: Non optimized initialization of NSS crypto library leads to scalability issues
Reviewed-by: mullan, valeriep
! make/sun/security/pkcs11/mapfile-vers
! makefiles/mapfiles/libj2pkcs11/mapfile-vers
! src/share/classes/sun/security/pkcs11/Config.java
! src/share/classes/sun/security/pkcs11/Secmod.java
! src/share/classes/sun/security/pkcs11/SunPKCS11.java
! src/share/native/sun/security/pkcs11/j2secmod.c
! src/solaris/native/sun/security/pkcs11/j2secmod_md.h
! src/windows/native/sun/security/pkcs11/j2secmod_md.h
Changeset: cbee2e595600
Author: vinnie
Date: 2013-07-03 14:35 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/cbee2e595600
Merge
From joe.darcy at oracle.com Wed Jul 3 21:42:32 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Wed, 03 Jul 2013 21:42:32 +0000
Subject: hg: jdk8/tl/jdk: 8019857: Fix doclint errors in java.util.Format*
Message-ID: <20130703214302.B967148793@hg.openjdk.java.net>
Changeset: a49208237599
Author: bpb
Date: 2013-07-03 13:30 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a49208237599
8019857: Fix doclint errors in java.util.Format*
Summary: Fix doclint errors in java.util.Format*.
Reviewed-by: darcy
Contributed-by: Brian Burkhalter
! src/share/classes/java/util/Formattable.java
! src/share/classes/java/util/Formatter.java
From brian.burkhalter at oracle.com Wed Jul 3 22:21:16 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 15:21:16 -0700
Subject: Java 8 RFR: 8019862: Fix doclint errors in java.lang.*.
Message-ID:
Reviewers:
For this issue
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019862 (should be public "soon").
here is the proposed update
http://cr.openjdk.java.net/~bpb/8019862/
Thanks,
Brian
From brian.burkhalter at oracle.com Wed Jul 3 22:24:08 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 15:24:08 -0700
Subject: Java 8 RFR: 8019862: Fix doclint errors in java.lang.*.
In-Reply-To:
References:
Message-ID: <25768AED-CE21-4618-95D6-BFC8E1AC72BA@oracle.com>
Oops - hold off on this one pending a correction.
Thanks,
Brian
On Jul 3, 2013, at 3:21 PM, Brian Burkhalter wrote:
> Reviewers:
>
> For this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019862 (should be public "soon").
>
> here is the proposed update
>
> http://cr.openjdk.java.net/~bpb/8019862/
>
> Thanks,
>
> Brian
From jeremymanson at google.com Wed Jul 3 22:32:10 2013
From: jeremymanson at google.com (Jeremy Manson)
Date: Wed, 3 Jul 2013 15:32:10 -0700
Subject: RFR - Changes to address CCC 8014135: Support for statically
linked agents
In-Reply-To: <51D494E9.2020200@oracle.com>
References: <51D494E9.2020200@oracle.com>
Message-ID:
I know that this is mentioned in the JEP, but does it really make sense to
have -agentpath work here, rather than just -agentlib? I would think that
specifying a full pathname and getting the library loaded out of the
launcher would be a little surprising to people who are basically saying
"please load this agent from the given path".
Also, in practice, we do something very similar at Google, and, when
testing, I find it occasionally useful to be able to say "please load this
agent on the command line via the agentpath I gave you, rather than loading
the one with the same name I baked into the launcher".
(FWIW, when we did this internally at Google, we added a special -XX flag
for when the agent is in the launcher. I know that you don't want to go
that way, though.)
On Wed, Jul 3, 2013 at 2:17 PM, BILL PITTORE wrote:
> These changes address bug 8014135 which adds support for statically linked
> agents in the VM. This is a followup to the recent JNI spec changes that
> addressed statically linked JNI libraries( 8005716).
> The JEP for this change is the same JEP as the JNI changes:
> http://openjdk.java.net/jeps/**178
>
> Webrevs are here:
>
> http://cr.openjdk.java.net/~**bpittore/8014135/jdk/webrev.**00/
> http://cr.openjdk.java.net/~**bpittore/8014135/hotspot/**webrev.00/
>
> The changes to jvmti.xml can also be seen in the output file that I placed
> here:
> http://cr.openjdk.java.net/~**bpittore/8014135/hotspot/**
> webrev.00/jvmti.html
>
> Thanks,
> bill
>
>
>
From henry.jen at oracle.com Wed Jul 3 22:51:58 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Wed, 03 Jul 2013 15:51:58 -0700
Subject: RFR: 8017141: java.util/stream Spliterators from sequential sources
should not catch OOME
Message-ID: <51D4AB0E.8090501@oracle.com>
Hi,
Please review the webrev at
http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
Cheers,
Henry
From dl at cs.oswego.edu Wed Jul 3 22:55:22 2013
From: dl at cs.oswego.edu (Doug Lea)
Date: Wed, 03 Jul 2013 18:55:22 -0400
Subject: Possible HashMap update
Message-ID: <51D4ABDA.7010801@cs.oswego.edu>
A few weeks ago, in the course of doing a (hopefully-last) reworking of
JDK8 ConcurrentHashMap (CHM) internals based on experience with
preview versions, I noticed that the balanced tree scheme now in place
as a fallback in the case of usages with many keys all with the same
hashCode could also be profitably used in other cases: CHM (like
HashMap) previously performed some bit-scrambling of user hashCodes to
make it less likely that user hashCodes that were non-identical but
highly-non-random will collide in the same bins (thus with O(n) vs the
expected O(1) performance). This bit-scrambling is an
anti-optimization in many usages that do not contain the kinds of
systematic hashCode bias that most hurt performance. While it is
reasonably fast, it still places computation where you do not
want it: in front of the likely cache-miss to access an entry. Plus,
bit-scrambling is only statistically likely to help. It is still
possible to encounter hashCodes that systematically collide. It would
be nice to provide O(log N) guarantees for these cases as well.
So, CHM now omits bit-scrambling (well, almost -- just a single xor to
avoid losing impact of top bits), and instead rolls over into using
trees for bins that contain a statistically unlikely number of keys,
and rolling back into simple bin form if/when they don't due to
deletions or resizings. ("Statistically unlikely" is a surprisingly
low number. More than 8 nodes are expected only about once per ten
million under perfectly random keys; this is also often (depending on
cost of equals() methods, additional dispatch overhead, etc), around
the break-even point for using trees vs lists). The updated tree
mechanics now provide O(log N) worst-case performance in either of two
cases: (colliding non-identical-hashCodes), and (identical hashCodes
but mutually Comparable keys). And does so while also speeding up by a
little those typical usages that do not encounter systematic
collisions. Also, there is no sense at all in using any form of
hashSeed in this scheme. It basically behaves the same whether or not
you use one.
The overall impact appears to be a net win. Non-heavily-colliding
cases are a bit faster. Some colliding cases are a little slower and
use more memory (tree-based nodes are bigger than plain ones), but
have much better worst (and typical) case bounds unless people use
crazily-bad keys that all have same hashCodes but are never equal or
comparable to others, in which case treeification is wasted effort
(but only by a constant factor of about 2 in both time and space).
This seemed to be enough of an improvement in terms of both worst-case
and expected performance to try applying it to TreeBin-enabled
HashMap. So I gave it a try. To enable bidirectional tree<->plain node
conversion, I used the subclassing strategy mentioned during
discussion of the initial balanced tree version. This in turn requires
a completely different within-package internal API to allow
LinkedHashMap to continue to subclass HashMap. A couple of internal
constructions exist solely to allow the same source code to be
identical in HashMap and ConcurrenHashMap (but not the same compiled
code, since the types they operate on are and must be unrelated in the
two classes, and because they live in different packages, there's no
nice way to express their commonalities without exposing.)
This note serves as a pre-proposal request for comment, as well a
request for anyone interested in trying it out, especially in any
weird/unusual use cases, to report experiences before seriously
considering it as a replacement. To simplify logistics, I checked in the
code in a workspace directory in jsr166:
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/HashMap.java?view=log
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/LinkedHashMap.java?view=log
From brian.burkhalter at oracle.com Wed Jul 3 23:40:50 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 16:40:50 -0700
Subject: Java 8 RFR: 8019862: Fix doclint errors in java.lang.*.
In-Reply-To:
References:
Message-ID: <5C5155DE-D703-47E4-950D-D01EDD6B1055@oracle.com>
OK, this is ready to go now.
This error
src/share/classes/java/lang/ThreadLocal.java:139: warning: no @param for
public static ThreadLocal withInitial(Supplier extends T> supplier) {
^
Note: src/share/classes/java/lang/Boolean.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
is still reported but I don't see the problem so perhaps it's a bug in the doclint option?
Brian
On Jul 3, 2013, at 3:21 PM, Brian Burkhalter wrote:
> Reviewers:
>
> For this issue
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019862 (should be public "soon").
>
> here is the proposed update
>
> http://cr.openjdk.java.net/~bpb/8019862/
>
> Thanks,
>
> Brian
From eric.mccorkle at oracle.com Wed Jul 3 23:47:43 2013
From: eric.mccorkle at oracle.com (eric.mccorkle at oracle.com)
Date: Wed, 03 Jul 2013 23:47:43 +0000
Subject: hg: jdk8/tl/jdk: 8016285: Add
java.lang.reflect.Parameter.isNamePresent()
Message-ID: <20130703234807.76FD2487A5@hg.openjdk.java.net>
Changeset: a8f51c3341a5
Author: emc
Date: 2013-07-03 19:47 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a8f51c3341a5
8016285: Add java.lang.reflect.Parameter.isNamePresent()
Summary: Add isNamePresent method to parameter reflection library, which indicates whether or real parameter data is available
Reviewed-by: darcy
! src/share/classes/java/lang/reflect/Executable.java
! src/share/classes/java/lang/reflect/Parameter.java
! test/java/lang/reflect/Parameter/WithParameters.java
! test/java/lang/reflect/Parameter/WithoutParameters.java
From joe.darcy at oracle.com Wed Jul 3 23:59:53 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Wed, 03 Jul 2013 16:59:53 -0700
Subject: Java 8 RFR: 8019862: Fix doclint errors in java.lang.*.
In-Reply-To: <5C5155DE-D703-47E4-950D-D01EDD6B1055@oracle.com>
References:
<5C5155DE-D703-47E4-950D-D01EDD6B1055@oracle.com>
Message-ID: <51D4BAF9.60701@oracle.com>
On 07/03/2013 04:40 PM, Brian Burkhalter wrote:
> OK, this is ready to go now.
>
> This error
>
> src/share/classes/java/lang/ThreadLocal.java:139: warning: no @param for
> public static ThreadLocal withInitial(Supplier extends T> supplier) {
> ^
> Note: src/share/classes/java/lang/Boolean.java uses unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 1 warning
>
> is still reported but I don't see the problem so perhaps it's a bug in the doclint option?
I believe the doclint option is correct, the T in that method is *not*
the T in the class declaration; it is a local type variable on the
method. Therefore, this change would resolve the warning:
diff -r a49208237599 src/share/classes/java/lang/ThreadLocal.java
--- a/src/share/classes/java/lang/ThreadLocal.java Wed Jul 03
13:30:46 2013 -0700
+++ b/src/share/classes/java/lang/ThreadLocal.java Wed Jul 03
16:57:54 2013 -0700
@@ -131,12 +131,13 @@
* Creates a thread local variable. The initial value of the
variable is
* determined by invoking the {@code get} method on the {@code
Supplier}.
*
+ * @param the type of the thread local's value
* @param supplier the supplier to be used to determine the
initial value
* @return a new thread local variable
* @throws NullPointerException if the specified supplier is null
* @since 1.8
*/
- public static ThreadLocal withInitial(Supplier extends T>
supplier) {
+ public static ThreadLocal withInitial(Supplier extends S>
supplier) {
return new SuppliedThreadLocal<>(supplier);
}
as would
diff -r a49208237599 src/share/classes/java/lang/ThreadLocal.java
--- a/src/share/classes/java/lang/ThreadLocal.java Wed Jul 03
13:30:46 2013 -0700
+++ b/src/share/classes/java/lang/ThreadLocal.java Wed Jul 03
16:58:38 2013 -0700
@@ -131,6 +131,7 @@
* Creates a thread local variable. The initial value of the
variable is
* determined by invoking the {@code get} method on the {@code
Supplier}.
*
+ * @param the type of the thread local's value
* @param supplier the supplier to be used to determine the
initial value
* @return a new thread local variable
* @throws NullPointerException if the specified supplier is null
However, I would recommend the first of these.
Otherwise, the change looks good to go back.
-Joe
>
> Brian
>
> On Jul 3, 2013, at 3:21 PM, Brian Burkhalter wrote:
>
>> Reviewers:
>>
>> For this issue
>>
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019862 (should be public "soon").
>>
>> here is the proposed update
>>
>> http://cr.openjdk.java.net/~bpb/8019862/
>>
>> Thanks,
>>
>> Brian
From brian.burkhalter at oracle.com Thu Jul 4 00:12:40 2013
From: brian.burkhalter at oracle.com (Brian Burkhalter)
Date: Wed, 3 Jul 2013 17:12:40 -0700
Subject: Java 8 RFR: 8019862: Fix doclint errors in java.lang.*.
In-Reply-To: <51D4BAF9.60701@oracle.com>
References:
<5C5155DE-D703-47E4-950D-D01EDD6B1055@oracle.com>
<51D4BAF9.60701@oracle.com>
Message-ID: <38115316-8334-49E6-8431-62A92A316E00@oracle.com>
All right, I update the patch at the same location with the first of the proposed corrections.
Thanks,
Brian
On Jul 3, 2013, at 4:59 PM, Joe Darcy wrote:
> However, I would recommend the first of these.
>
> Otherwise, the change looks good to go back.
>
> -Joe
>
>>
>> Brian
>>
>> On Jul 3, 2013, at 3:21 PM, Brian Burkhalter wrote:
>>
>>> Reviewers:
>>>
>>> For this issue
>>>
>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019862 (should be public "soon").
>>>
>>> here is the proposed update
>>>
>>> http://cr.openjdk.java.net/~bpb/8019862/
From joe.darcy at oracle.com Thu Jul 4 00:20:39 2013
From: joe.darcy at oracle.com (joe.darcy at oracle.com)
Date: Thu, 04 Jul 2013 00:20:39 +0000
Subject: hg: jdk8/tl/jdk: 8019862: Fix doclint errors in java.lang.*.
Message-ID: <20130704002121.C1D9D487A6@hg.openjdk.java.net>
Changeset: 043b2eb76b0e
Author: bpb
Date: 2013-07-03 17:08 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/043b2eb76b0e
8019862: Fix doclint errors in java.lang.*.
Summary: Fix doclint errors in java.lang.*
Reviewed-by: darcy
Contributed-by: Brian Burkhalter
! src/share/classes/java/lang/CharSequence.java
! src/share/classes/java/lang/Character.java
! src/share/classes/java/lang/ClassLoader.java
! src/share/classes/java/lang/Double.java
! src/share/classes/java/lang/Float.java
! src/share/classes/java/lang/ProcessBuilder.java
! src/share/classes/java/lang/Runtime.java
! src/share/classes/java/lang/Thread.java
! src/share/classes/java/lang/ThreadLocal.java
From iris.clark at oracle.com Thu Jul 4 03:32:51 2013
From: iris.clark at oracle.com (Iris Clark)
Date: Wed, 3 Jul 2013 20:32:51 -0700 (PDT)
Subject: Java 8 RFR 8019857: Fix doclint errors in java.util.Format*
In-Reply-To: <9A7DE880-5213-4B31-8E7F-00C65C245C19@oracle.com>
References: <9A7DE880-5213-4B31-8E7F-00C65C245C19@oracle.com>
Message-ID: <4d9df7c1-5267-497e-93d2-fe58d6f15c48@default>
Looks good to me.
iris
-----Original Message-----
From: Brian Burkhalter
Sent: Wednesday, July 03, 2013 1:02 PM
To: Java Core Libs
Subject: Java 8 RFR 8019857: Fix doclint errors in java.util.Format*
Reviewers:
For this issue
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019857 (should be public "soon").
here is the proposed update
http://cr.openjdk.java.net/~bpb/8019857/
Note that the diff starting at line 2593 is to correct a warning, not an error, and would require a CCC request (I think).
Thanks,
Brian
From paul.sandoz at oracle.com Thu Jul 4 07:01:04 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Thu, 4 Jul 2013 09:01:04 +0200
Subject: RFR: 8017141: java.util/stream Spliterators from sequential
sources should not catch OOME
In-Reply-To: <51D4AB0E.8090501@oracle.com>
References: <51D4AB0E.8090501@oracle.com>
Message-ID:
On Jul 4, 2013, at 12:51 AM, Henry Jen wrote:
> Hi,
>
> Please review the webrev at
>
> http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
>
Note that the same change has already been fixed/pushed forrelevant implementations in j.u.c.
This change in part of a wider change to fix rampant resource usage in some scenarios (other impl changes will follow from lambda to tl later on).
Paul.
From henry.jen at oracle.com Thu Jul 4 07:31:33 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Thu, 04 Jul 2013 00:31:33 -0700
Subject: RFR (2nd): 8015315: Stream.concat methods
Message-ID: <51D524D5.4030404@oracle.com>
Hi,
I updated the test, and split the ConcatTest.java so we don't encounter
the ClassNotFoundException issue on test-ng.
Please review the webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8015315.1/webrev/
Cheers,
Henry
From paul.sandoz at oracle.com Thu Jul 4 07:46:39 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Thu, 4 Jul 2013 09:46:39 +0200
Subject: RFR (2nd): 8015315: Stream.concat methods
In-Reply-To: <51D524D5.4030404@oracle.com>
References: <51D524D5.4030404@oracle.com>
Message-ID:
On Jul 4, 2013, at 9:31 AM, Henry Jen wrote:
> Hi,
>
> I updated the test, and split the ConcatTest.java so we don't encounter
> the ClassNotFoundException issue on test-ng.
>
> Please review the webrev at
>
> http://cr.openjdk.java.net/~henryjen/ccc/8015315.1/webrev/
>
Looks good. I would like to get this in quickly as it will unblock the F/J patch and others. I can push this for you.
Peter's keen observation on Spliterator characteristics can be addressed as a separate issue.
I think the remarks on extends T> should be also be treated as a separate discussion as it has wider implications.
Paul.
From huizhe.wang at oracle.com Thu Jul 4 09:11:22 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Thu, 04 Jul 2013 02:11:22 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D1DE7D.3030105@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
Message-ID: <51D53C3A.6000708@oracle.com>
On 7/1/2013 12:54 PM, Alan Bateman wrote:
> On 01/07/2013 19:33, huizhe wang wrote:
>> :
>>
>> I've updated the jaxp 1.5 tests. I'll send a separate link since it's
>> internal. Indeed, I missed a couple of scenarios: 1) FSP can be set
>> after jaxp 1.5 properties are set through the API; 2) Validator does
>> not require, but does support FSP.
> Given the number of parsers involved, the various ways to set
> properties, the FSP hammer, security manager, ... then it's really
> important that there is a good set of tests that exercise all the
> combinations. So I encourage you to put in as much effort as it
> required to get a good set of tests. It would be great to get them
> into OpenJDK too, if that is possible.
Daniel has helped adding many tests. The 1st one of the two scenarios
above are tested. It appeared that the properties set through the
factory or parser are always taken into account the last, therefore take
preference in consistence with the spec. We still have the 2nd scenario
to test. But here's the latest webrev:
http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
It also uses the SourceVersion Joe suggested to determine the version of
the JDK.
-Joe
>
>>>
>>> I think isJDKandAbove has the assume the long standing format for
>>> java.version. If someone really did change the format to what you
>>> are suggesting then the code would fail with a value such as "7.40".
>>
>> The code does support both the current and possible new format by
>> comparing the 0 element, e.g. Integer.parseInt(versions[0]) >=
>> compareTo. But I see Joe's comment provided a better way to handle
>> this.
>>
> Okay, I'll wait for the second webrev to see how this looks.
>
> -Alan.
>
>
From vicente.romero at oracle.com Thu Jul 4 09:36:38 2013
From: vicente.romero at oracle.com (vicente.romero at oracle.com)
Date: Thu, 04 Jul 2013 09:36:38 +0000
Subject: hg: jdk8/tl/langtools: 8009924: some langtools tools do not accept
-cp as an alias for -classpath
Message-ID: <20130704093643.35F32487C1@hg.openjdk.java.net>
Changeset: d6158f8d7235
Author: vromero
Date: 2013-07-04 10:35 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/d6158f8d7235
8009924: some langtools tools do not accept -cp as an alias for -classpath
Reviewed-by: jjg
! src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
! src/share/classes/com/sun/tools/doclint/DocLint.java
! src/share/classes/com/sun/tools/doclint/resources/doclint.properties
! src/share/classes/com/sun/tools/javadoc/ToolOption.java
! src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
! src/share/classes/com/sun/tools/javah/JavahTask.java
! src/share/classes/com/sun/tools/javah/resources/l10n.properties
! src/share/classes/com/sun/tools/javap/JavapTask.java
! src/share/classes/com/sun/tools/javap/resources/javap.properties
! test/tools/doclint/tool/HelpTest.out
From vicente.romero at oracle.com Thu Jul 4 09:43:43 2013
From: vicente.romero at oracle.com (vicente.romero at oracle.com)
Date: Thu, 04 Jul 2013 09:43:43 +0000
Subject: hg: jdk8/tl/langtools: 6356530: -Xlint:serial does not flag abstract
classes with concrete methods/members
Message-ID: <20130704094348.55780487C2@hg.openjdk.java.net>
Changeset: 79c3146e417b
Author: vromero
Date: 2013-07-04 10:41 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/79c3146e417b
6356530: -Xlint:serial does not flag abstract classes with concrete methods/members
Reviewed-by: mcimadamore
! src/share/classes/com/sun/tools/javac/code/Scope.java
! src/share/classes/com/sun/tools/javac/comp/Attr.java
+ test/tools/javac/T6356530/SerializableAbstractClassWithNonAbstractMethodsTest.java
+ test/tools/javac/T6356530/SerializableAbstractClassWithNonAbstractMethodsTest.out
From serguei.spitsyn at oracle.com Thu Jul 4 10:25:29 2013
From: serguei.spitsyn at oracle.com (serguei.spitsyn at oracle.com)
Date: Thu, 04 Jul 2013 03:25:29 -0700
Subject: RFR - Changes to address CCC 8014135: Support for statically
linked agents
In-Reply-To: <51D494E9.2020200@oracle.com>
References: <51D494E9.2020200@oracle.com>
Message-ID: <51D54D99.8090103@oracle.com>
Hi Bill,
I've already had a chance to read your webrev several weeks ago, but
need more time.
Thanks,
Serguei
On 7/3/13 2:17 PM, BILL PITTORE wrote:
> These changes address bug 8014135 which adds support for statically
> linked agents in the VM. This is a followup to the recent JNI spec
> changes that addressed statically linked JNI libraries( 8005716).
> The JEP for this change is the same JEP as the JNI changes:
> http://openjdk.java.net/jeps/178
>
> Webrevs are here:
>
> http://cr.openjdk.java.net/~bpittore/8014135/jdk/webrev.00/
> http://cr.openjdk.java.net/~bpittore/8014135/hotspot/webrev.00/
>
> The changes to jvmti.xml can also be seen in the output file that I
> placed here:
> http://cr.openjdk.java.net/~bpittore/8014135/hotspot/webrev.00/jvmti.html
>
> Thanks,
> bill
>
>
From Alan.Bateman at oracle.com Thu Jul 4 10:28:24 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Thu, 04 Jul 2013 11:28:24 +0100
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D53C3A.6000708@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
<51D53C3A.6000708@oracle.com>
Message-ID: <51D54E48.6060503@oracle.com>
On 04/07/2013 10:11, huizhe wang wrote:
>
> Daniel has helped adding many tests. The 1st one of the two scenarios
> above are tested. It appeared that the properties set through the
> factory or parser are always taken into account the last, therefore
> take preference in consistence with the spec. We still have the 2nd
> scenario to test. But here's the latest webrev:
>
> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>
> It also uses the SourceVersion Joe suggested to determine the version
> of the JDK.
We can't have a dependency on SourceVersion here as it would cause
problems for modules. I assume it will also break the profiles build
because the javax.lang.model API is not in compact1 or compact2. So I
think this need to be reverted to just look at the java.version property
and I would suggest keeping it simple -- ie: assume the long standing
format as that cannot be changed without causing wide-spread breakage.
I skimmed over the rest of the webrev and don't see any other issues.
It's great to hear that Daniel is helping to add tests as that is key to
having confidence with these changes.
-Alan.
From scolebourne at joda.org Thu Jul 4 11:27:38 2013
From: scolebourne at joda.org (Stephen Colebourne)
Date: Thu, 4 Jul 2013 12:27:38 +0100
Subject: Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect
on zero itself ("0.0")
In-Reply-To:
References:
<51D460F3.5070103@oracle.com>
Message-ID:
Just to note that I am supportive of this bug fix (compared to the
previous proposal)
Stephen
On 3 July 2013 19:09, Brian Burkhalter wrote:
> On Jul 3, 2013, at 10:47 AM, Brian Burkhalter wrote:
>
>> I'll update this only to change the one public method and to modify its specification.
>
> I've updated the webrev
>
> http://cr.openjdk.java.net/~bpb/6480539/
>
> and rerun JTREG as well as modifying and resubmitting the CCC request (it had been filed for the previous fix proposal).
>
> Thanks,
>
> Brian
From rob.mckenna at oracle.com Thu Jul 4 13:41:28 2013
From: rob.mckenna at oracle.com (Rob McKenna)
Date: Thu, 04 Jul 2013 14:41:28 +0100
Subject: Request for Review: 5049299: (process) Use posix_spawn, not fork,
on S10 to avoid swap exhaustion
In-Reply-To: <51D2F496.6050400@oracle.com>
References: <50AE98B1.2040200@oracle.com> <50B81A8D.2040403@oracle.com>
<50B82C94.90109@oracle.com> <50D277BE.8060705@oracle.com>
<50D65C3F.2040004@oracle.com> <51D2F496.6050400@oracle.com>
Message-ID: <51D57B88.3050707@oracle.com>
Hi Alan,
I've just uploaded the latest changes which rebase the fix to the
current repo. (required post 8008118) I've also swapped out useFork for
jdk.lang.Process.launchMechanism. (it affords us the flexibility to
enable or disable other mechanisms on the various platforms at a later
date) I have a couple of questions about this:
1) I'm thinking of including a unit test which will run through the
various permutations across each platform making sure we fail when expected.
2) Should we simply ignore the flag on Windows or should we throw the
same error if its provided?
cc'ing Erik for a build review.
http://cr.openjdk.java.net/~robm/5049299/webrev.04/
-Rob
On 02/07/13 16:41, Alan Bateman wrote:
> On 23/12/2012 01:19, Rob McKenna wrote:
>> Hi Martin, thanks a lot for this.
>>
>> I've renamed LINKFLAG to the more appropriate (and common) ARCHFLAG.
>> It seems to pop up all around our source but if build-dev know of a
>> better (or canonical) way of doing it I'll take it!
>>
>> The BUILD_JEXEC differences don't show up in my webrev or hg diff,
>> but I see them in the jdk.patch generated by webrev. I have no idea
>> why this is. (I did use the JEXEC stuff as a template for the
>> JSPAWNHELPER code, but I don't recall altering the JEXEC stuff in any
>> way. It looks like its limited to indentation. Strange.)
>>
>> W.r.t. useFork, I'll discuss this with Alan once he has a spare
>> minute. I believe he may have had some concerns, but I'll let you
>> know how that goes either way.
>>
>> The only __APPLE__ should be to get the call to _NSGetEnviron().
>> Everything else should be bsd.
>>
>> I've put a webrev at:
>>
>> http://cr.openjdk.java.net/~robm/5049299/webrev.03/
>>
>>
>> I hope this addresses the rest of your comments.
>>
>> -Rob
> Rob - this was great work but I don't think we brought it to a
> conclusion. Are you planning to re-base the patch and send out a new
> webrev?
>
> -Alan
From Alan.Bateman at oracle.com Thu Jul 4 13:53:54 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Thu, 04 Jul 2013 14:53:54 +0100
Subject: 8019622: (sl) ServiceLoadet.next incorrect when creation and
usages are in different contexts
In-Reply-To: <51D47D01.80201@oracle.com>
References: <51D44E06.6030204@oracle.com> <51D45053.6030509@univ-mlv.fr>
<51D458E7.7080107@oracle.com> <51D465C3.9080900@univ-mlv.fr>
<51D47D01.80201@oracle.com>
Message-ID: <51D57E72.9090308@oracle.com>
On 03/07/2013 20:35, Alan Bateman wrote:
> :
>
> That should fix it but I worry that this might be a bit brittle and
> maybe there be other code paths that will trigger loading of providers
> when building call sites that result in the same thing. It might be
> safer for now to just use inner classes here.
Mandy and I chatted again about this yesterday and concluded it would be
the safest thing for now to just use inner classes here. It can be
re-visited again later.
-Alan
From ivan.gerasimov at oracle.com Thu Jul 4 14:14:53 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Thu, 04 Jul 2013 18:14:53 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D45B8C.7010109@oracle.com>
References: <51D45B8C.7010109@oracle.com>
Message-ID: <51D5835D.606@oracle.com>
Hello again!
>
> We have a request to improve jtreg test.
> The test had been written to verify fix for memory leak during class
> redefinition.
> The problem is that it always is reported as PASSED even in the
> presence of the leak.
>
> The proposed change is platform specific.
> It allows memory leak detection only on Linux.
> This is because the memory leak was in native code, so there's no easy
> way to detect it from within Java code.
>
> Here's the webrev for JDK8 repository:
> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>
> The surprising thing is that modified test detected the leak with the
> latest JDK8!
> Latest 6 and 7 are fine, so it might be regression in JDK8.
>
> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
> "Memory leak during class redefenition" (not yet available.)
>
As pointed out by Stefan Karlsson, the detected leak may not be related
to the class redefinition and be related to [1] instead.
However the webrev is still relevant, so welcome to review!
[1] http://bugs.sun.com/view_bug.do?bug_id=8003419
> Sincerely yours,
> Ivan Gerasimov
>
>
From alan.bateman at oracle.com Thu Jul 4 13:56:02 2013
From: alan.bateman at oracle.com (alan.bateman at oracle.com)
Date: Thu, 04 Jul 2013 13:56:02 +0000
Subject: hg: jdk8/tl/jdk: 8019622: (sl) ServiceLoader.next incorrect when
creation and usages are in different contexts
Message-ID: <20130704135636.738E3487CA@hg.openjdk.java.net>
Changeset: dd69273a0240
Author: alanb
Date: 2013-07-04 14:38 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/dd69273a0240
8019622: (sl) ServiceLoader.next incorrect when creation and usages are in different contexts
Reviewed-by: mchung, ahgross, forax, psandoz
! src/share/classes/java/util/ServiceLoader.java
From peter.levart at gmail.com Thu Jul 4 14:40:27 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Thu, 04 Jul 2013 16:40:27 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51D43A72.8090508@oracle.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
Message-ID: <51D5895B.5020006@gmail.com>
Hi Alan, Joel,
Thanks to both for taking time to review the patch.
Here's the 3rd revision:
http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.03/
Answers inline...
On 07/03/2013 04:51 PM, Alan Bateman wrote:
> Sorry for the delay getting back to you on this, I've been busy with
> other things.
Me too.
>
> I'm not an expert on the annotation code but the updated approach to
> break the recursion looks good good to me (and a clever approach).
> Joel has been on vacation but he told me that he plans to look at this
> too (I'm happy to sponsor it in the mean-time as I think the approach
> is good and we should get this fix in).
>
> There's another usage of AnnotationParser.parseAnnotation in
> TypeAnnotationParser that will need to be updated (I only noticed it
> when I grabbed your patch to try it).
I rather restored the package-private API so that TypeAnnotationParser
doesn't have to be changed. It also makes for less changes in internal
AnnotationParser code.
>
> A minor comment is that the alignment of the parameter declarations
> when they go over multiple lines should probably be fixed up to be
> consistent with the other usages.
I tailored new method to be consistent with the alignment of the other
public method. There are 4 different multi-line-parameter alignments
used in AnnotationParser though. I also renamed new method to
"parseSelectAnnotations" and made it package-private, since it is only
used from the AnnotationType.
>
> Thanks for adding tests. One comment on AnnotationTypeDeadlockTest is
> that the join(500) might not be sufficient on a very busy system (say
> when running tests concurrently) or on a low-end embedded system. So I
> think it would be good to bump this up x10.
Done.
> An alternative would be to not set the daemon status and just let the
> test timeout if there is a deadlock. The spin-waits can consume cycles
> when running tests concurrently but I don't expect it's an issue here.
Right, There can be a substantial delay from Thread.start() to thread
actually executing it's run() method. So I added another synchronization
latch that makes main thread park and wait until both new threads
start-up. Both new threads then spin-wait until main thread wakes up and
resets the AtomicInteger value. Experimenting on my Intel i7 box shows
that one new thread spins about 80x and the other about 3000x before
continuing. This spin-waiting is necessary so that both threads continue
coherently and have a better chance to provoke deadlock.
>
> A typo in the @summary of AnnotationTypeRuntimeAssumptionTest ("si" ->
> "is"). I guess I'd go for slightly shorter lines to make future
> side-by-side reviews easier.
Corrected.
On 07/03/2013 07:09 PM, Joel Borggr?n-Franck wrote:
> Hi Peter,
>
> As Alan said, a big thanks for looking into this.
>
> I have been toying with a slightly different approach to breaking the infinite recursion by pre-construct AnnotationType instances for Retention and Inherited. While cleaner in some places others became uglier. I'm fine with this approach.
I'm interested in your approach. How do you handle construction of
AnnotationType instances for other annotations apart from @Retention and
@Inherited? What if there are two mutually recursive annotations like:
@Retention(RUNTIME)
@AnnB
public @interface AnnA {
}
@Retention(RUNTIME)
@AnnA
public @interface AnnB {
}
How do you construct the AnnotationType instance for any one of the
above annotations and break recursion?
> As Alan said, you need to update the patch with a modification in TypeAnnotationParser. After doing that all java/lang tests in the jdk/test directory passes.
I missed that, yes. I changed the patch so that no changes are needed now.
> Also, can you please explain to me why the update race is safe. I have done the/some research myself but I would like to know which angles you have covered.
Well, one thing is that AnnotationType class is now effectively final,
meaning that all it's state is referenced using final fields. If a
reference to an instance of such class is obtained via data-race, all
it's state is observed consistent by the thread that obtained the
reference. The other thing is racy caching. If two or more threads are
concurrently requesting AnnotationType for the same Class, many of them
might construct and use it's own instance and the one published "latest"
will finally be the one being cached. Since all such AnnotationType
instances are constructed from the same input data, they are equivalent
and it doesn't matter which one is used by which thread.
There is a caveat though. What if class is redefined? That's a separate
issue and will have to be resolved in a separate patch. I'm planing to
prepare a patch after this one gets through. The patch will remove
contention from caching of annotations and may also take care of
AnnotationType caching at the same time.
Regards, Peter
> Given that and that you fix Alan's comments I think this is good to go.
>
> Thanks again!
>
> cheers
> /Joel
>
From fweimer at redhat.com Thu Jul 4 14:44:16 2013
From: fweimer at redhat.com (Florian Weimer)
Date: Thu, 04 Jul 2013 16:44:16 +0200
Subject: Prevent privilege escalation through AccessController.doPrivileged()
Message-ID: <51D58A40.8080501@redhat.com>
Is there a way to prevent future calls to
AccessController.doPrivileged() from the same thread from actually
increasing privilege?
I'm specifically concerned about code whose calls would otherwise
succeed because the containing class has the required permissions.
Reducing these privileges with a separate class loader seems to be the
official way to achieve that. Is there a way to get there without
defining and installing your own (global) security manager.
It would be a nice feature if we could easily run code with reduced
privileges.
--
Florian Weimer / Red Hat Product Security Team
From daniel.daugherty at oracle.com Thu Jul 4 15:34:05 2013
From: daniel.daugherty at oracle.com (Daniel D. Daugherty)
Date: Thu, 04 Jul 2013 09:34:05 -0600
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D45B8C.7010109@oracle.com>
References: <51D45B8C.7010109@oracle.com>
Message-ID: <51D595ED.7050902@oracle.com>
On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
> Hello everybody!
>
> We have a request to improve jtreg test.
> The test had been written to verify fix for memory leak during class
> redefinition.
> The problem is that it always is reported as PASSED even in the
> presence of the leak.
>
> The proposed change is platform specific.
> It allows memory leak detection only on Linux.
> This is because the memory leak was in native code, so there's no easy
> way to detect it from within Java code.
>
> Here's the webrev for JDK8 repository:
> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
Very nicely done! The logic in RedefineBigClass.sh only catches a
leak big enough to cause an Exception to be thrown.
When I originally wrote this test and its companion:
test/java/lang/instrument/RetransformBigClass*
I could not come up with a platform independent way to put a small
upper limit on memory growth. It never dawned on me that putting in
something on one platform (Linux) was better than nothing.
Are you planning to add this same logic to RetransformBigClass*?
test/java/lang/instrument/RedefineBigClass.sh
No comments.
test/java/lang/instrument/RedefineBigClassApp.java
line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
Would be better at the top of RedefineBigClassApp rather than
"buried" down here.
line 51: Long.valueOf(vmMemDelta)
There are several places where a long is passed to Long.valueOf().
Is there some reason you're not passing them directly to println()?
line 54: } else {
The "else" is redundant due to the "System.exit(1)" call above it.
You can drop the "else {" and "}" and shift that last println() to
the left.
line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
How about at least a comment referring to the Linux proc(5)
man page... and the fact that the 23rd field is:
vsize %lu Virtual memory size in bytes.
Again, very nicely done!
Dan
>
> The surprising thing is that modified test detected the leak with the
> latest JDK8!
> Latest 6 and 7 are fine, so it might be regression in JDK8.
>
> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
> "Memory leak during class redefenition" (not yet available.)
>
> Sincerely yours,
> Ivan Gerasimov
>
>
>
From Alan.Bateman at oracle.com Thu Jul 4 16:41:49 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Thu, 04 Jul 2013 17:41:49 +0100
Subject: RFR - Changes to address CCC 8014135: Support for statically
linked agents
In-Reply-To: <51D494E9.2020200@oracle.com>
References: <51D494E9.2020200@oracle.com>
Message-ID: <51D5A5CD.2070805@oracle.com>
On 03/07/2013 22:17, BILL PITTORE wrote:
> These changes address bug 8014135 which adds support for statically
> linked agents in the VM. This is a followup to the recent JNI spec
> changes that addressed statically linked JNI libraries( 8005716).
> The JEP for this change is the same JEP as the JNI changes:
> http://openjdk.java.net/jeps/178
>
> Webrevs are here:
>
> http://cr.openjdk.java.net/~bpittore/8014135/jdk/webrev.00/
I looked at the javadoc updates to the attach API.
One thing that doesn't come across very clearly is the mapping from the
agentLibrary parameter to "agent-lib-name". I think that needs a few
words so that it's clear that it is not literally looking for
"Agent_OnAttach_agent-lib-name" but rather "Agent_OnAttach" +
where is the library name in the
agentLibrary parameter.
As I recall, the JVM Tool Interface is supposed to be referred so as
"JVM TI" rather than "JVMTI".
Otherwise it looks okay to me.
-Alan
From tom.hawtin at oracle.com Thu Jul 4 17:04:36 2013
From: tom.hawtin at oracle.com (Tom Hawtin)
Date: Thu, 04 Jul 2013 18:04:36 +0100
Subject: Prevent privilege escalation through
AccessController.doPrivileged()
In-Reply-To: <51D58A40.8080501@redhat.com>
References: <51D58A40.8080501@redhat.com>
Message-ID: <51D5AB24.1000901@oracle.com>
On 04/07/2013 15:44, Florian Weimer wrote:
> Is there a way to prevent future calls to
> AccessController.doPrivileged() from the same thread from actually
> increasing privilege?
No. If the code has the relevant permissions it can call doPrivileged
together with the 1.0/1.1 legacy and new caller-sensitive methods. If
doPrivileged were blocked, things like class loading would break. And
wouldn't work for untrusted code as it could find some other thread to
run on (because of all the global state hanging around).
> Reducing these privileges with a separate class loader seems to be the
> official way to achieve that. Is there a way to get there without
> defining and installing your own (global) security manager.
Close.
ProtectionDomain is the way to assign permission to code (optionally,
since 1.4, through Policy). Typically you would need also to use a
separate class loader if instead of attempting "least privilege" you
really didn't trust the code (see, for instance, the "mixed-code fix"
which uses a pair of class loader for a single applet context). You
shouldn't need to use a custom security manager.
Tom
From ivan.gerasimov at oracle.com Thu Jul 4 17:19:50 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Thu, 04 Jul 2013 21:19:50 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D595ED.7050902@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
Message-ID: <51D5AEB6.3060608@oracle.com>
Daniel, thank you for review!
Here's the updated with all all your suggestions adopted.
http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
I haven't yet considered applying the approach to RetransformBigClass.
Do you want me to include this into this same change set or should I
make it separately?
Sincerely yours,
Ivan
On 04.07.2013 19:34, Daniel D. Daugherty wrote:
> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>> Hello everybody!
>>
>> We have a request to improve jtreg test.
>> The test had been written to verify fix for memory leak during class
>> redefinition.
>> The problem is that it always is reported as PASSED even in the
>> presence of the leak.
>>
>> The proposed change is platform specific.
>> It allows memory leak detection only on Linux.
>> This is because the memory leak was in native code, so there's no
>> easy way to detect it from within Java code.
>>
>> Here's the webrev for JDK8 repository:
>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>
> Very nicely done! The logic in RedefineBigClass.sh only catches a
> leak big enough to cause an Exception to be thrown.
>
> When I originally wrote this test and its companion:
>
> test/java/lang/instrument/RetransformBigClass*
>
> I could not come up with a platform independent way to put a small
> upper limit on memory growth. It never dawned on me that putting in
> something on one platform (Linux) was better than nothing.
>
> Are you planning to add this same logic to RetransformBigClass*?
>
>
>
> test/java/lang/instrument/RedefineBigClass.sh
> No comments.
>
> test/java/lang/instrument/RedefineBigClassApp.java
> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
> Would be better at the top of RedefineBigClassApp rather than
> "buried" down here.
>
> line 51: Long.valueOf(vmMemDelta)
> There are several places where a long is passed to
> Long.valueOf().
> Is there some reason you're not passing them directly to
> println()?
>
> line 54: } else {
> The "else" is redundant due to the "System.exit(1)" call above
> it.
> You can drop the "else {" and "}" and shift that last
> println() to
> the left.
>
> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
> How about at least a comment referring to the Linux proc(5)
> man page... and the fact that the 23rd field is:
>
> vsize %lu Virtual memory size in bytes.
>
> Again, very nicely done!
>
> Dan
>
>
>>
>> The surprising thing is that modified test detected the leak with the
>> latest JDK8!
>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>
>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>> "Memory leak during class redefenition" (not yet available.)
>>
>> Sincerely yours,
>> Ivan Gerasimov
>>
>>
>>
>
>
>
From joel.franck at oracle.com Thu Jul 4 17:34:02 2013
From: joel.franck at oracle.com (=?iso-8859-1?Q?Joel_Borggr=E9n-Franck?=)
Date: Thu, 4 Jul 2013 19:34:02 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51D5895B.5020006@gmail.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
Message-ID:
Hi Peter,
On 4 jul 2013, at 16:40, Peter Levart wrote:
> Answers inline...
>>
>> There's another usage of AnnotationParser.parseAnnotation in TypeAnnotationParser that will need to be updated (I only noticed it when I grabbed your patch to try it).
>
> I rather restored the package-private API so that TypeAnnotationParser doesn't have to be changed. It also makes for less changes in internal AnnotationParser code.
>
I agree.
>
> I'm interested in your approach. How do you handle construction of AnnotationType instances for other annotations apart from @Retention and @Inherited? What if there are two mutually recursive annotations like:
>
>
> @Retention(RUNTIME)
> @AnnB
> public @interface AnnA {
> }
>
> @Retention(RUNTIME)
> @AnnA
> public @interface AnnB {
> }
>
> How do you construct the AnnotationType instance for any one of the above annotations and break recursion?
>
To be honest, I didn't get that far before it became clear to me that the approach wouldn't be preferable to this one. I needed to break that recursion somehow and that turned out to become something like parseSelectedAnnotations(...) anyway so I just put the idea aside.
>> Also, can you please explain to me why the update race is safe. I have done the/some research myself but I would like to know which angles you have covered.
>
> Well, one thing is that AnnotationType class is now effectively final, meaning that all it's state is referenced using final fields. If a reference to an instance of such class is obtained via data-race, all it's state is observed consistent by the thread that obtained the reference. The other thing is racy caching. If two or more threads are concurrently requesting AnnotationType for the same Class, many of them might construct and use it's own instance and the one published "latest" will finally be the one being cached. Since all such AnnotationType instances are constructed from the same input data, they are equivalent and it doesn't matter which one is used by which thread.
>
Actually they aren't, something have been bugging me and I finally figured it out today. The problem is with default valued elements. Previously all threads have been seeing the same instance of default values but now that will only be guaranteed for Classes, Strings and Integers inside the value cache. While I don't think it is in the spec that annotation default value instances should be == for all threads I don't think it is a race we should introduce. Given this I think you should use some approach to produce a winner that every thread will use (like in the other annotations patch). My gut feeling is that CASing in a result will be better under contention that the current lock solution (while also correct and deadlock free) for a net win.
> There is a caveat though. What if class is redefined? That's a separate issue and will have to be resolved in a separate patch. I'm planing to prepare a patch after this one gets through. The patch will remove contention from caching of annotations and may also take care of AnnotationType caching at the same time.
I can't imagine this solution being more broken that the current situation :) or?
cheers
/Joel
From daniel.daugherty at oracle.com Thu Jul 4 17:45:41 2013
From: daniel.daugherty at oracle.com (Daniel D. Daugherty)
Date: Thu, 04 Jul 2013 11:45:41 -0600
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D5AEB6.3060608@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com>
Message-ID: <51D5B4C5.7060402@oracle.com>
On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
> Daniel, thank you for review!
>
> Here's the updated with all all your suggestions adopted.
> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
Looks good.
>
> I haven't yet considered applying the approach to RetransformBigClass.
> Do you want me to include this into this same change set or should I
> make it separately?
I would include it in the same changeset.
Dan
>
> Sincerely yours,
> Ivan
>
>
> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>> Hello everybody!
>>>
>>> We have a request to improve jtreg test.
>>> The test had been written to verify fix for memory leak during class
>>> redefinition.
>>> The problem is that it always is reported as PASSED even in the
>>> presence of the leak.
>>>
>>> The proposed change is platform specific.
>>> It allows memory leak detection only on Linux.
>>> This is because the memory leak was in native code, so there's no
>>> easy way to detect it from within Java code.
>>>
>>> Here's the webrev for JDK8 repository:
>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>
>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>> leak big enough to cause an Exception to be thrown.
>>
>> When I originally wrote this test and its companion:
>>
>> test/java/lang/instrument/RetransformBigClass*
>>
>> I could not come up with a platform independent way to put a small
>> upper limit on memory growth. It never dawned on me that putting in
>> something on one platform (Linux) was better than nothing.
>>
>> Are you planning to add this same logic to RetransformBigClass*?
>>
>>
>>
>> test/java/lang/instrument/RedefineBigClass.sh
>> No comments.
>>
>> test/java/lang/instrument/RedefineBigClassApp.java
>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>> Would be better at the top of RedefineBigClassApp rather than
>> "buried" down here.
>>
>> line 51: Long.valueOf(vmMemDelta)
>> There are several places where a long is passed to
>> Long.valueOf().
>> Is there some reason you're not passing them directly to
>> println()?
>>
>> line 54: } else {
>> The "else" is redundant due to the "System.exit(1)" call
>> above it.
>> You can drop the "else {" and "}" and shift that last
>> println() to
>> the left.
>>
>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>> How about at least a comment referring to the Linux proc(5)
>> man page... and the fact that the 23rd field is:
>>
>> vsize %lu Virtual memory size in bytes.
>>
>> Again, very nicely done!
>>
>> Dan
>>
>>
>>>
>>> The surprising thing is that modified test detected the leak with
>>> the latest JDK8!
>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>
>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>> "Memory leak during class redefenition" (not yet available.)
>>>
>>> Sincerely yours,
>>> Ivan Gerasimov
>>>
>>>
>>>
>>
>>
>>
>
From peter.levart at gmail.com Thu Jul 4 17:46:16 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Thu, 04 Jul 2013 19:46:16 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To:
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
Message-ID: <51D5B4E8.6070807@gmail.com>
On 07/04/2013 07:34 PM, Joel Borggr?n-Franck wrote:
>>> >>Also, can you please explain to me why the update race is safe. I have done the/some research myself but I would like to know which angles you have covered.
>> >
>> >Well, one thing is that AnnotationType class is now effectively final, meaning that all it's state is referenced using final fields. If a reference to an instance of such class is obtained via data-race, all it's state is observed consistent by the thread that obtained the reference. The other thing is racy caching. If two or more threads are concurrently requesting AnnotationType for the same Class, many of them might construct and use it's own instance and the one published "latest" will finally be the one being cached. Since all such AnnotationType instances are constructed from the same input data, they are equivalent and it doesn't matter which one is used by which thread.
>> >
> Actually they aren't, something have been bugging me and I finally figured it out today. The problem is with default valued elements. Previously all threads have been seeing the same instance of default values but now that will only be guaranteed for Classes, Strings and Integers inside the value cache. While I don't think it is in the spec that annotation default value instances should be == for all threads I don't think it is a race we should introduce. Given this I think you should use some approach to produce a winner that every thread will use (like in the other annotations patch). My gut feeling is that CASing in a result will be better under contention that the current lock solution (while also correct and deadlock free) for a net win.
Well Joel, you have a point. I'll introduce volatile read and CAS...
>> >There is a caveat though. What if class is redefined? That's a separate issue and will have to be resolved in a separate patch. I'm planing to prepare a patch after this one gets through. The patch will remove contention from caching of annotations and may also take care of AnnotationType caching at the same time.
> I can't imagine this solution being more broken that the current situation:) or?
No, It is broken more or less to the same extent. If class is redefined,
old AnnotationType remains cached. It's not trivial to fix that. Imagine
all the annotation instances that cache default values taken out of
annotation type at their initialization, etc...
Regards, Peter
> cheers
> /Joel
From Alan.Bateman at oracle.com Thu Jul 4 18:43:50 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Thu, 04 Jul 2013 19:43:50 +0100
Subject: Request for Review: 5049299: (process) Use posix_spawn, not fork,
on S10 to avoid swap exhaustion
In-Reply-To: <51D57B88.3050707@oracle.com>
References: <50AE98B1.2040200@oracle.com> <50B81A8D.2040403@oracle.com>
<50B82C94.90109@oracle.com> <50D277BE.8060705@oracle.com>
<50D65C3F.2040004@oracle.com> <51D2F496.6050400@oracle.com>
<51D57B88.3050707@oracle.com>
Message-ID: <51D5C266.7000807@oracle.com>
On 04/07/2013 14:41, Rob McKenna wrote:
> Hi Alan,
>
> I've just uploaded the latest changes which rebase the fix to the
> current repo.
Thank you (as you know I've been wanting us to move to posix_spawn on
Mac and Solaris for a long time).
> (required post 8008118) I've also swapped out useFork for
> jdk.lang.Process.launchMechanism. (it affords us the flexibility to
> enable or disable other mechanisms on the various platforms at a later
> date)
The property name is good and given the potential for land mines then
it's good to have a means to switch back. In time of course then maybe
some of the old code can be removed. Personally I would go for the lower
cases values. One idea is that as LaunchMechanism is platform specific
then you could just get it to define the constants that it supports and
then use valueOf on the property value to to do lookup.
> I have a couple of questions about this:
>
> 1) I'm thinking of including a unit test which will run through the
> various permutations across each platform making sure we fail when
> expected.
That would be good, it could call Martin's Basic test as that exercises
this code very well.
>
> 2) Should we simply ignore the flag on Windows or should we throw the
> same error if its provided?
I think it should be fine to ignore it, the property is meaningless on
Windows at this time.
>
> cc'ing Erik for a build review.
>
> http://cr.openjdk.java.net/~robm/5049299/webrev.04/
I haven't done a detailed review yet but from a quick glance then you
have cleaned up several things since the last round. Also, from what I
can see then the trampoline (jspawnhelper) goes into the lib directory
on Mac and lib/ on Solaris which seems right (or at least
consistent for those platforms).
-Alan.
From Alan.Bateman at oracle.com Thu Jul 4 19:06:04 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Thu, 04 Jul 2013 20:06:04 +0100
Subject: RFR (2nd): 8017231: Add StringJoiner.merge
In-Reply-To:
References: <51D47F7E.4080600@oracle.com> <51D48B32.6020508@oracle.com>
Message-ID: <51D5C79C.2040606@oracle.com>
On 03/07/2013 22:10, Henry Jen wrote:
> Yes, when I looked at it, there are other places as well. But I decided to leave those alone as for delimiter/prefix/suffix, 'supplied' seems to be fine and consistent.
>
> add() is perhaps a good change. I updated the webrev with this simple change, then I'll need a sponsor to push for me.
>
Okay, I can push this for you. There isn't a change-set linked from the
webrev so I'll take the patch file and attribution line from the webrev.
-Alan.
From alan.bateman at oracle.com Thu Jul 4 19:07:10 2013
From: alan.bateman at oracle.com (alan.bateman at oracle.com)
Date: Thu, 04 Jul 2013 19:07:10 +0000
Subject: hg: jdk8/tl/jdk: 8017231: Add StringJoiner.merge
Message-ID: <20130704190737.15232487DD@hg.openjdk.java.net>
Changeset: aa9fefb5d9c4
Author: alanb
Date: 2013-07-04 20:00 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/aa9fefb5d9c4
8017231: Add StringJoiner.merge
Reviewed-by: psandoz, alanb
Contributed-by: brian.goetz at oracle.com, henry.jen at oracle.com
! src/share/classes/java/util/StringJoiner.java
+ test/java/util/StringJoiner/MergeTest.java
! test/java/util/StringJoiner/StringJoinerTest.java
From huizhe.wang at oracle.com Thu Jul 4 20:25:39 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Thu, 04 Jul 2013 13:25:39 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D54E48.6060503@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
<51D53C3A.6000708@oracle.com> <51D54E48.6060503@oracle.com>
Message-ID: <51D5DA43.3050404@oracle.com>
On 7/4/2013 3:28 AM, Alan Bateman wrote:
> On 04/07/2013 10:11, huizhe wang wrote:
>>
>> Daniel has helped adding many tests. The 1st one of the two scenarios
>> above are tested. It appeared that the properties set through the
>> factory or parser are always taken into account the last, therefore
>> take preference in consistence with the spec. We still have the 2nd
>> scenario to test. But here's the latest webrev:
>>
>> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>>
>> It also uses the SourceVersion Joe suggested to determine the version
>> of the JDK.
>
> We can't have a dependency on SourceVersion here as it would cause
> problems for modules. I assume it will also break the profiles build
> because the javax.lang.model API is not in compact1 or compact2. So I
> think this need to be reverted to just look at the java.version
> property and I would suggest keeping it simple -- ie: assume the long
> standing format as that cannot be changed without causing wide-spread
> breakage.
Reverted back to the original code:
http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
The code split the version number and look at the 1st or 2nd element, it
thus works for both the current format and the proposed one, e.g. for
1.7.0, it compares with the 2nd element, and for the proposed
MAJOR.MINOR.FU.*, the 1st or MAJOR.
>
> I skimmed over the rest of the webrev and don't see any other issues.
> It's great to hear that Daniel is helping to add tests as that is key
> to having confidence with these changes.
The last scenario to work on is if FSP is set on the Validator instead
of SchemaFactory. With that, I'm looking at refactoring the way
properties are represented so that they carry state. It would then be
cleaner to pass them from SchemaFactory over to Schema and then
Validator. It's a bit of work. Fortunately, we only have three of them
to deal with.
-Joe
>
> -Alan.
>
From david.holmes at oracle.com Thu Jul 4 23:22:37 2013
From: david.holmes at oracle.com (David Holmes)
Date: Fri, 05 Jul 2013 09:22:37 +1000
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51D27F05.5020201@gmail.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
Message-ID: <51D603BD.9050708@oracle.com>
Hi Peter,
On 2/07/2013 5:19 PM, Peter Levart wrote:
> Looking at original code once again, I think this was actually a bug.
> The WeakReference instance constructed in (old) line 82, can be GCed
> right away, since nobody is using the local variable after assignment.
Of course. Doh! I was to busy thinking about the lifetime of the
referent object to consider the reference itself.
> If WeakReference is GCed it can not be enqueued. The promotion of local
> variable into a field is one way to fix this. The other would be to use
> the local variable somewhere down the code path, like for example in a
> final throw statement:
>
> 110 throw new IllegalStateException("Reference Handler thread
> stuck. weakRef.get(): " + weakRef.get());
>
>
> This would also reveal some more info about the WeakReference when
> there's no sure answer after 10 seconds and could be added to the test
> anyway.
Okay I've modified the test as suggested. Updated webrev at same location:
http://cr.openjdk.java.net/~dholmes/8016341/webrev/
In testing it though I simply exposed the remaining flaws in the
ReferenceHandler code. We can still kill the ReferenceHandler thread
with an OOME when it tries to load the Cleaner class (running with a 5M
heap triggers this nicely if you use G1):
// Fast path for cleaners
if (r instanceof Cleaner) {
((Cleaner)r).clean();
continue;
}
and if that passes the clean() might throw OOME (it internally tries to
do a System.exit if an exception occurs but will likely encounter
another OOME trying to create the PrivilegedAction).
Even the:
ReferenceQueue q = r.queue;
if (q != ReferenceQueue.NULL) q.enqueue(r);
might throw OOME because enqueue() might have to load the FinalReference
class.
So really catching the OOME around the wait() only patches a small hole.
We can't simply put a try/catch in the for(;;) loop because that doesn't
address the problem that if the class loading throws OOME then
subsequent attempts to load that class will also fail. We would have to
preload all possible classes. Even then we might just send the
ReferenceHandler thread into a busy loop of throwing OOME catching it
and retrying!
So I can fix the test to deal with the Xcomp issue but we may still see
intermittent failures, and the ReferenceHandler thread may still die
from OOME.
David
-----
>
> Regards, Peter
>
> On 07/02/2013 06:38 AM, David Holmes wrote:
>> This recently added test was found to fail under some conditions -
>> namely client compiler with -Xcomp. It seems that the use of all local
>> variables enabled the compiler to optimize things in a way that
>> stopped the weakref from being enqueued as expected. Simple fix was to
>> make the weakref a field.
>>
>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>
>> Thanks,
>> David
>
From ivan.gerasimov at oracle.com Fri Jul 5 00:59:18 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Fri, 05 Jul 2013 04:59:18 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D5B4C5.7060402@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
Message-ID: <51D61A66.5010001@oracle.com>
Thank you, Daniel!
Please find an updated webrev at
http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
It now includes the RetransformBigClass test modified in the same way as
RedefineBigClass.
If the changes look fine, may I ask you to sponsor the commit, as I'm
not a committer?
Here's a link to hg export:
http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
Thanks in advance,
Ivan
On 04.07.2013 21:45, Daniel D. Daugherty wrote:
> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>> Daniel, thank you for review!
>>
>> Here's the updated with all all your suggestions adopted.
>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>
> Looks good.
>
>
>>
>> I haven't yet considered applying the approach to RetransformBigClass.
>> Do you want me to include this into this same change set or should I
>> make it separately?
>
> I would include it in the same changeset.
>
> Dan
>
>
>>
>> Sincerely yours,
>> Ivan
>>
>>
>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>> Hello everybody!
>>>>
>>>> We have a request to improve jtreg test.
>>>> The test had been written to verify fix for memory leak during
>>>> class redefinition.
>>>> The problem is that it always is reported as PASSED even in the
>>>> presence of the leak.
>>>>
>>>> The proposed change is platform specific.
>>>> It allows memory leak detection only on Linux.
>>>> This is because the memory leak was in native code, so there's no
>>>> easy way to detect it from within Java code.
>>>>
>>>> Here's the webrev for JDK8 repository:
>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>
>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>> leak big enough to cause an Exception to be thrown.
>>>
>>> When I originally wrote this test and its companion:
>>>
>>> test/java/lang/instrument/RetransformBigClass*
>>>
>>> I could not come up with a platform independent way to put a small
>>> upper limit on memory growth. It never dawned on me that putting in
>>> something on one platform (Linux) was better than nothing.
>>>
>>> Are you planning to add this same logic to RetransformBigClass*?
>>>
>>>
>>>
>>> test/java/lang/instrument/RedefineBigClass.sh
>>> No comments.
>>>
>>> test/java/lang/instrument/RedefineBigClassApp.java
>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>> Would be better at the top of RedefineBigClassApp rather than
>>> "buried" down here.
>>>
>>> line 51: Long.valueOf(vmMemDelta)
>>> There are several places where a long is passed to
>>> Long.valueOf().
>>> Is there some reason you're not passing them directly to
>>> println()?
>>>
>>> line 54: } else {
>>> The "else" is redundant due to the "System.exit(1)" call
>>> above it.
>>> You can drop the "else {" and "}" and shift that last
>>> println() to
>>> the left.
>>>
>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>> How about at least a comment referring to the Linux proc(5)
>>> man page... and the fact that the 23rd field is:
>>>
>>> vsize %lu Virtual memory size in bytes.
>>>
>>> Again, very nicely done!
>>>
>>> Dan
>>>
>>>
>>>>
>>>> The surprising thing is that modified test detected the leak with
>>>> the latest JDK8!
>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>
>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>> "Memory leak during class redefenition" (not yet available.)
>>>>
>>>> Sincerely yours,
>>>> Ivan Gerasimov
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>
From luchsh at linux.vnet.ibm.com Fri Jul 5 02:53:29 2013
From: luchsh at linux.vnet.ibm.com (luchsh at linux.vnet.ibm.com)
Date: Fri, 05 Jul 2013 02:53:29 +0000
Subject: hg: jdk8/tl/jdk: 8019381: HashMap.isEmpty is non-final,
potential issues for get/remove
Message-ID: <20130705025350.81E7F487E6@hg.openjdk.java.net>
Changeset: ed111451b77a
Author: zhangshj
Date: 2013-07-05 10:51 +0800
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ed111451b77a
8019381: HashMap.isEmpty is non-final, potential issues for get/remove
Reviewed-by: chegar, mduigou
! src/share/classes/java/util/HashMap.java
+ test/java/util/HashMap/OverrideIsEmpty.java
From luchsh at linux.vnet.ibm.com Fri Jul 5 02:58:06 2013
From: luchsh at linux.vnet.ibm.com (Jonathan Lu)
Date: Fri, 05 Jul 2013 10:58:06 +0800
Subject: RFR: 8019381: HashMap.isEmpty is non-final, potential issues
for get/remove
In-Reply-To: <51D394D4.7090706@linux.vnet.ibm.com>
References: <51CBF181.1020301@linux.vnet.ibm.com>
<51CCAAE5.4010707@univ-mlv.fr> <51CD896D.9030807@oracle.com>
<51CDB453.5010003@linux.vnet.ibm.com> <51D13323.9030601@linux.vnet.ibm.com>
<51D19EAE.2010201@univ-mlv.fr>
<450D0C6E-3BA7-40AD-B415-6659A6FDDA91@oracle.com>
<51D394D4.7090706@linux.vnet.ibm.com>
Message-ID: <51D6363E.6090605@linux.vnet.ibm.com>
On 07/03/2013 11:04 AM, Shi Jun Zhang wrote:
> On 7/1/2013 11:49 PM, Chris Hegarty wrote:
>> On 1 Jul 2013, at 17:22, Remi Forax wrote:
>>
>>> On 07/01/2013 09:43 AM, Shi Jun Zhang wrote:
>>>> On 6/29/2013 12:05 AM, Shi Jun Zhang wrote:
>>>>> On 6/28/2013 9:02 PM, Alan Bateman wrote:
>>>>>> On 27/06/2013 22:13, Remi Forax wrote:
>>>>>>> On 06/27/2013 10:02 AM, Shi Jun Zhang wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> There are some isEmpty() check added into get/remove methods
>>>>>>>> since 8011200 to return directly if HashMap is empty. However
>>>>>>>> isEmpty is a non-final public method which can be overridden by
>>>>>>>> subclass. If the subclass defines isEmpty differently from
>>>>>>>> HashMap, it would cause problem while getting or removing
>>>>>>>> elements.
>>>>>>> yes, it's a bug.
>>>>>>> Could you report it ?
>>>>>>>
>>>>>>> R?mi
>>>>>> I've created a bug to track this:
>>>>>>
>>>>>> 8019381: HashMap.isEmpty is non-final, potential issues for
>>>>>> get/remove
>>>>>>
>>>>>> -Alan
>>>>> Thanks, Alan.
>>>>>
>>>>> I'm quite busy today and do not have time to report it until now.
>>>>> Thanks for your help.
>>>>>
>>>>> I will provide a webrev next Monday for review.
>>>> Hi,
>>>>
>>>> Here is the webrev
>>>>
>>>> http://cr.openjdk.java.net/~zhangshj/8019381/webrev.00/
>>> This looks Ok for me.
>> +1
>>
>> -Chris
>>
>>> R?mi
>>>
> Thanks all for the review.
>
> Jonathan,
>
> Could you help to push the changeset?
>
Hello Chance,
Patch pushed @ http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ed111451b77a,
pls verify.
Cheers!
- Jonathan
From daniel.daugherty at oracle.com Fri Jul 5 04:35:33 2013
From: daniel.daugherty at oracle.com (Daniel D. Daugherty)
Date: Thu, 04 Jul 2013 22:35:33 -0600
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D61A66.5010001@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com>
Message-ID: <51D64D15.2090105@oracle.com>
Ivan,
The changes look fine, I can sponsor your commit, looks like your
OpenJDK user name is 'igerasim', but I need to know a little bit
more about your testing of these fixes. Did you do a test JPRT
job to run the JLI tests (or just the two tests themselves)?
Based on e-mail about this bug fix, I believe you've found a new
leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
That's a good thing, but I think Alan and company would be a bit
grumpy with me if I pushed a test that failed as soon as someone
ran it. :-) Do you know if the revised RetransformBigClass.sh also
finds a new memory leak in JDK8/HSX-25?
The way to deal with that is to put the test on the Problem.list
as part of the same changeset. However, the T&L folks might not like
that either...
Dan
On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
> Thank you, Daniel!
>
> Please find an updated webrev at
> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
> It now includes the RetransformBigClass test modified in the same way
> as RedefineBigClass
> If the changes look fine, may I ask you to sponsor the commit, as I'm
> not a committer?
> Here's a link to hg export:
> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>
>
> Thanks in advance,
> Ivan
>
> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>> Daniel, thank you for review!
>>>
>>> Here's the updated with all all your suggestions adopted.
>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>
>> Looks good.
>>
>>
>>>
>>> I haven't yet considered applying the approach to RetransformBigClass.
>>> Do you want me to include this into this same change set or should I
>>> make it separately?
>>
>> I would include it in the same changeset.
>>
>> Dan
>>
>>
>>>
>>> Sincerely yours,
>>> Ivan
>>>
>>>
>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>> Hello everybody!
>>>>>
>>>>> We have a request to improve jtreg test.
>>>>> The test had been written to verify fix for memory leak during
>>>>> class redefinition.
>>>>> The problem is that it always is reported as PASSED even in the
>>>>> presence of the leak.
>>>>>
>>>>> The proposed change is platform specific.
>>>>> It allows memory leak detection only on Linux.
>>>>> This is because the memory leak was in native code, so there's no
>>>>> easy way to detect it from within Java code.
>>>>>
>>>>> Here's the webrev for JDK8 repository:
>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>
>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>> leak big enough to cause an Exception to be thrown.
>>>>
>>>> When I originally wrote this test and its companion:
>>>>
>>>> test/java/lang/instrument/RetransformBigClass*
>>>>
>>>> I could not come up with a platform independent way to put a small
>>>> upper limit on memory growth. It never dawned on me that putting in
>>>> something on one platform (Linux) was better than nothing.
>>>>
>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>
>>>>
>>>>
>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>> No comments.
>>>>
>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>> Would be better at the top of RedefineBigClassApp rather than
>>>> "buried" down here.
>>>>
>>>> line 51: Long.valueOf(vmMemDelta)
>>>> There are several places where a long is passed to
>>>> Long.valueOf().
>>>> Is there some reason you're not passing them directly to
>>>> println()?
>>>>
>>>> line 54: } else {
>>>> The "else" is redundant due to the "System.exit(1)" call
>>>> above it.
>>>> You can drop the "else {" and "}" and shift that last
>>>> println() to
>>>> the left.
>>>>
>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>> How about at least a comment referring to the Linux proc(5)
>>>> man page... and the fact that the 23rd field is:
>>>>
>>>> vsize %lu Virtual memory size in bytes.
>>>>
>>>> Again, very nicely done!
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>> The surprising thing is that modified test detected the leak with
>>>>> the latest JDK8!
>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>
>>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>>> "Memory leak during class redefenition" (not yet available.)
>>>>>
>>>>> Sincerely yours,
>>>>> Ivan Gerasimov
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
From daniel.daugherty at oracle.com Fri Jul 5 05:37:54 2013
From: daniel.daugherty at oracle.com (Daniel D. Daugherty)
Date: Thu, 04 Jul 2013 23:37:54 -0600
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D64D15.2090105@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
Message-ID: <51D65BB2.90503@oracle.com>
In a JPRT test job I just ran:
RedefineBigClass.sh passed on 9 platforms and failed on Linux 64-bit.
RetransformBigClass.sh passed on all 10 platforms.
Does your own testing only showing failure on the Linux 64-bit VM
and passed on the Linux 32-bit VM?
Dan
On 7/4/13 10:35 PM, Daniel D. Daugherty wrote:
> Ivan,
>
> The changes look fine, I can sponsor your commit, looks like your
> OpenJDK user name is 'igerasim', but I need to know a little bit
> more about your testing of these fixes. Did you do a test JPRT
> job to run the JLI tests (or just the two tests themselves)?
>
> Based on e-mail about this bug fix, I believe you've found a new
> leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
> That's a good thing, but I think Alan and company would be a bit
> grumpy with me if I pushed a test that failed as soon as someone
> ran it. :-) Do you know if the revised RetransformBigClass.sh also
> finds a new memory leak in JDK8/HSX-25?
>
> The way to deal with that is to put the test on the Problem.list
> as part of the same changeset. However, the T&L folks might not like
> that either...
>
> Dan
>
>
> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>> Thank you, Daniel!
>>
>> Please find an updated webrev at
>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>> It now includes the RetransformBigClass test modified in the same way
>> as RedefineBigClass
>> If the changes look fine, may I ask you to sponsor the commit, as I'm
>> not a committer?
>> Here's a link to hg export:
>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>
>>
>> Thanks in advance,
>> Ivan
>>
>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>> Daniel, thank you for review!
>>>>
>>>> Here's the updated with all all your suggestions adopted.
>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>
>>> Looks good.
>>>
>>>
>>>>
>>>> I haven't yet considered applying the approach to RetransformBigClass.
>>>> Do you want me to include this into this same change set or should
>>>> I make it separately?
>>>
>>> I would include it in the same changeset.
>>>
>>> Dan
>>>
>>>
>>>>
>>>> Sincerely yours,
>>>> Ivan
>>>>
>>>>
>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>> Hello everybody!
>>>>>>
>>>>>> We have a request to improve jtreg test.
>>>>>> The test had been written to verify fix for memory leak during
>>>>>> class redefinition.
>>>>>> The problem is that it always is reported as PASSED even in the
>>>>>> presence of the leak.
>>>>>>
>>>>>> The proposed change is platform specific.
>>>>>> It allows memory leak detection only on Linux.
>>>>>> This is because the memory leak was in native code, so there's no
>>>>>> easy way to detect it from within Java code.
>>>>>>
>>>>>> Here's the webrev for JDK8 repository:
>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>
>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>> leak big enough to cause an Exception to be thrown.
>>>>>
>>>>> When I originally wrote this test and its companion:
>>>>>
>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>
>>>>> I could not come up with a platform independent way to put a small
>>>>> upper limit on memory growth. It never dawned on me that putting in
>>>>> something on one platform (Linux) was better than nothing.
>>>>>
>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>
>>>>>
>>>>>
>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>> No comments.
>>>>>
>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>> Would be better at the top of RedefineBigClassApp rather than
>>>>> "buried" down here.
>>>>>
>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>> There are several places where a long is passed to
>>>>> Long.valueOf().
>>>>> Is there some reason you're not passing them directly to
>>>>> println()?
>>>>>
>>>>> line 54: } else {
>>>>> The "else" is redundant due to the "System.exit(1)" call
>>>>> above it.
>>>>> You can drop the "else {" and "}" and shift that last
>>>>> println() to
>>>>> the left.
>>>>>
>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>> How about at least a comment referring to the Linux proc(5)
>>>>> man page... and the fact that the 23rd field is:
>>>>>
>>>>> vsize %lu Virtual memory size in bytes.
>>>>>
>>>>> Again, very nicely done!
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>>
>>>>>> The surprising thing is that modified test detected the leak with
>>>>>> the latest JDK8!
>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>
>>>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>>>> "Memory leak during class redefenition" (not yet available.)
>>>>>>
>>>>>> Sincerely yours,
>>>>>> Ivan Gerasimov
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
From david.holmes at oracle.com Fri Jul 5 05:58:32 2013
From: david.holmes at oracle.com (David Holmes)
Date: Fri, 05 Jul 2013 15:58:32 +1000
Subject: RFR (XS): 8014890 : Reference queues may return more entries
than expected
In-Reply-To: <51D16B98.5010506@oracle.com>
References: <1371589723.2524.43.camel@cirrus> <51D0D0A2.7030307@oracle.com>
<51D134FF.2080802@oracle.com> <1372673139.2769.14.camel@cirrus>
<51D15679.2080407@oracle.com> <51D169E8.70601@oracle.com>
<51D16B98.5010506@oracle.com>
Message-ID: <51D66088.4020102@oracle.com>
On 1/07/2013 9:44 PM, Aleksey Shipilev wrote:
> On 07/01/2013 03:37 PM, David Holmes wrote:
>> On 1/07/2013 8:14 PM, Aleksey Shipilev wrote:
>>> The same "thou shalt not do multiple volatile reads" applies to
>>> "(r.queue == NULL) || (r.queue == ENQUEUED)" now.
>>
>> Doesn't that just reduce to "r.queue != this" ? (The assert suggests
>> so :) )
>
> Thomas' original patch had this in form of "r.queue != this". I argue it
> is more future-proof to distinguish the concrete cases.
Seems dubious to me - depends on what the future change would be. Here
and now it does two comparisons instead of one - which seems a micro
deoptimization.
>>> Also, continuing on the micro-optimization spree, you might want to
>>> use bitwise |, not logical ||, saving a branch.
>>
>> Bit-wise OR? What bits are you ORing ?
>
> You *can* bitwise OR two booleans; which would only remove
> short-circuiting behavior with the benefit of clearing one branch. See
> http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.22.2
How obscure :)
David
> -Aleksey.
>
From david.holmes at oracle.com Fri Jul 5 06:00:25 2013
From: david.holmes at oracle.com (David Holmes)
Date: Fri, 05 Jul 2013 16:00:25 +1000
Subject: RFR (XS): 8014890 : Reference queues may return more entries
than expected
In-Reply-To: <1372679479.2769.44.camel@cirrus>
References: <1371589723.2524.43.camel@cirrus> <51D0D0A2.7030307@oracle.com>
<51D134FF.2080802@oracle.com> <1372673139.2769.14.camel@cirrus>
<51D15679.2080407@oracle.com> <51D169E8.70601@oracle.com>
<51D16B98.5010506@oracle.com> <1372679479.2769.44.camel@cirrus>
Message-ID: <51D660F9.4080207@oracle.com>
This looks fine to me.
Thanks,
David
On 1/07/2013 9:51 PM, Thomas Schatzl wrote:
> Hi all,
>
> On Mon, 2013-07-01 at 15:44 +0400, Aleksey Shipilev wrote:
>> On 07/01/2013 03:37 PM, David Holmes wrote:
>>> On 1/07/2013 8:14 PM, Aleksey Shipilev wrote:
>>>> The same "thou shalt not do multiple volatile reads" applies to
>>>> "(r.queue == NULL) || (r.queue == ENQUEUED)" now.
>>>
>>> Doesn't that just reduce to "r.queue != this" ? (The assert suggests
>>> so :) )
>>
>> Thomas' original patch had this in form of "r.queue != this". I argue it
>> is more future-proof to distinguish the concrete cases.
>
> :)
>
> I also thought it was more understandable if the cases were explicitly
> enumerated, in addition to the assert.
>
> I changed this in
> http://cr.openjdk.java.net/~tschatzl/8014890/webrev.refactor to that
> version now, using a temporary variable that stores r.queue before the
> checks to avoid the double volatile reads.
>
> However for me either version is fine, just tell me what you favor.
>
> I am not really happy about bitwise ORing the two comparison results as
> it seems to reduce readability at no real gain.
>
> Thanks,
> Thomas
>
>
From erik.joelsson at oracle.com Fri Jul 5 07:24:37 2013
From: erik.joelsson at oracle.com (Erik Joelsson)
Date: Fri, 05 Jul 2013 09:24:37 +0200
Subject: Request for Review: 5049299: (process) Use posix_spawn, not fork,
on S10 to avoid swap exhaustion
In-Reply-To: <51D57B88.3050707@oracle.com>
References: <50AE98B1.2040200@oracle.com> <50B81A8D.2040403@oracle.com>
<50B82C94.90109@oracle.com> <50D277BE.8060705@oracle.com>
<50D65C3F.2040004@oracle.com> <51D2F496.6050400@oracle.com>
<51D57B88.3050707@oracle.com>
Message-ID: <51D674B5.7020100@oracle.com>
Build changes are looking pretty good. Just one thing that I would like
to add. Since the executable jspawnhelper is linking in an object file
from libjava, it would be good to declare that dependency. See unpack200
for a similar situation.
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
/Erik
On 2013-07-04 15:41, Rob McKenna wrote:
> Hi Alan,
>
> I've just uploaded the latest changes which rebase the fix to the
> current repo. (required post 8008118) I've also swapped out useFork
> for jdk.lang.Process.launchMechanism. (it affords us the flexibility
> to enable or disable other mechanisms on the various platforms at a
> later date) I have a couple of questions about this:
>
> 1) I'm thinking of including a unit test which will run through the
> various permutations across each platform making sure we fail when
> expected.
>
> 2) Should we simply ignore the flag on Windows or should we throw the
> same error if its provided?
>
> cc'ing Erik for a build review.
>
> http://cr.openjdk.java.net/~robm/5049299/webrev.04/
>
> -Rob
>
>
> On 02/07/13 16:41, Alan Bateman wrote:
>> On 23/12/2012 01:19, Rob McKenna wrote:
>>> Hi Martin, thanks a lot for this.
>>>
>>> I've renamed LINKFLAG to the more appropriate (and common) ARCHFLAG.
>>> It seems to pop up all around our source but if build-dev know of a
>>> better (or canonical) way of doing it I'll take it!
>>>
>>> The BUILD_JEXEC differences don't show up in my webrev or hg diff,
>>> but I see them in the jdk.patch generated by webrev. I have no idea
>>> why this is. (I did use the JEXEC stuff as a template for the
>>> JSPAWNHELPER code, but I don't recall altering the JEXEC stuff in
>>> any way. It looks like its limited to indentation. Strange.)
>>>
>>> W.r.t. useFork, I'll discuss this with Alan once he has a spare
>>> minute. I believe he may have had some concerns, but I'll let you
>>> know how that goes either way.
>>>
>>> The only __APPLE__ should be to get the call to _NSGetEnviron().
>>> Everything else should be bsd.
>>>
>>> I've put a webrev at:
>>>
>>> http://cr.openjdk.java.net/~robm/5049299/webrev.03/
>>>
>>>
>>> I hope this addresses the rest of your comments.
>>>
>>> -Rob
>> Rob - this was great work but I don't think we brought it to a
>> conclusion. Are you planning to re-base the patch and send out a new
>> webrev?
>>
>> -Alan
>
From Alan.Bateman at oracle.com Fri Jul 5 08:32:08 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Fri, 05 Jul 2013 09:32:08 +0100
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D5DA43.3050404@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
<51D53C3A.6000708@oracle.com> <51D54E48.6060503@oracle.com>
<51D5DA43.3050404@oracle.com>
Message-ID: <51D68488.2050108@oracle.com>
On 04/07/2013 21:25, huizhe wang wrote:
>
> Reverted back to the original code:
> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
> The code split the version number and look at the 1st or 2nd element,
> it thus works for both the current format and the proposed one, e.g.
> for 1.7.0, it compares with the 2nd element, and for the proposed
> MAJOR.MINOR.FU.*, the 1st or MAJOR.
Thanks for dropping the dependency on javax.lang.model. What you now is
probably okay although I'm a bit dubious about attempting to support an
alternative format (I'm not aware of any proposal that changes the
format of the java.version property as changing it would like cause a
lot of breakage).
A minor point but isJDKOrAbove looks a bit odd to me, I'd probably go
for something like isJavaVersionGTE or isJavaVersionAtLeast but as it's
not part of the API then it doesn't matter of course.
I think I mentioned it a while back but have warnings emitted with
System.err can be problematic (gets mixed up with application messages
to stderr). I realize the Xerces code seems to do this in places but we
really need to see about eliminating these messages or getting
consistent logging into this code.
> :
>
> The last scenario to work on is if FSP is set on the Validator instead
> of SchemaFactory. With that, I'm looking at refactoring the way
> properties are represented so that they carry state. It would then be
> cleaner to pass them from SchemaFactory over to Schema and then
> Validator. It's a bit of work. Fortunately, we only have three of them
> to deal with.
So are you planning to send another webrev or do it as a separate issue?
-Alan
From peter.levart at gmail.com Fri Jul 5 08:32:09 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Fri, 05 Jul 2013 10:32:09 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To:
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
Message-ID: <51D68489.2020000@gmail.com>
On 07/04/2013 07:34 PM, Joel Borggr?n-Franck wrote:
>>> Also, can you please explain to me why the update race is safe. I have done the/some research myself but I would like to know which angles you have covered.
>> Well, one thing is that AnnotationType class is now effectively final, meaning that all it's state is referenced using final fields. If a reference to an instance of such class is obtained via data-race, all it's state is observed consistent by the thread that obtained the reference. The other thing is racy caching. If two or more threads are concurrently requesting AnnotationType for the same Class, many of them might construct and use it's own instance and the one published "latest" will finally be the one being cached. Since all such AnnotationType instances are constructed from the same input data, they are equivalent and it doesn't matter which one is used by which thread.
>>
> Actually they aren't, something have been bugging me and I finally figured it out today. The problem is with default valued elements. Previously all threads have been seeing the same instance of default values but now that will only be guaranteed for Classes, Strings and Integers inside the value cache. While I don't think it is in the spec that annotation default value instances should be == for all threads I don't think it is a race we should introduce. Given this I think you should use some approach to produce a winner that every thread will use (like in the other annotations patch). My gut feeling is that CASing in a result will be better under contention that the current lock solution (while also correct and deadlock free) for a net win.
>
Hi Joel,
Here's the 4th revision of the patch:
http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.04/
This one introduces CAS-ing of the AnnotationType instance into the
Class.annotationType field so that there's only a single instance ever
returned for a single Class. I also introduced new private static
Class.Atomic nested class that is used to lazily initialize Unsafe
machinery and to provide a safe wrapper for internal j.l.Class use.
Previously this was part of ReflectionData nested class because it was
only used for it's purpose. In anticipation to have a need for more
atomic operations in the future, I moved this code to a separate class.
ReflectionData is now just a record.
Regards, Peter
From paul.sandoz at oracle.com Fri Jul 5 08:42:52 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Fri, 5 Jul 2013 10:42:52 +0200
Subject: RFR 8019484 Sync j.u.c.ConcurrentHashMap from 166 to tl
In-Reply-To: <9055AD19-214B-4136-8F76-56FEC8E2E406@oracle.com>
References: <9055AD19-214B-4136-8F76-56FEC8E2E406@oracle.com>
Message-ID:
A few bugs where found in CHM and fixed. I updated the webrev.
The diff can be viewed here:
http://hg.openjdk.java.net/lambda/lambda/jdk/rev/291a872e1763
Paul.
On Jul 1, 2013, at 2:44 PM, Paul Sandoz wrote:
> Hi,
>
> The following is the final j.u.c patch that syncs CMH classes from 166 j.u.c to tl.
>
> http://cr.openjdk.java.net/~psandoz/tl/JDK-8019484-chm/webrev/
>
> (i am sure there will be more patches to follow as tweaks are made to various areas, but hopefully they will not need so bulky.)
>
> ConcurrentMap.replaceAll in tl was more up to date than that in 166.
>
> Quite tricky to review CHM since there is a fair bit of code shuffling due to:
>
> 480 * This file is organized to make things a little easier to follow
> 481 * while reading than they might otherwise: First the main static
> 482 * declarations and utilities, then fields, then main public
> 483 * methods (with a few factorings of multiple public methods into
> 484 * internal ones), then sizing methods, trees, traversers, and
> 485 * bulk operations.
>
> Paul.
From paul.sandoz at oracle.com Fri Jul 5 08:55:52 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Fri, 5 Jul 2013 10:55:52 +0200
Subject: Possible HashMap update
In-Reply-To: <51D4ABDA.7010801@cs.oswego.edu>
References: <51D4ABDA.7010801@cs.oswego.edu>
Message-ID:
I played with these in the lambda repo.
I needed to make the following additional change for things to compile:
--- a/src/share/classes/java/io/ExpiringCache.java Fri Jul 05 10:04:00 2013 +0200
+++ b/src/share/classes/java/io/ExpiringCache.java Fri Jul 05 10:45:10 2013 +0200
@@ -64,8 +64,8 @@
@SuppressWarnings("serial")
ExpiringCache(long millisUntilExpiration) {
this.millisUntilExpiration = millisUntilExpiration;
- map = new LinkedHashMap() {
- protected boolean removeEldestEntry(Map.Entry eldest) {
+ map = new LinkedHashMap() {
+ protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > MAX_ENTRIES;
}
};
I don't quite know why, need to look in more detail.
Passes the stream tests and selected j.u tests.
The test java/util/Map/CheckRandomHashSeed needs updating, but i presume this test should be removed if similar updates are planed for WeakHashMap and Hashtable:
diff -r 291a872e1763 test/java/util/Map/CheckRandomHashSeed.java
--- a/test/java/util/Map/CheckRandomHashSeed.java Fri Jul 05 10:04:00 2013 +0200
+++ b/test/java/util/Map/CheckRandomHashSeed.java Fri Jul 05 10:53:50 2013 +0200
@@ -53,8 +53,6 @@
throw new Error("Error in test setup: " + (expectRandom ? "" : "not " ) + "expecting random hashSeed, but " + PROP_NAME + " is " + (propSet ? "" : "not ") + "enabled");
}
- testMap(new HashMap());
- testMap(new LinkedHashMap());
testMap(new WeakHashMap());
testMap(new Hashtable());
}
Paul.
On Jul 4, 2013, at 12:55 AM, Doug Lea wrote:
>
> A few weeks ago, in the course of doing a (hopefully-last) reworking of
> JDK8 ConcurrentHashMap (CHM) internals based on experience with
> preview versions, I noticed that the balanced tree scheme now in place
> as a fallback in the case of usages with many keys all with the same
> hashCode could also be profitably used in other cases: CHM (like
> HashMap) previously performed some bit-scrambling of user hashCodes to
> make it less likely that user hashCodes that were non-identical but
> highly-non-random will collide in the same bins (thus with O(n) vs the
> expected O(1) performance). This bit-scrambling is an
> anti-optimization in many usages that do not contain the kinds of
> systematic hashCode bias that most hurt performance. While it is
> reasonably fast, it still places computation where you do not
> want it: in front of the likely cache-miss to access an entry. Plus,
> bit-scrambling is only statistically likely to help. It is still
> possible to encounter hashCodes that systematically collide. It would
> be nice to provide O(log N) guarantees for these cases as well.
>
> So, CHM now omits bit-scrambling (well, almost -- just a single xor to
> avoid losing impact of top bits), and instead rolls over into using
> trees for bins that contain a statistically unlikely number of keys,
> and rolling back into simple bin form if/when they don't due to
> deletions or resizings. ("Statistically unlikely" is a surprisingly
> low number. More than 8 nodes are expected only about once per ten
> million under perfectly random keys; this is also often (depending on
> cost of equals() methods, additional dispatch overhead, etc), around
> the break-even point for using trees vs lists). The updated tree
> mechanics now provide O(log N) worst-case performance in either of two
> cases: (colliding non-identical-hashCodes), and (identical hashCodes
> but mutually Comparable keys). And does so while also speeding up by a
> little those typical usages that do not encounter systematic
> collisions. Also, there is no sense at all in using any form of
> hashSeed in this scheme. It basically behaves the same whether or not
> you use one.
>
> The overall impact appears to be a net win. Non-heavily-colliding
> cases are a bit faster. Some colliding cases are a little slower and
> use more memory (tree-based nodes are bigger than plain ones), but
> have much better worst (and typical) case bounds unless people use
> crazily-bad keys that all have same hashCodes but are never equal or
> comparable to others, in which case treeification is wasted effort
> (but only by a constant factor of about 2 in both time and space).
>
> This seemed to be enough of an improvement in terms of both worst-case
> and expected performance to try applying it to TreeBin-enabled
> HashMap. So I gave it a try. To enable bidirectional tree<->plain node
> conversion, I used the subclassing strategy mentioned during
> discussion of the initial balanced tree version. This in turn requires
> a completely different within-package internal API to allow
> LinkedHashMap to continue to subclass HashMap. A couple of internal
> constructions exist solely to allow the same source code to be
> identical in HashMap and ConcurrenHashMap (but not the same compiled
> code, since the types they operate on are and must be unrelated in the
> two classes, and because they live in different packages, there's no
> nice way to express their commonalities without exposing.)
>
> This note serves as a pre-proposal request for comment, as well a
> request for anyone interested in trying it out, especially in any
> weird/unusual use cases, to report experiences before seriously
> considering it as a replacement. To simplify logistics, I checked in the
> code in a workspace directory in jsr166:
>
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/HashMap.java?view=log
>
> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/LinkedHashMap.java?view=log
From peter.levart at gmail.com Fri Jul 5 09:12:13 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Fri, 05 Jul 2013 11:12:13 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51D68489.2020000@gmail.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
<51D68489.2020000@gmail.com>
Message-ID: <51D68DED.2030308@gmail.com>
Hi Again,
Sorry, the 4th revision I posted is not rebased to the current tip of
jdk8-tl so it contained some diffs that reverted some things.
Here's the correct patch:
http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.05/
Regards, Peter
On 07/05/2013 10:32 AM, Peter Levart wrote:
> Hi Joel,
>
> Here's the 4th revision of the patch:
>
> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.04/
>
> This one introduces CAS-ing of the AnnotationType instance into the
> Class.annotationType field so that there's only a single instance ever
> returned for a single Class. I also introduced new private static
> Class.Atomic nested class that is used to lazily initialize Unsafe
> machinery and to provide a safe wrapper for internal j.l.Class use.
> Previously this was part of ReflectionData nested class because it was
> only used for it's purpose. In anticipation to have a need for more
> atomic operations in the future, I moved this code to a separate
> class. ReflectionData is now just a record.
>
> Regards, Peter
From maurizio.cimadamore at oracle.com Fri Jul 5 10:08:01 2013
From: maurizio.cimadamore at oracle.com (maurizio.cimadamore at oracle.com)
Date: Fri, 05 Jul 2013 10:08:01 +0000
Subject: hg: jdk8/tl/langtools: 5 new changesets
Message-ID: <20130705100822.11A394881A@hg.openjdk.java.net>
Changeset: 7b756b307e12
Author: mcimadamore
Date: 2013-07-05 11:00 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/7b756b307e12
8017618: NullPointerException in RichDiagnosticFormatter for bad input program
Summary: RDF crashes when diagnostic contains type 'void'
Reviewed-by: jjg, vromero
! src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
+ test/tools/javac/lambda/BadNestedLambda.java
+ test/tools/javac/lambda/BadNestedLambda.out
Changeset: 70b37cdb19d5
Author: mcimadamore
Date: 2013-07-05 11:02 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/70b37cdb19d5
8019480: Javac crashes when method is called on a type-variable receiver from lambda expression
Summary: Logic for shortcircuiting speculative attribution doesn't handle type-variable receivers
Reviewed-by: jjg, vromero
! src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
+ test/tools/javac/lambda/8019480/T8019480.java
+ test/tools/javac/lambda/8019480/T8019480.out
Changeset: b0386f0dc28e
Author: mcimadamore
Date: 2013-07-05 11:03 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/b0386f0dc28e
8016059: Cannot compile following lambda
8016060: Lambda isn't compiled with return statement
Summary: Spurious error triggered during unnecessary recovery round
Reviewed-by: jjg, vromero
! src/share/classes/com/sun/tools/javac/code/Type.java
! src/share/classes/com/sun/tools/javac/comp/Attr.java
! src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
+ test/tools/javac/lambda/TargetType75.java
Changeset: bfbedbfc522a
Author: mcimadamore
Date: 2013-07-05 11:04 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/bfbedbfc522a
8016702: use of ternary operator in lambda expression gives incorrect results
Summary: Constant types erroneously creep in during inference
Reviewed-by: jjg, vromero
! src/share/classes/com/sun/tools/javac/comp/Attr.java
+ test/tools/javac/conditional/T8016702.java
Changeset: 42b3c5e92461
Author: mcimadamore
Date: 2013-07-05 11:05 +0100
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/42b3c5e92461
8019824: very long error messages on inference error
Summary: Inference error messages shows several spurious captured variables generated during an inference loop
Reviewed-by: jjg, vromero
! src/share/classes/com/sun/tools/javac/code/Type.java
! src/share/classes/com/sun/tools/javac/comp/Infer.java
+ test/tools/javac/generics/inference/8019824/T8019824.java
+ test/tools/javac/generics/inference/8019824/T8019824.out
From ivan.gerasimov at oracle.com Fri Jul 5 10:18:01 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Fri, 05 Jul 2013 14:18:01 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D65BB2.90503@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
<51D65BB2.90503@oracle.com>
Message-ID: <51D69D59.9020002@oracle.com>
I'm looking at the log of the job you've run:
http://prt-web.us.oracle.com//archive/2013/07/2013-07-05-045326.ddaugher.8016838_exp/logs/linux_x64-product-c2-jdk_lang.log.FAILED.log
And it looks like both tests failed, not only the first one:
FAIL: Virtual memory usage increased by 1411072Kb (greater than 32768Kb)
FAIL: RedefineBigClassApp exited with status of 1
...
FAIL: Virtual memory usage increased by 1411072Kb (greater than 32768Kb)
FAIL: RetransformBigClassApp exited with status of 1
I have these two tests locally on 64-bit Linux and they both fail with similar results in logs.
I may not tell for sure why the tests didn't fail on 32-bit Linux.
Whether it was because the /proc/self/stat approach didn't work or
because the leak is specific to 64-bit platform.
I have tested the RedefineBigClass test on JPRT with JDK6 (the code was
a bit different, but the approach was the same).
The test passed with JDK6u60 and failed (as expected) with JDK6u51 on
both 32 and 64-bit Linux machines.
I'm going to do more testings today.
Sincerely yours,
Ivan
On 05.07.2013 9:37, Daniel D. Daugherty wrote:
> In a JPRT test job I just ran:
>
> RedefineBigClass.sh passed on 9 platforms and failed on Linux 64-bit.
> RetransformBigClass.sh passed on all 10 platforms.
>
> Does your own testing only showing failure on the Linux 64-bit VM
> and passed on the Linux 32-bit VM?
>
> Dan
>
>
>
> On 7/4/13 10:35 PM, Daniel D. Daugherty wrote:
>> Ivan,
>>
>> The changes look fine, I can sponsor your commit, looks like your
>> OpenJDK user name is 'igerasim', but I need to know a little bit
>> more about your testing of these fixes. Did you do a test JPRT
>> job to run the JLI tests (or just the two tests themselves)?
>>
>> Based on e-mail about this bug fix, I believe you've found a new
>> leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
>> That's a good thing, but I think Alan and company would be a bit
>> grumpy with me if I pushed a test that failed as soon as someone
>> ran it. :-) Do you know if the revised RetransformBigClass.sh also
>> finds a new memory leak in JDK8/HSX-25?
>>
>> The way to deal with that is to put the test on the Problem.list
>> as part of the same changeset. However, the T&L folks might not like
>> that either...
>>
>> Dan
>>
>>
>> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>>> Thank you, Daniel!
>>>
>>> Please find an updated webrev at
>>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>>> It now includes the RetransformBigClass test modified in the same
>>> way as RedefineBigClass
>>> If the changes look fine, may I ask you to sponsor the commit, as
>>> I'm not a committer?
>>> Here's a link to hg export:
>>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>>
>>>
>>> Thanks in advance,
>>> Ivan
>>>
>>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>>> Daniel, thank you for review!
>>>>>
>>>>> Here's the updated with all all your suggestions adopted.
>>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>>
>>>> Looks good.
>>>>
>>>>
>>>>>
>>>>> I haven't yet considered applying the approach to
>>>>> RetransformBigClass.
>>>>> Do you want me to include this into this same change set or should
>>>>> I make it separately?
>>>>
>>>> I would include it in the same changeset.
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>> Sincerely yours,
>>>>> Ivan
>>>>>
>>>>>
>>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>>> Hello everybody!
>>>>>>>
>>>>>>> We have a request to improve jtreg test.
>>>>>>> The test had been written to verify fix for memory leak during
>>>>>>> class redefinition.
>>>>>>> The problem is that it always is reported as PASSED even in the
>>>>>>> presence of the leak.
>>>>>>>
>>>>>>> The proposed change is platform specific.
>>>>>>> It allows memory leak detection only on Linux.
>>>>>>> This is because the memory leak was in native code, so there's
>>>>>>> no easy way to detect it from within Java code.
>>>>>>>
>>>>>>> Here's the webrev for JDK8 repository:
>>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>>
>>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>>> leak big enough to cause an Exception to be thrown.
>>>>>>
>>>>>> When I originally wrote this test and its companion:
>>>>>>
>>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>>
>>>>>> I could not come up with a platform independent way to put a small
>>>>>> upper limit on memory growth. It never dawned on me that putting in
>>>>>> something on one platform (Linux) was better than nothing.
>>>>>>
>>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>>
>>>>>>
>>>>>>
>>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>>> No comments.
>>>>>>
>>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>>> Would be better at the top of RedefineBigClassApp rather
>>>>>> than
>>>>>> "buried" down here.
>>>>>>
>>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>>> There are several places where a long is passed to
>>>>>> Long.valueOf().
>>>>>> Is there some reason you're not passing them directly to
>>>>>> println()?
>>>>>>
>>>>>> line 54: } else {
>>>>>> The "else" is redundant due to the "System.exit(1)" call
>>>>>> above it.
>>>>>> You can drop the "else {" and "}" and shift that last
>>>>>> println() to
>>>>>> the left.
>>>>>>
>>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>>> How about at least a comment referring to the Linux proc(5)
>>>>>> man page... and the fact that the 23rd field is:
>>>>>>
>>>>>> vsize %lu Virtual memory size in bytes.
>>>>>>
>>>>>> Again, very nicely done!
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> The surprising thing is that modified test detected the leak
>>>>>>> with the latest JDK8!
>>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>>
>>>>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>>>>> "Memory leak during class redefenition" (not yet available.)
>>>>>>>
>>>>>>> Sincerely yours,
>>>>>>> Ivan Gerasimov
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
From ivan.gerasimov at oracle.com Fri Jul 5 10:53:14 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Fri, 05 Jul 2013 14:53:14 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D64D15.2090105@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
Message-ID: <51D6A59A.1060703@oracle.com>
On 05.07.2013 8:35, Daniel D. Daugherty wrote:
> Ivan,
>
> The changes look fine, I can sponsor your commit, looks like your
> OpenJDK user name is 'igerasim', but I need to know a little bit
> more about your testing of these fixes. Did you do a test JPRT
> job to run the JLI tests (or just the two tests themselves)?
>
I've only run test from java/lang/instrument when checked the change
with JDK6u60 (all passed) and with JDK6u51 (the test failed as expected,
since the leak had still been there.)
> Based on e-mail about this bug fix, I believe you've found a new
> leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
Right. The test shown a memleak with the the latest jdk8.
I filed a bug 8019845 about this leak.
Stefan Karlsson guessed that this may be related to 8003419 (NPG: Clean
up metadata created during class loading if failure)
Then I've checked the builds b57 (test failed) and b58 (test passed), so
I confirmed that it may be the reason of the leak being observed now.
But now I think that the reason may be different.
It just turns out that the test shows failures for (at least) three
different leaks - the one you, Daniel, solved (7121600), the one Stefan
wrote about (8003419) and the one currently observed (8019845).
> That's a good thing, but I think Alan and company would be a bit
> grumpy with me if I pushed a test that failed as soon as someone
> ran it. :-) Do you know if the revised RetransformBigClass.sh also
> finds a new memory leak in JDK8/HSX-25?
>
> The way to deal with that is to put the test on the Problem.list
> as part of the same changeset. However, the T&L folks might not like
> that either...
Well, the leak is there, and why not have a failing test as a reminder
to have it fixed?
Sincerely yours,
Ivan Gerasimov
>
> Dan
>
>
> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>> Thank you, Daniel!
>>
>> Please find an updated webrev at
>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>> It now includes the RetransformBigClass test modified in the same way
>> as RedefineBigClass
>> If the changes look fine, may I ask you to sponsor the commit, as I'm
>> not a committer?
>> Here's a link to hg export:
>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>
>>
>> Thanks in advance,
>> Ivan
>>
>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>> Daniel, thank you for review!
>>>>
>>>> Here's the updated with all all your suggestions adopted.
>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>
>>> Looks good.
>>>
>>>
>>>>
>>>> I haven't yet considered applying the approach to RetransformBigClass.
>>>> Do you want me to include this into this same change set or should
>>>> I make it separately?
>>>
>>> I would include it in the same changeset.
>>>
>>> Dan
>>>
>>>
>>>>
>>>> Sincerely yours,
>>>> Ivan
>>>>
>>>>
>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>> Hello everybody!
>>>>>>
>>>>>> We have a request to improve jtreg test.
>>>>>> The test had been written to verify fix for memory leak during
>>>>>> class redefinition.
>>>>>> The problem is that it always is reported as PASSED even in the
>>>>>> presence of the leak.
>>>>>>
>>>>>> The proposed change is platform specific.
>>>>>> It allows memory leak detection only on Linux.
>>>>>> This is because the memory leak was in native code, so there's no
>>>>>> easy way to detect it from within Java code.
>>>>>>
>>>>>> Here's the webrev for JDK8 repository:
>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>
>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>> leak big enough to cause an Exception to be thrown.
>>>>>
>>>>> When I originally wrote this test and its companion:
>>>>>
>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>
>>>>> I could not come up with a platform independent way to put a small
>>>>> upper limit on memory growth. It never dawned on me that putting in
>>>>> something on one platform (Linux) was better than nothing.
>>>>>
>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>
>>>>>
>>>>>
>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>> No comments.
>>>>>
>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>> Would be better at the top of RedefineBigClassApp rather than
>>>>> "buried" down here.
>>>>>
>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>> There are several places where a long is passed to
>>>>> Long.valueOf().
>>>>> Is there some reason you're not passing them directly to
>>>>> println()?
>>>>>
>>>>> line 54: } else {
>>>>> The "else" is redundant due to the "System.exit(1)" call
>>>>> above it.
>>>>> You can drop the "else {" and "}" and shift that last
>>>>> println() to
>>>>> the left.
>>>>>
>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>> How about at least a comment referring to the Linux proc(5)
>>>>> man page... and the fact that the 23rd field is:
>>>>>
>>>>> vsize %lu Virtual memory size in bytes.
>>>>>
>>>>> Again, very nicely done!
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>>
>>>>>> The surprising thing is that modified test detected the leak with
>>>>>> the latest JDK8!
>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>
>>>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>>>> "Memory leak during class redefenition" (not yet available.)
>>>>>>
>>>>>> Sincerely yours,
>>>>>> Ivan Gerasimov
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
From sean.coffey at oracle.com Fri Jul 5 11:45:49 2013
From: sean.coffey at oracle.com (=?UTF-8?B?U2XDoW4gQ29mZmV5?=)
Date: Fri, 05 Jul 2013 12:45:49 +0100
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D6A59A.1060703@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
<51D6A59A.1060703@oracle.com>
Message-ID: <51D6B1ED.9090709@oracle.com>
Nice work indeed Ivan. Good to have a reliable testcase to catch leaks
in this area.
I'd also suggest that this test goes on the ProblemList until the new
leak is sorted out for jdk8. The goal of JPRT runs is to have clean
runs. If it's on the problemList, then it's a known issue and is
normally tagged with the relevant bug ID so that the responsible
engineer knows the current state.
regards,
Sean.
On 05/07/2013 11:53, Ivan Gerasimov wrote:
>
> On 05.07.2013 8:35, Daniel D. Daugherty wrote:
>> Ivan,
>>
>> The changes look fine, I can sponsor your commit, looks like your
>> OpenJDK user name is 'igerasim', but I need to know a little bit
>> more about your testing of these fixes. Did you do a test JPRT
>> job to run the JLI tests (or just the two tests themselves)?
>>
> I've only run test from java/lang/instrument when checked the change
> with JDK6u60 (all passed) and with JDK6u51 (the test failed as
> expected, since the leak had still been there.)
>
>> Based on e-mail about this bug fix, I believe you've found a new
>> leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
> Right. The test shown a memleak with the the latest jdk8.
> I filed a bug 8019845 about this leak.
> Stefan Karlsson guessed that this may be related to 8003419 (NPG:
> Clean up metadata created during class loading if failure)
> Then I've checked the builds b57 (test failed) and b58 (test passed),
> so I confirmed that it may be the reason of the leak being observed now.
> But now I think that the reason may be different.
> It just turns out that the test shows failures for (at least) three
> different leaks - the one you, Daniel, solved (7121600), the one
> Stefan wrote about (8003419) and the one currently observed (8019845).
>
>> That's a good thing, but I think Alan and company would be a bit
>> grumpy with me if I pushed a test that failed as soon as someone
>> ran it. :-) Do you know if the revised RetransformBigClass.sh also
>> finds a new memory leak in JDK8/HSX-25?
>>
>> The way to deal with that is to put the test on the Problem.list
>> as part of the same changeset. However, the T&L folks might not like
>> that either...
>
> Well, the leak is there, and why not have a failing test as a reminder
> to have it fixed?
>
> Sincerely yours,
> Ivan Gerasimov
>
>>
>> Dan
>>
>>
>> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>>> Thank you, Daniel!
>>>
>>> Please find an updated webrev at
>>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>>> It now includes the RetransformBigClass test modified in the same
>>> way as RedefineBigClass
>>> If the changes look fine, may I ask you to sponsor the commit, as
>>> I'm not a committer?
>>> Here's a link to hg export:
>>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>>
>>>
>>> Thanks in advance,
>>> Ivan
>>>
>>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>>> Daniel, thank you for review!
>>>>>
>>>>> Here's the updated with all all your suggestions adopted.
>>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>>
>>>> Looks good.
>>>>
>>>>
>>>>>
>>>>> I haven't yet considered applying the approach to
>>>>> RetransformBigClass.
>>>>> Do you want me to include this into this same change set or should
>>>>> I make it separately?
>>>>
>>>> I would include it in the same changeset.
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>> Sincerely yours,
>>>>> Ivan
>>>>>
>>>>>
>>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>>> Hello everybody!
>>>>>>>
>>>>>>> We have a request to improve jtreg test.
>>>>>>> The test had been written to verify fix for memory leak during
>>>>>>> class redefinition.
>>>>>>> The problem is that it always is reported as PASSED even in the
>>>>>>> presence of the leak.
>>>>>>>
>>>>>>> The proposed change is platform specific.
>>>>>>> It allows memory leak detection only on Linux.
>>>>>>> This is because the memory leak was in native code, so there's
>>>>>>> no easy way to detect it from within Java code.
>>>>>>>
>>>>>>> Here's the webrev for JDK8 repository:
>>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>>
>>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>>> leak big enough to cause an Exception to be thrown.
>>>>>>
>>>>>> When I originally wrote this test and its companion:
>>>>>>
>>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>>
>>>>>> I could not come up with a platform independent way to put a small
>>>>>> upper limit on memory growth. It never dawned on me that putting in
>>>>>> something on one platform (Linux) was better than nothing.
>>>>>>
>>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>>
>>>>>>
>>>>>>
>>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>>> No comments.
>>>>>>
>>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>>> Would be better at the top of RedefineBigClassApp rather
>>>>>> than
>>>>>> "buried" down here.
>>>>>>
>>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>>> There are several places where a long is passed to
>>>>>> Long.valueOf().
>>>>>> Is there some reason you're not passing them directly to
>>>>>> println()?
>>>>>>
>>>>>> line 54: } else {
>>>>>> The "else" is redundant due to the "System.exit(1)" call
>>>>>> above it.
>>>>>> You can drop the "else {" and "}" and shift that last
>>>>>> println() to
>>>>>> the left.
>>>>>>
>>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>>> How about at least a comment referring to the Linux proc(5)
>>>>>> man page... and the fact that the 23rd field is:
>>>>>>
>>>>>> vsize %lu Virtual memory size in bytes.
>>>>>>
>>>>>> Again, very nicely done!
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> The surprising thing is that modified test detected the leak
>>>>>>> with the latest JDK8!
>>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>>
>>>>>>> I've filled a bug http://bugs.sun.com/view_bug.do?bug_id=8019845
>>>>>>> "Memory leak during class redefenition" (not yet available.)
>>>>>>>
>>>>>>> Sincerely yours,
>>>>>>> Ivan Gerasimov
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
From dmytro_sheyko at hotmail.com Fri Jul 5 11:48:27 2013
From: dmytro_sheyko at hotmail.com (Dmytro Sheyko)
Date: Fri, 5 Jul 2013 14:48:27 +0300
Subject: patch: 6646588 : OutputStream.write() IndexOutOfBoundsException
condition could be simplified
Message-ID:
Hello,
I would like propose a patch for bug #6646588
OutputStream.write() IndexOutOfBoundsException condition could be simplified
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6646588
1. Range check logic is moved from various streams/readers/writers to IndexOutOfBoundsException.
I.e. I replaced code like this
??? if ((off < 0) || (off> b.length) || (len < 0) ||
??????????? ((off + len)> b.length) || ((off + len) < 0)) {
??????? throw new IndexOutOfBoundsException();
??? }
with following
??? IndexOutOfBoundsException.checkBounds(b, off, len);
2. Additionally in several places I replaced
??? if (b == null) {
??????? throw new NullPointerException()
??? }
with
??? Objects.requireNotNull(b);
Note that for method InflaterOutputStream.write() I changed NPE message from "Null buffer for read" to more correct (in my opinion) "Null buffer for write". It seems that this message with surrounding code was just copy-pasted from DeflaterInputStream.read().
3. In PushbackReader I removed
??? } catch (ArrayIndexOfBoundsException e) {
??????? throw new IndexOfBoundsException();
??? }
I believe this catch is unnecessary because (a) range is already checked above and System.arraycopy should not fail and (b) ArrayIndexOfBoundsException is subclass of IndexOfBoundsException, so even if AIOBE happens there is nothing wrong to let it go farther.
Thus many trivial changes are made in following packages:
java.io.*
java.util.zip.*
sun.**
jtreg test for IndexOutOfBoundsException.checkBounds(...) is also attached.
Please review.
Regards,
Dmytro
From joel.franck at oracle.com Fri Jul 5 14:04:48 2013
From: joel.franck at oracle.com (=?iso-8859-1?Q?Joel_Borggr=E9n-Franck?=)
Date: Fri, 5 Jul 2013 16:04:48 +0200
Subject: 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To: <51D68DED.2030308@gmail.com>
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
<51D68489.2020000@gmail.com> <51D68DED.2030308@gmail.com>
Message-ID:
Hi Peter,
Thanks for the quick update!
While I have looked over the changes to j.l.Class and the cas in AnnotationType I don't think I'm qualified to review that. (FWIW it looked fine to me but my jmm isn't swapped in at the moment so I won't pretend to know the interactions between volatile and Unsafe cas). Thinking out loud I suppose we can assume a stable offset of fields in Class, and I realize that part has been under review before.
The rest of AnnotationType, AnnotationParser and the tests look fine though. I also ran the tests before and after the change and results were as expected.
Since I'm not a Reviewer kind of reviewer you need to get one those to sign off but after that I think you are good to go. I can sponsor this as well if Alan is busy.
cheers
/Joel
On 5 jul 2013, at 11:12, Peter Levart wrote:
> Hi Again,
>
> Sorry, the 4th revision I posted is not rebased to the current tip of jdk8-tl so it contained some diffs that reverted some things.
>
> Here's the correct patch:
>
> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.05/
>
>
> Regards, Peter
>
>
> On 07/05/2013 10:32 AM, Peter Levart wrote:
>> Hi Joel,
>>
>> Here's the 4th revision of the patch:
>>
>> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.04/
>>
>> This one introduces CAS-ing of the AnnotationType instance into the Class.annotationType field so that there's only a single instance ever returned for a single Class. I also introduced new private static Class.Atomic nested class that is used to lazily initialize Unsafe machinery and to provide a safe wrapper for internal j.l.Class use. Previously this was part of ReflectionData nested class because it was only used for it's purpose. In anticipation to have a need for more atomic operations in the future, I moved this code to a separate class. ReflectionData is now just a record.
>>
>> Regards, Peter
>
From erik.helin at oracle.com Fri Jul 5 14:08:05 2013
From: erik.helin at oracle.com (Erik Helin)
Date: Fri, 5 Jul 2013 16:08:05 +0200
Subject: RFR: 8010734: NPG: The test MemoryTest.java needs to be updated
to support metaspace
In-Reply-To: <20130701153520.GF2213@ehelin-thinkpad>
References: <20130701153520.GF2213@ehelin-thinkpad>
Message-ID: <20130705140805.GC14318@ehelin-thinkpad>
Hi all,
still looking for a review for this testfix. Looping in
hotspot-gc-dev at openjdk.java.net as well.
Thanks,
Erik
On 2013-07-01, Erik Helin wrote:
> Hi all,
>
> this change updates MemoryTest.java to take the newly added Metaspace
> and Compressed Class Space MemoryMXBeans into account, as well as the
> new Metaspace Memory Manager.
>
> This change also removes the following two tests from ProblemList.txt
> since they are now passing again:
> -java/lang/management/MemoryMXBean/MemoryTestAllGC.sh generic-all
> -java/lang/management/MemoryMXBean/MemoryTest.java generic-all
>
> Webrev: http://cr.openjdk.java.net/~ehelin/8010734/webrev.00/
>
> Thanks,
> Erik
From Alan.Bateman at oracle.com Fri Jul 5 14:27:36 2013
From: Alan.Bateman at oracle.com (Alan Bateman)
Date: Fri, 05 Jul 2013 15:27:36 +0100
Subject: RFR: 8010734: NPG: The test MemoryTest.java needs to be updated
to support metaspace
In-Reply-To: <20130705140805.GC14318@ehelin-thinkpad>
References: <20130701153520.GF2213@ehelin-thinkpad>
<20130705140805.GC14318@ehelin-thinkpad>
Message-ID: <51D6D7D8.5080809@oracle.com>
On 05/07/2013 15:08, Erik Helin wrote:
> Hi all,
>
> still looking for a review for this testfix. Looping in
> hotspot-gc-dev at openjdk.java.net as well.
>
It looks like okay to me and the comments make it clear the memory pools
that it expects.
-Alan
From paul.sandoz at oracle.com Fri Jul 5 16:10:15 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Fri, 5 Jul 2013 18:10:15 +0200
Subject: RFR 8017447 Unmodifiable map entry becomes modifiable if taken from a
stream of map entries
Message-ID: <06D6490B-CD68-433D-9348-041BB3C8D903@oracle.com>
Hi,
Please review a patch that fixes traversal of unmodifiable map entry set where entries could be set:
http://cr.openjdk.java.net/~psandoz/tl/JDK-8017447-unmod-map/webrev/jdk.patch
This covers forEach, spliterator (splitting, tryAdvance, forEachRemaining), iterator forEachRemaining, stream/parallelStream forEach with instances of Map and SortedMap.
Note that there are other changes which will follow later on to Collections that update implementations with stream/parallelStream methods
Paul.
From sean.mullan at oracle.com Fri Jul 5 21:16:21 2013
From: sean.mullan at oracle.com (sean.mullan at oracle.com)
Date: Fri, 05 Jul 2013 21:16:21 +0000
Subject: hg: jdk8/tl/jdk: 2 new changesets
Message-ID: <20130705211658.8363648850@hg.openjdk.java.net>
Changeset: 028ef97797c1
Author: mullan
Date: 2013-07-05 15:54 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/028ef97797c1
8011547: Update XML Signature implementation to Apache Santuario 1.5.4
Reviewed-by: xuelei
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/Algorithm.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java
! src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/CanonicalizationException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/CanonicalizerSpi.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/helper/C14nHelper.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerPhysical.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.java
! src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/UtfHelpper.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/encryption/AbstractSerializer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/AgreementMethod.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/CipherData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/CipherReference.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/CipherValue.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/encryption/DocumentSerializer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptedData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptedKey.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptedType.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperties.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperty.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/Reference.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/ReferenceList.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/encryption/Serializer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/Transforms.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipherInput.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLCipherParameters.java
! src/share/classes/com/sun/org/apache/xml/internal/security/encryption/XMLEncryptionException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/exceptions/AlgorithmAlreadyRegisteredException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/exceptions/Base64DecodingException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityRuntimeException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/ContentHandlerAlreadyRegisteredException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyInfo.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyUtils.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoContent.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoReference.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyName.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/PGPData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/KeyValueContent.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Digest.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/InvalidKeyResolverException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DEREncodedKeyValueResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DSAKeyValueResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/EncryptedKeyResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/KeyInfoReferenceResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/PrivateKeyResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SecretKeyResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/SingleKeyResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509DigestResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509IssuerSerialResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverSpi.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml
- src/share/classes/com/sun/org/apache/xml/internal/security/resource/log4j.properties
! src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_de.properties
! src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidDigestValueException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/InvalidSignatureValueException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/Manifest.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/NodeFilter.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/ReferenceNotInitializedException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/SignedInfo.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.java
! src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInputDebugger.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceData.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceNodeSetData.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceOctetStreamData.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/signature/reference/ReferenceSubTreeData.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/InvalidTransformException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformParam.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformSpi.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformationException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transforms.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.java
- src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformBase64Decode.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11_WithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NWithComments.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath2Filter.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPointer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXSLT.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/InclusiveNamespaces.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer04.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPathContainer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPathFilterCHGPContainer.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/ClassLoaderUtils.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/Constants.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/DOMNamespaceContext.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementChecker.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementCheckerImpl.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionConstants.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/EncryptionElementProxy.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/IdResolver.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/IgnoreAllErrorHandler.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathAPI.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/JDKXPathFactory.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/Signature11ElementProxy.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncBufferedOutputStream.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathAPI.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFactory.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/XalanXPathAPI.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/XalanXPathFactory.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java
+ src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverContext.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverException.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverSpi.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverAnonymous.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.java
! src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.java
! src/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java
! src/share/classes/org/jcp/xml/dsig/internal/MacOutputStream.java
! src/share/classes/org/jcp/xml/dsig/internal/SignerOutputStream.java
+ src/share/classes/org/jcp/xml/dsig/internal/dom/AbstractDOMSignatureMethod.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/DOMCanonicalXMLC14N11Method.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/DOMReference.java
! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.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/DOMXMLSignature.java
! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java
! src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.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/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java
Changeset: e3208dbf6926
Author: mullan
Date: 2013-07-05 16:30 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e3208dbf6926
Merge
- src/share/classes/java/security/acl/package.html
- src/share/classes/java/security/cert/package.html
- src/share/classes/java/security/interfaces/package.html
- src/share/classes/java/security/package.html
- src/share/classes/java/security/spec/package.html
- src/share/classes/sun/security/krb5/internal/rcache/CacheTable.java
- src/share/classes/sun/security/krb5/internal/rcache/ReplayCache.java
- test/java/util/Comparators/BasicTest.java
- test/sun/security/krb5/auto/ReplayCache.java
From henry.jen at oracle.com Fri Jul 5 21:37:41 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Fri, 05 Jul 2013 14:37:41 -0700
Subject: RFR: 8015317: Optional.filter, map, and flatMap
Message-ID: <51D73CA5.50005@oracle.com>
Hi,
Please review the webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8015317.0/webrev/
Which adds following method to Optional,
public static Optional ofNullable(T value) {}
public Optional filter(Predicate super T> predicate) {}
public Optional map(Function super T, ? extends U> mapper) {}
public Optional flatMap(Function super T, ? extends Optional>
mapper) {}
Also included is some cleanup on javadoc.
Cheers,
Henry
From lana.steuck at oracle.com Fri Jul 5 21:40:23 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:23 +0000
Subject: hg: jdk8/tl/corba: Added tag jdk8-b97 for changeset 469995a8e974
Message-ID: <20130705214025.361BE48859@hg.openjdk.java.net>
Changeset: 3370fb6146e4
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/corba/rev/3370fb6146e4
Added tag jdk8-b97 for changeset 469995a8e974
! .hgtags
From lana.steuck at oracle.com Fri Jul 5 21:40:29 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:29 +0000
Subject: hg: jdk8/tl/nashorn: 2 new changesets
Message-ID: <20130705214032.7F3144885B@hg.openjdk.java.net>
Changeset: da63a99481da
Author: cl
Date: 2013-07-04 01:01 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/da63a99481da
Added tag jdk8-b97 for changeset 1bf1d6ce3042
! .hgtags
Changeset: 542b7803f038
Author: lana
Date: 2013-07-05 11:05 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/542b7803f038
Merge
From lana.steuck at oracle.com Fri Jul 5 21:40:32 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:32 +0000
Subject: hg: jdk8/tl/jaxws: Added tag jdk8-b97 for changeset dcde7f049111
Message-ID: <20130705214036.0BA464885C@hg.openjdk.java.net>
Changeset: b1fb4612a2ca
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jaxws/rev/b1fb4612a2ca
Added tag jdk8-b97 for changeset dcde7f049111
! .hgtags
From lana.steuck at oracle.com Fri Jul 5 21:40:28 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:28 +0000
Subject: hg: jdk8/tl: 9 new changesets
Message-ID: <20130705214029.033E44885A@hg.openjdk.java.net>
Changeset: f5eb23490e6a
Author: erikj
Date: 2013-06-27 09:27 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/f5eb23490e6a
8017047: Can't use --with-java-devtools and --with-devkit at the same time
Reviewed-by: tbell
! common/autoconf/basics.m4
! common/autoconf/generated-configure.sh
! common/autoconf/toolchain.m4
Changeset: e5cf1735638c
Author: erikj
Date: 2013-06-28 11:55 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/e5cf1735638c
8016605: New files dont apear in src.zip
Reviewed-by: tbell
! common/makefiles/JavaCompilation.gmk
Changeset: 0871b5799149
Author: erikj
Date: 2013-06-28 11:58 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/0871b5799149
8019229: Build Configuration Fail in Windows Platform
Reviewed-by: chegar, tbell, dxu
! common/autoconf/generated-configure.sh
! common/autoconf/toolchain.m4
Changeset: 0e533ceee717
Author: erikj
Date: 2013-06-28 12:00 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/0e533ceee717
8016303: make CONF= isn't working
Reviewed-by: tbell
! NewMakefile.gmk
Changeset: 78aaf5d3314d
Author: erikj
Date: 2013-06-28 12:02 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/78aaf5d3314d
8010385: build with LOG=trace broken on mac
Reviewed-by: dholmes, tbell, prr
! common/autoconf/basics.m4
! common/autoconf/generated-configure.sh
! common/autoconf/spec.gmk.in
! common/makefiles/MakeBase.gmk
Changeset: dd3b314f4471
Author: erikj
Date: 2013-07-01 15:40 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/dd3b314f4471
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
Reviewed-by: tbell
! common/autoconf/generated-configure.sh
! common/autoconf/toolchain.m4
Changeset: b2b87e9e8683
Author: erikj
Date: 2013-07-02 15:07 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/rev/b2b87e9e8683
8019537: jdk8-build prebuild fails in source bundle generation, The path of TOOLS_DIR ... is not found
Reviewed-by: tbell
! common/autoconf/basics.m4
! common/autoconf/generated-configure.sh
Changeset: a1c1e8bf71f3
Author: katleman
Date: 2013-07-02 15:55 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/rev/a1c1e8bf71f3
Merge
Changeset: 99ad803f8c4e
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/rev/99ad803f8c4e
Added tag jdk8-b97 for changeset a1c1e8bf71f3
! .hgtags
From lana.steuck at oracle.com Fri Jul 5 21:40:33 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:33 +0000
Subject: hg: jdk8/tl/jaxp: 3 new changesets
Message-ID: <20130705214043.3469B4885D@hg.openjdk.java.net>
Changeset: c96691d84a7c
Author: katleman
Date: 2013-06-28 16:25 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/c96691d84a7c
8019347: JDK8 b96 source with GPL header errors
Reviewed-by: iris, alanb, lancea
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_de.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_es.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_fr.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_it.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ja.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_ko.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_pt_BR.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_sv.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_CN.properties
! src/com/sun/org/apache/xerces/internal/impl/xpath/regex/message_zh_TW.properties
Changeset: 6c830db28d21
Author: katleman
Date: 2013-07-02 15:55 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/6c830db28d21
Merge
Changeset: 15e5bb51bc0c
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/15e5bb51bc0c
Added tag jdk8-b97 for changeset 6c830db28d21
! .hgtags
From lana.steuck at oracle.com Fri Jul 5 21:40:32 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:32 +0000
Subject: hg: jdk8/tl/langtools: 3 new changesets
Message-ID: <20130705214045.302BB4885E@hg.openjdk.java.net>
Changeset: 2364e94ae67b
Author: cl
Date: 2013-07-04 01:01 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/2364e94ae67b
Added tag jdk8-b97 for changeset 6a11a81a8824
! .hgtags
Changeset: ce5a90df517b
Author: lana
Date: 2013-07-05 11:06 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/ce5a90df517b
Merge
Changeset: 49654c9c705b
Author: lana
Date: 2013-07-05 13:29 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/49654c9c705b
Merge
From lana.steuck at oracle.com Fri Jul 5 21:40:39 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:40:39 +0000
Subject: hg: jdk8/tl/hotspot: 26 new changesets
Message-ID: <20130705214136.249194885F@hg.openjdk.java.net>
Changeset: fc8a1a5de78e
Author: amurillo
Date: 2013-06-21 00:59 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/fc8a1a5de78e
8017253: new hotspot build - hs25-b39
Reviewed-by: jcoomes
! make/hotspot_version
Changeset: 91acb82a8b7a
Author: dholmes
Date: 2013-06-19 13:14 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/91acb82a8b7a
8014326: [OSX] All libjvm symbols are exported
Summary: Add support for a MacOS X compatible form of the libjvm mapfile.
Reviewed-by: dcubed, rdurbin, coleenp
! make/bsd/makefiles/build_vm_def.sh
! make/bsd/makefiles/gcc.make
! make/bsd/makefiles/mapfile-vers-debug
! make/bsd/makefiles/mapfile-vers-product
Changeset: b9f4c4ec0f50
Author: iklam
Date: 2013-06-19 20:51 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/b9f4c4ec0f50
8008964: NPG: Memory regression: Thread::_metadata_handles uses 1 KB per thread.
Summary: Reduce default size of Thread::_metadata_handles from 300 to 30
Reviewed-by: coleenp, sspitsyn
! src/share/vm/runtime/thread.cpp
Changeset: b3cd8b58b798
Author: mgronlun
Date: 2013-06-20 11:53 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/b3cd8b58b798
8016735: Remove superfluous EnableInvokeDynamic warning from UnlockDiagnosticVMOptions check
Reviewed-by: sla, dholmes
! src/share/vm/runtime/globals.cpp
Changeset: 9ba41a4a71ff
Author: coleenp
Date: 2013-06-21 10:50 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/9ba41a4a71ff
8004124: Handle and/or warn about SI_KERNEL
Summary: Detect this crash in the signal handler and give a fatal error message instead of making us chase down bugs that don't reproduce
Reviewed-by: kvn, mgerdin, dholmes
! src/os_cpu/linux_x86/vm/os_linux_x86.cpp
! src/share/vm/runtime/sharedRuntime.cpp
Changeset: bed34a7a3b9b
Author: coleenp
Date: 2013-06-21 10:57 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/bed34a7a3b9b
8017177: more explicit code location information in hs_err crash log
Summary: Add code pc location for compiled code
Reviewed-by: kvn, coleenp
Contributed-by: doug.simon at oracle.com
! src/share/vm/runtime/frame.cpp
Changeset: bb6c7f2f10fd
Author: dcubed
Date: 2013-06-21 08:18 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/bb6c7f2f10fd
Merge
Changeset: b7bc7c94b4b5
Author: dcubed
Date: 2013-06-21 10:55 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/b7bc7c94b4b5
Merge
- src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
- src/os_cpu/solaris_sparc/vm/assembler_solaris_sparc.cpp
Changeset: d9eed26d638a
Author: iklam
Date: 2013-06-23 22:08 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/d9eed26d638a
8009575: Reduce Symbol::_refcount from 4 bytes to 2 bytes
Summary: Added Atomic::inc(short*) to support this change.
Reviewed-by: coleenp, dcubed, dholmes, minqi
! src/share/vm/oops/symbol.cpp
! src/share/vm/oops/symbol.hpp
! src/share/vm/runtime/atomic.cpp
! src/share/vm/runtime/atomic.hpp
! src/share/vm/runtime/vmStructs.cpp
Changeset: e0c9a1d29eb4
Author: coleenp
Date: 2013-06-24 18:55 -0400
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/e0c9a1d29eb4
8016325: JVM hangs verifying system dictionary
Summary: Minimize redundant verifications of Klasses.
Reviewed-by: hseigel, jmasa
! src/cpu/sparc/vm/frame_sparc.cpp
! src/cpu/x86/vm/frame_x86.cpp
! src/share/vm/ci/ciObjectFactory.cpp
! src/share/vm/classfile/dictionary.cpp
! src/share/vm/code/debugInfo.hpp
! src/share/vm/code/dependencies.cpp
! src/share/vm/gc_implementation/g1/heapRegion.cpp
! src/share/vm/memory/allocation.cpp
! src/share/vm/memory/allocation.hpp
! src/share/vm/memory/heapInspection.cpp
! src/share/vm/oops/arrayKlass.cpp
! src/share/vm/oops/arrayKlass.hpp
! src/share/vm/oops/compiledICHolder.cpp
! src/share/vm/oops/constMethod.cpp
! src/share/vm/oops/constantPool.cpp
! src/share/vm/oops/instanceKlass.cpp
! src/share/vm/oops/instanceKlass.hpp
! src/share/vm/oops/klass.cpp
! src/share/vm/oops/klass.hpp
! src/share/vm/oops/method.cpp
! src/share/vm/oops/objArrayKlass.cpp
! src/share/vm/oops/objArrayKlass.hpp
! src/share/vm/runtime/frame.cpp
! src/share/vm/shark/sharkBuilder.cpp
Changeset: 01e10b366055
Author: sla
Date: 2013-06-25 14:11 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/01e10b366055
8017561: Build errors caused by missing .PHONY
Reviewed-by: stefank, brutisso
! make/excludeSrc.make
Changeset: feae15578b2f
Author: tamao
Date: 2013-06-07 09:46 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/feae15578b2f
7122222: GC log is limited to 2G for 32-bit
Summary: Enable large file support for generated 32-bit ostream.o on Linux and Solaris (as only the two need this) by setting -D_FILE_OFFSET_BITS=64 in compilation
Reviewed-by: tbell, mgerdin, dcubed
Contributed-by: tamao
! make/linux/makefiles/vm.make
! make/solaris/makefiles/vm.make
! src/os/solaris/vm/os_solaris.inline.hpp
Changeset: df7e1c0e3dc1
Author: jmasa
Date: 2013-06-25 09:58 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/df7e1c0e3dc1
8014546: MetaspaceAux print_metaspace_change() should print "used" after GC not capacity
Reviewed-by: johnc, tschatzl
! src/share/vm/memory/metaspace.cpp
Changeset: f99cd6e20ab1
Author: jmasa
Date: 2013-06-25 15:17 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/f99cd6e20ab1
8014851: UseAdaptiveGCBoundary is broken
Reviewed-by: tschatzl, brutisso
! src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp
! src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.hpp
! src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp
+ test/gc/parallelScavenge/AdaptiveGCBoundary.java
Changeset: 71963b3f802a
Author: ehelin
Date: 2013-06-26 16:58 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/71963b3f802a
8013590: NPG: Add a memory pool MXBean for Metaspace
Reviewed-by: jmasa, mgerdin
! src/share/vm/memory/metaspace.cpp
! src/share/vm/memory/universe.cpp
! src/share/vm/services/management.cpp
! src/share/vm/services/memoryManager.cpp
! src/share/vm/services/memoryManager.hpp
! src/share/vm/services/memoryPool.cpp
! src/share/vm/services/memoryPool.hpp
! src/share/vm/services/memoryService.cpp
! src/share/vm/services/memoryService.hpp
+ test/gc/metaspace/TestMetaspaceMemoryPool.java
Changeset: f8972b867ded
Author: ehelin
Date: 2013-06-27 10:56 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/f8972b867ded
Merge
Changeset: 7875ea94bea5
Author: goetz
Date: 2013-06-24 11:53 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/7875ea94bea5
8017308: Remove unused breakpoint relocation type
Summary: remove unused breakpoint relocation type
Reviewed-by: kvn
! src/cpu/sparc/vm/macroAssembler_sparc.cpp
! src/cpu/sparc/vm/relocInfo_sparc.cpp
! src/cpu/x86/vm/relocInfo_x86.cpp
! src/cpu/zero/vm/relocInfo_zero.cpp
! src/share/vm/code/nmethod.cpp
! src/share/vm/code/relocInfo.cpp
! src/share/vm/code/relocInfo.hpp
Changeset: cc63bcb47cce
Author: twisti
Date: 2013-06-24 17:47 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/cc63bcb47cce
8017538: Clang support broke slowdebug build for i586
Reviewed-by: kvn
! make/linux/makefiles/gcc.make
Changeset: a023da4ffc15
Author: twisti
Date: 2013-06-24 18:23 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/a023da4ffc15
Merge
Changeset: 3aa636f2a743
Author: adlertz
Date: 2013-06-25 12:07 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/3aa636f2a743
8017243: 8001345 is incomplete
Summary: Replaces unused decodeN at MemBarAcquire with its corresponding loadN if loadN is used at more than one place.
Reviewed-by: kvn, twisti
! src/share/vm/opto/memnode.cpp
Changeset: 9347cae673f0
Author: adlertz
Date: 2013-06-26 00:40 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/9347cae673f0
8017510: Add a regression test for 8005956
Summary: Regression test for 8005956
Reviewed-by: kvn, twisti
+ test/compiler/8005956/PolynomialRoot.java
Changeset: 6a0ead6dc6db
Author: goetz
Date: 2013-06-24 16:11 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/6a0ead6dc6db
8017531: 8010460 changes broke bytecodeInterpreter.cpp
Summary: Replace _indy by _jsr292 and also fix VERIFY_OOP macros.
Reviewed-by: kvn
! src/share/vm/interpreter/bytecodeInterpreter.cpp
Changeset: be0600ec1102
Author: kvn
Date: 2013-06-27 11:12 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/be0600ec1102
Merge
Changeset: 2b9380b0bf0b
Author: amurillo
Date: 2013-06-28 02:25 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/2b9380b0bf0b
Merge
! src/share/vm/memory/allocation.cpp
! src/share/vm/memory/allocation.hpp
! src/share/vm/memory/universe.cpp
Changeset: d197d377ab2e
Author: amurillo
Date: 2013-06-28 02:25 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/d197d377ab2e
Added tag hs25-b39 for changeset 2b9380b0bf0b
! .hgtags
Changeset: 2bfa00fac03f
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/2bfa00fac03f
Added tag jdk8-b97 for changeset d197d377ab2e
! .hgtags
From lana.steuck at oracle.com Fri Jul 5 21:44:30 2013
From: lana.steuck at oracle.com (lana.steuck at oracle.com)
Date: Fri, 05 Jul 2013 21:44:30 +0000
Subject: hg: jdk8/tl/jdk: 20 new changesets
Message-ID: <20130705214839.9E12248860@hg.openjdk.java.net>
Changeset: 8339c83b16c6
Author: ehelin
Date: 2013-07-02 13:06 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8339c83b16c6
8019500: Exclude MemoryTest.java and MemoryTestAllGC.sh to enable integration
Reviewed-by: erikj, alanb
! test/ProblemList.txt
Changeset: 87cab043cb5e
Author: katleman
Date: 2013-06-28 16:26 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/87cab043cb5e
8019347: JDK8 b96 source with GPL header errors
Reviewed-by: iris, alanb, lancea
! makefiles/sun/awt/ToBin.java
! src/share/classes/javax/xml/crypto/dsig/dom/DOMValidateContext.java
! test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java
! test/java/lang/ThreadGroup/Suspend.java
Changeset: 978a95239044
Author: katleman
Date: 2013-07-02 15:55 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/978a95239044
Merge
Changeset: 4b21dcfdcc3b
Author: cl
Date: 2013-07-04 01:00 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/4b21dcfdcc3b
Added tag jdk8-b97 for changeset 978a95239044
! .hgtags
Changeset: 5cfcd545ce4a
Author: vadim
Date: 2013-06-26 13:49 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5cfcd545ce4a
8016254: several sun/java2d/OpenGL tests failed with SIGFPE
Reviewed-by: prr, bae
! src/share/native/sun/java2d/opengl/OGLContext.c
Changeset: 3ffa38871143
Author: lana
Date: 2013-06-28 19:37 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3ffa38871143
Merge
- make/sun/xawt/ToBin.java
- makefiles/sun/awt/X11/ToBin.java
- src/share/classes/sun/misc/FDBigInt.java
- src/share/classes/sun/misc/Hashing.java
- src/solaris/classes/sun/awt/X11/XIconInfo.java
- src/solaris/classes/sun/awt/X11/security-icon-bw16.png
- src/solaris/classes/sun/awt/X11/security-icon-bw24.png
- src/solaris/classes/sun/awt/X11/security-icon-bw32.png
- src/solaris/classes/sun/awt/X11/security-icon-bw48.png
- src/solaris/classes/sun/awt/X11/security-icon-interim16.png
- src/solaris/classes/sun/awt/X11/security-icon-interim24.png
- src/solaris/classes/sun/awt/X11/security-icon-interim32.png
- src/solaris/classes/sun/awt/X11/security-icon-interim48.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow16.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow24.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow32.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow48.png
- test/java/lang/invoke/7196190/MHProxyTest.java
- test/sun/misc/Hashing.java
Changeset: 6dda4a069a83
Author: prr
Date: 2013-07-01 12:39 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/6dda4a069a83
8015144: Performance regression in ICU OpenType Layout library
Reviewed-by: srl, jgodinez
! make/sun/font/Makefile
! makefiles/CompileNativeLibraries.gmk
! src/share/native/sun/font/layout/GlyphIterator.cpp
! src/share/native/sun/font/layout/GlyphIterator.h
! src/share/native/sun/font/layout/LETableReference.h
! src/share/native/sun/font/layout/OpenTypeUtilities.cpp
Changeset: 6d2b5ec2ec79
Author: prr
Date: 2013-07-02 14:25 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/6d2b5ec2ec79
8019692: JDK build CC_OPT_HIGHEST setting isn't valid for Sun C++ compiler
Reviewed-by: jgodinez
! make/sun/font/Makefile
! makefiles/CompileNativeLibraries.gmk
Changeset: 1c607ebfc180
Author: leonidr
Date: 2013-06-20 18:50 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1c607ebfc180
8014264: The applet pathguy_TimeDead throws java.lang.NullPointerException in java console once click drop-down check box.
Reviewed-by: art, anthony, serb
! src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
! src/solaris/classes/sun/awt/X11/XChoicePeer.java
! src/solaris/classes/sun/awt/X11/XListPeer.java
Changeset: b7b95b7ab2cb
Author: malenkov
Date: 2013-06-21 17:13 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/b7b95b7ab2cb
8016545: java.beans.XMLEncoder.writeObject output is wrong
Reviewed-by: alexsch
! src/share/classes/java/beans/XMLEncoder.java
+ test/java/beans/XMLEncoder/Test8016545.java
Changeset: eed321190272
Author: alitvinov
Date: 2013-06-21 21:30 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/eed321190272
8007642: Media Names on Java Print Do Not Match the Printer???s and Confuse Users
Reviewed-by: prr, jgodinez
! src/windows/classes/sun/print/Win32PrintService.java
Changeset: e5bac76282f7
Author: pchelko
Date: 2013-06-27 13:56 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e5bac76282f7
8019236: [macosx] Add javadoc to the handleWindowFocusEvent in CEmbeddedFrame
Reviewed-by: serb, ant
! src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
Changeset: 72f167edf630
Author: dmarkov
Date: 2013-06-28 18:32 +0400
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/72f167edf630
8016534: javax/swing/text/View/8014863/bug8014863.java failed
Reviewed-by: alexp, alexsch
! test/javax/swing/text/View/8014863/bug8014863.java
Changeset: 228ec4b9111a
Author: lana
Date: 2013-06-28 18:06 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/228ec4b9111a
Merge
- make/sun/xawt/ToBin.java
- makefiles/sun/awt/X11/ToBin.java
! src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
- src/share/classes/sun/misc/FDBigInt.java
- src/share/classes/sun/misc/Hashing.java
! src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java
! src/solaris/classes/sun/awt/X11/XChoicePeer.java
- src/solaris/classes/sun/awt/X11/XIconInfo.java
! src/solaris/classes/sun/awt/X11/XListPeer.java
- src/solaris/classes/sun/awt/X11/security-icon-bw16.png
- src/solaris/classes/sun/awt/X11/security-icon-bw24.png
- src/solaris/classes/sun/awt/X11/security-icon-bw32.png
- src/solaris/classes/sun/awt/X11/security-icon-bw48.png
- src/solaris/classes/sun/awt/X11/security-icon-interim16.png
- src/solaris/classes/sun/awt/X11/security-icon-interim24.png
- src/solaris/classes/sun/awt/X11/security-icon-interim32.png
- src/solaris/classes/sun/awt/X11/security-icon-interim48.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow16.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow24.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow32.png
- src/solaris/classes/sun/awt/X11/security-icon-yellow48.png
! src/windows/classes/sun/print/Win32PrintService.java
- test/java/lang/invoke/7196190/MHProxyTest.java
- test/sun/misc/Hashing.java
Changeset: 6fc558b41d8e
Author: lana
Date: 2013-07-02 15:20 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/6fc558b41d8e
Merge
Changeset: 11c074904fce
Author: lana
Date: 2013-07-02 15:23 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/11c074904fce
Merge
- src/share/classes/java/security/acl/package.html
- src/share/classes/java/security/cert/package.html
- src/share/classes/java/security/interfaces/package.html
- src/share/classes/java/security/package.html
- src/share/classes/java/security/spec/package.html
- src/share/classes/sun/security/krb5/internal/rcache/CacheTable.java
- src/share/classes/sun/security/krb5/internal/rcache/ReplayCache.java
- test/java/util/Comparators/BasicTest.java
- test/sun/security/krb5/auto/ReplayCache.java
Changeset: 974b94f944ce
Author: lana
Date: 2013-07-03 19:09 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/974b94f944ce
Merge
- src/share/classes/java/security/acl/package.html
- src/share/classes/java/security/cert/package.html
- src/share/classes/java/security/interfaces/package.html
- src/share/classes/java/security/package.html
- src/share/classes/java/security/spec/package.html
- src/share/classes/sun/security/krb5/internal/rcache/CacheTable.java
- src/share/classes/sun/security/krb5/internal/rcache/ReplayCache.java
- test/java/util/Comparators/BasicTest.java
- test/sun/security/krb5/auto/ReplayCache.java
Changeset: f2342dedf04a
Author: lana
Date: 2013-07-05 11:07 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f2342dedf04a
Merge
Changeset: 49c5547d9e8e
Author: lana
Date: 2013-07-05 13:28 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/49c5547d9e8e
Merge
Changeset: 4fcabe8e22ce
Author: lana
Date: 2013-07-05 14:37 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/4fcabe8e22ce
Merge
- src/share/classes/com/sun/org/apache/xml/internal/security/resource/log4j.properties
- src/share/classes/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.java
- src/share/classes/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.java
From henry.jen at oracle.com Sat Jul 6 00:11:55 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Fri, 05 Jul 2013 17:11:55 -0700
Subject: RFR: 8015318: Extend Collector with 'finish' operation
Message-ID: <51D760CB.8080003@oracle.com>
Hi,
Please review the webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8015318.0/webrev/
This webrev refactor java.util.Collector interface to allow an
intermediate type used for accumulation and then produce final result
type with a 'finished' function.
Collectors are updated to reflect the changes, and quite a few API changes,
toStringJoiner -> joining
Return type becoming Optional when appropriate
sumBy -> a set of summing[Int,Long,Double]
average[Int,Long,Double]
I'll put specdiff up later for those interested in API changes.
Cheers,
Henry
From henry.jen at oracle.com Sat Jul 6 00:18:53 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Fri, 05 Jul 2013 17:18:53 -0700
Subject: RFR: 8015318: Extend Collector with 'finish' operation
In-Reply-To: <51D760CB.8080003@oracle.com>
References: <51D760CB.8080003@oracle.com>
Message-ID: <51D7626D.3090102@oracle.com>
Forgot to mention this patch depends on fix of bug 8012238[1], to enable
compile without fix, attached patch will help.
[1] http://bugs.sun.com/view_bug.do?bug_id=8012238
Cheers,
Henry
On 07/05/2013 05:11 PM, Henry Jen wrote:
> Hi,
>
> Please review the webrev at
> http://cr.openjdk.java.net/~henryjen/ccc/8015318.0/webrev/
>
> This webrev refactor java.util.Collector interface to allow an
> intermediate type used for accumulation and then produce final result
> type with a 'finished' function.
>
> Collectors are updated to reflect the changes, and quite a few API changes,
>
> toStringJoiner -> joining
> Return type becoming Optional when appropriate
> sumBy -> a set of summing[Int,Long,Double]
> average[Int,Long,Double]
>
> I'll put specdiff up later for those interested in API changes.
>
> Cheers,
> Henry
>
From bradford.wetmore at oracle.com Sat Jul 6 01:24:01 2013
From: bradford.wetmore at oracle.com (bradford.wetmore at oracle.com)
Date: Sat, 06 Jul 2013 01:24:01 +0000
Subject: hg: jdk8/tl/jdk: 8019341: Update CookieHttpsClientTest to use the
newer framework.
Message-ID: <20130706012427.9957D4886A@hg.openjdk.java.net>
Changeset: 11c15607e43f
Author: wetmore
Date: 2013-07-05 18:22 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/11c15607e43f
8019341: Update CookieHttpsClientTest to use the newer framework.
Reviewed-by: xuelei, smarks, michaelm
! test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHttpsClientTest.java
! test/sun/security/ssl/templates/SSLEngineTemplate.java
! test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java
! test/sun/security/ssl/templates/SSLSocketTemplate.java
From huizhe.wang at oracle.com Sat Jul 6 01:48:57 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Fri, 05 Jul 2013 18:48:57 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D68488.2050108@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
<51D53C3A.6000708@oracle.com> <51D54E48.6060503@oracle.com>
<51D5DA43.3050404@oracle.com> <51D68488.2050108@oracle.com>
Message-ID: <51D77789.8080605@oracle.com>
On 7/5/2013 1:32 AM, Alan Bateman wrote:
> On 04/07/2013 21:25, huizhe wang wrote:
>>
>> Reverted back to the original code:
>> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>> The code split the version number and look at the 1st or 2nd element,
>> it thus works for both the current format and the proposed one, e.g.
>> for 1.7.0, it compares with the 2nd element, and for the proposed
>> MAJOR.MINOR.FU.*, the 1st or MAJOR.
> Thanks for dropping the dependency on javax.lang.model. What you now
> is probably okay although I'm a bit dubious about attempting to
> support an alternative format (I'm not aware of any proposal that
> changes the format of the java.version property as changing it would
> like cause a lot of breakage).
There was a survey from Iris last year, and the JPG site has a
presentation from Aurelio. But you're right, I'll remove it. If there's
any change in the future, that is if it happens at all, we can always
add that back.
>
> A minor point but isJDKOrAbove looks a bit odd to me, I'd probably go
> for something like isJavaVersionGTE or isJavaVersionAtLeast but as
> it's not part of the API then it doesn't matter of course.
isJavaVersionAtLeast is easy to understand. What does GTE stand for?
>
> I think I mentioned it a while back but have warnings emitted with
> System.err can be problematic (gets mixed up with application messages
> to stderr). I realize the Xerces code seems to do this in places but
> we really need to see about eliminating these messages or getting
> consistent logging into this code.
I agree, this one is not particularly graceful. There were 88 matches of
System.err in Xalan and 75 in Xerces, although some I believe are used
for debugging. It could take quite some effort.
I mentioned that with a standalone release, we were trying to stay away
from new JDK features. It's probably better to spend time/effort on some
upgrades.
>
>> :
>>
>> The last scenario to work on is if FSP is set on the Validator
>> instead of SchemaFactory. With that, I'm looking at refactoring the
>> way properties are represented so that they carry state. It would
>> then be cleaner to pass them from SchemaFactory over to Schema and
>> then Validator. It's a bit of work. Fortunately, we only have three
>> of them to deal with.
> So are you planning to send another webrev or do it as a separate issue?
Looking at affected code by this change, it doesn't seem to be too bad.
I'll send another webrev.
Joe
>
> -Alan
From erik.helin at oracle.com Sat Jul 6 07:14:15 2013
From: erik.helin at oracle.com (Erik Helin)
Date: Sat, 6 Jul 2013 09:14:15 +0200
Subject: RFR: 8010734: NPG: The test MemoryTest.java needs to be updated
to support metaspace
In-Reply-To: <51D6D7D8.5080809@oracle.com>
References: <20130701153520.GF2213@ehelin-thinkpad>
<20130705140805.GC14318@ehelin-thinkpad>
<51D6D7D8.5080809@oracle.com>
Message-ID: <20130706071415.GC2056@ehelin-thinkpad>
Thanks!
Erik
On 2013-07-05, Alan Bateman wrote:
> On 05/07/2013 15:08, Erik Helin wrote:
> >Hi all,
> >
> >still looking for a review for this testfix. Looping in
> >hotspot-gc-dev at openjdk.java.net as well.
> >
> It looks like okay to me and the comments make it clear the memory
> pools that it expects.
>
> -Alan
From david.holmes at oracle.com Mon Jul 8 01:33:32 2013
From: david.holmes at oracle.com (David Holmes)
Date: Mon, 08 Jul 2013 11:33:32 +1000
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51D603BD.9050708@oracle.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com>
Message-ID: <51DA16EC.5070509@oracle.com>
Still looking for a reviewer for this please.
Thanks,
David
On 5/07/2013 9:22 AM, David Holmes wrote:
> Hi Peter,
>
> On 2/07/2013 5:19 PM, Peter Levart wrote:
>> Looking at original code once again, I think this was actually a bug.
>> The WeakReference instance constructed in (old) line 82, can be GCed
>> right away, since nobody is using the local variable after assignment.
>
> Of course. Doh! I was to busy thinking about the lifetime of the
> referent object to consider the reference itself.
>
>> If WeakReference is GCed it can not be enqueued. The promotion of local
>> variable into a field is one way to fix this. The other would be to use
>> the local variable somewhere down the code path, like for example in a
>> final throw statement:
>>
>> 110 throw new IllegalStateException("Reference Handler thread
>> stuck. weakRef.get(): " + weakRef.get());
>>
>>
>> This would also reveal some more info about the WeakReference when
>> there's no sure answer after 10 seconds and could be added to the test
>> anyway.
>
> Okay I've modified the test as suggested. Updated webrev at same location:
>
> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>
> In testing it though I simply exposed the remaining flaws in the
> ReferenceHandler code. We can still kill the ReferenceHandler thread
> with an OOME when it tries to load the Cleaner class (running with a 5M
> heap triggers this nicely if you use G1):
>
> // Fast path for cleaners
> if (r instanceof Cleaner) {
> ((Cleaner)r).clean();
> continue;
> }
>
> and if that passes the clean() might throw OOME (it internally tries to
> do a System.exit if an exception occurs but will likely encounter
> another OOME trying to create the PrivilegedAction).
>
> Even the:
>
> ReferenceQueue q = r.queue;
> if (q != ReferenceQueue.NULL) q.enqueue(r);
>
> might throw OOME because enqueue() might have to load the FinalReference
> class.
>
> So really catching the OOME around the wait() only patches a small hole.
> We can't simply put a try/catch in the for(;;) loop because that doesn't
> address the problem that if the class loading throws OOME then
> subsequent attempts to load that class will also fail. We would have to
> preload all possible classes. Even then we might just send the
> ReferenceHandler thread into a busy loop of throwing OOME catching it
> and retrying!
>
> So I can fix the test to deal with the Xcomp issue but we may still see
> intermittent failures, and the ReferenceHandler thread may still die
> from OOME.
>
> David
> -----
>
>
>>
>> Regards, Peter
>>
>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>> This recently added test was found to fail under some conditions -
>>> namely client compiler with -Xcomp. It seems that the use of all local
>>> variables enabled the compiler to optimize things in a way that
>>> stopped the weakref from being enqueued as expected. Simple fix was to
>>> make the weakref a field.
>>>
>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>
>>> Thanks,
>>> David
>>
From zhangshj at linux.vnet.ibm.com Mon Jul 8 03:12:13 2013
From: zhangshj at linux.vnet.ibm.com (Shi Jun Zhang)
Date: Mon, 08 Jul 2013 11:12:13 +0800
Subject: RFR: 8019381: HashMap.isEmpty is non-final, potential issues
for get/remove
In-Reply-To: <51D6363E.6090605@linux.vnet.ibm.com>
References: <51CBF181.1020301@linux.vnet.ibm.com>
<51CCAAE5.4010707@univ-mlv.fr> <51CD896D.9030807@oracle.com>
<51CDB453.5010003@linux.vnet.ibm.com> <51D13323.9030601@linux.vnet.ibm.com>
<51D19EAE.2010201@univ-mlv.fr>
<450D0C6E-3BA7-40AD-B415-6659A6FDDA91@oracle.com>
<51D394D4.7090706@linux.vnet.ibm.com>
<51D6363E.6090605@linux.vnet.ibm.com>
Message-ID: <51DA2E0D.5030506@linux.vnet.ibm.com>
On 7/5/2013 10:58 AM, Jonathan Lu wrote:
> On 07/03/2013 11:04 AM, Shi Jun Zhang wrote:
>> On 7/1/2013 11:49 PM, Chris Hegarty wrote:
>>> On 1 Jul 2013, at 17:22, Remi Forax wrote:
>>>
>>>> On 07/01/2013 09:43 AM, Shi Jun Zhang wrote:
>>>>> On 6/29/2013 12:05 AM, Shi Jun Zhang wrote:
>>>>>> On 6/28/2013 9:02 PM, Alan Bateman wrote:
>>>>>>> On 27/06/2013 22:13, Remi Forax wrote:
>>>>>>>> On 06/27/2013 10:02 AM, Shi Jun Zhang wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> There are some isEmpty() check added into get/remove methods
>>>>>>>>> since 8011200 to return directly if HashMap is empty. However
>>>>>>>>> isEmpty is a non-final public method which can be overridden
>>>>>>>>> by subclass. If the subclass defines isEmpty differently from
>>>>>>>>> HashMap, it would cause problem while getting or removing
>>>>>>>>> elements.
>>>>>>>> yes, it's a bug.
>>>>>>>> Could you report it ?
>>>>>>>>
>>>>>>>> R?mi
>>>>>>> I've created a bug to track this:
>>>>>>>
>>>>>>> 8019381: HashMap.isEmpty is non-final, potential issues for
>>>>>>> get/remove
>>>>>>>
>>>>>>> -Alan
>>>>>> Thanks, Alan.
>>>>>>
>>>>>> I'm quite busy today and do not have time to report it until now.
>>>>>> Thanks for your help.
>>>>>>
>>>>>> I will provide a webrev next Monday for review.
>>>>> Hi,
>>>>>
>>>>> Here is the webrev
>>>>>
>>>>> http://cr.openjdk.java.net/~zhangshj/8019381/webrev.00/
>>>> This looks Ok for me.
>>> +1
>>>
>>> -Chris
>>>
>>>> R?mi
>>>>
>> Thanks all for the review.
>>
>> Jonathan,
>>
>> Could you help to push the changeset?
>>
> Hello Chance,
>
> Patch pushed @
> http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ed111451b77a, pls verify.
>
> Cheers!
> - Jonathan
Thanks, Jonathan.
--
Regards,
Shi Jun Zhang
From peter.levart at gmail.com Mon Jul 8 07:01:07 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Mon, 08 Jul 2013 09:01:07 +0200
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51D603BD.9050708@oracle.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com>
Message-ID: <51DA63B3.8070405@gmail.com>
On 07/05/2013 01:22 AM, David Holmes wrote:
> Hi Peter,
>
> On 2/07/2013 5:19 PM, Peter Levart wrote:
>> Looking at original code once again, I think this was actually a bug.
>> The WeakReference instance constructed in (old) line 82, can be GCed
>> right away, since nobody is using the local variable after assignment.
>
> Of course. Doh! I was to busy thinking about the lifetime of the
> referent object to consider the reference itself.
>
>> If WeakReference is GCed it can not be enqueued. The promotion of local
>> variable into a field is one way to fix this. The other would be to use
>> the local variable somewhere down the code path, like for example in a
>> final throw statement:
>>
>> 110 throw new IllegalStateException("Reference Handler thread
>> stuck. weakRef.get(): " + weakRef.get());
>>
>>
>> This would also reveal some more info about the WeakReference when
>> there's no sure answer after 10 seconds and could be added to the test
>> anyway.
>
> Okay I've modified the test as suggested. Updated webrev at same
> location:
>
> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>
> In testing it though I simply exposed the remaining flaws in the
> ReferenceHandler code. We can still kill the ReferenceHandler thread
> with an OOME when it tries to load the Cleaner class (running with a
> 5M heap triggers this nicely if you use G1):
>
> // Fast path for cleaners
> if (r instanceof Cleaner) {
> ((Cleaner)r).clean();
> continue;
> }
>
> and if that passes the clean() might throw OOME (it internally tries
> to do a System.exit if an exception occurs but will likely encounter
> another OOME trying to create the PrivilegedAction).
>
> Even the:
>
> ReferenceQueue q = r.queue;
> if (q != ReferenceQueue.NULL) q.enqueue(r);
>
> might throw OOME because enqueue() might have to load the
> FinalReference class.
>
> So really catching the OOME around the wait() only patches a small
> hole. We can't simply put a try/catch in the for(;;) loop because that
> doesn't address the problem that if the class loading throws OOME then
> subsequent attempts to load that class will also fail. We would have
> to preload all possible classes. Even then we might just send the
> ReferenceHandler thread into a busy loop of throwing OOME catching it
> and retrying!
>
> So I can fix the test to deal with the Xcomp issue but we may still
> see intermittent failures, and the ReferenceHandler thread may still
> die from OOME.
Hi David,
I think the test is fine now.
Regarding the resilience of ReferenceHandler thread, I think we should
try to preload FinalReference, Cleaner and InterruptedException in the
initialization phase of ReferenceHandler thread. There should be no
danger of OOME in related cases then. As far as Cleaner's exception
handler is concerned, I think it is not universally wise to just exit
the VM when any exception is thrown by the Cleaner's thunk.run() method.
What if that exception is OOME? That does not mean there's something
wrong with Cleaner.thunk's code. Not only will this kill
ReferenceHandler thread, but entire VM.
If the purpose of exiting VM was attracting attention to the possible
bug in Cleaner.thunk's code, then this absolutely works, but wouldn't
simple message to System.err be enough? Like for example:
public void clean() {
if (!remove(this))
return;
try {
thunk.run();
} catch (final Throwable x) {
try {
new Error("Cleaner caught exception", x)
.printStackTrace();
} catch (OutOfMemoryError oome) {
// can't do much
}
}
}
Regards, Peter
>
> David
> -----
>
>
>>
>> Regards, Peter
>>
>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>> This recently added test was found to fail under some conditions -
>>> namely client compiler with -Xcomp. It seems that the use of all local
>>> variables enabled the compiler to optimize things in a way that
>>> stopped the weakref from being enqueued as expected. Simple fix was to
>>> make the weakref a field.
>>>
>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>
>>> Thanks,
>>> David
>>
From david.holmes at oracle.com Mon Jul 8 07:19:56 2013
From: david.holmes at oracle.com (David Holmes)
Date: Mon, 08 Jul 2013 17:19:56 +1000
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51DA63B3.8070405@gmail.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com> <51DA63B3.8070405@gmail.com>
Message-ID: <51DA681C.9010402@oracle.com>
Hi Peter,
On 8/07/2013 5:01 PM, Peter Levart wrote:
> On 07/05/2013 01:22 AM, David Holmes wrote:
>> Hi Peter,
>>
>> On 2/07/2013 5:19 PM, Peter Levart wrote:
>>> Looking at original code once again, I think this was actually a bug.
>>> The WeakReference instance constructed in (old) line 82, can be GCed
>>> right away, since nobody is using the local variable after assignment.
>>
>> Of course. Doh! I was to busy thinking about the lifetime of the
>> referent object to consider the reference itself.
>>
>>> If WeakReference is GCed it can not be enqueued. The promotion of local
>>> variable into a field is one way to fix this. The other would be to use
>>> the local variable somewhere down the code path, like for example in a
>>> final throw statement:
>>>
>>> 110 throw new IllegalStateException("Reference Handler thread
>>> stuck. weakRef.get(): " + weakRef.get());
>>>
>>>
>>> This would also reveal some more info about the WeakReference when
>>> there's no sure answer after 10 seconds and could be added to the test
>>> anyway.
>>
>> Okay I've modified the test as suggested. Updated webrev at same
>> location:
>>
>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>
>> In testing it though I simply exposed the remaining flaws in the
>> ReferenceHandler code. We can still kill the ReferenceHandler thread
>> with an OOME when it tries to load the Cleaner class (running with a
>> 5M heap triggers this nicely if you use G1):
>>
>> // Fast path for cleaners
>> if (r instanceof Cleaner) {
>> ((Cleaner)r).clean();
>> continue;
>> }
>>
>> and if that passes the clean() might throw OOME (it internally tries
>> to do a System.exit if an exception occurs but will likely encounter
>> another OOME trying to create the PrivilegedAction).
>>
>> Even the:
>>
>> ReferenceQueue q = r.queue;
>> if (q != ReferenceQueue.NULL) q.enqueue(r);
>>
>> might throw OOME because enqueue() might have to load the
>> FinalReference class.
>>
>> So really catching the OOME around the wait() only patches a small
>> hole. We can't simply put a try/catch in the for(;;) loop because that
>> doesn't address the problem that if the class loading throws OOME then
>> subsequent attempts to load that class will also fail. We would have
>> to preload all possible classes. Even then we might just send the
>> ReferenceHandler thread into a busy loop of throwing OOME catching it
>> and retrying!
>>
>> So I can fix the test to deal with the Xcomp issue but we may still
>> see intermittent failures, and the ReferenceHandler thread may still
>> die from OOME.
>
> Hi David,
>
> I think the test is fine now.
>
> Regarding the resilience of ReferenceHandler thread, I think we should
> try to preload FinalReference, Cleaner and InterruptedException in the
> initialization phase of ReferenceHandler thread. There should be no
> danger of OOME in related cases then.
We would need more than that as we need to ensure there is zero
classloading needed at any point where OOME might be thrown. That would
include PrivilegedAction and any transitive closure therefrom.
> As far as Cleaner's exception
> handler is concerned, I think it is not universally wise to just exit
> the VM when any exception is thrown by the Cleaner's thunk.run() method.
> What if that exception is OOME? That does not mean there's something
> wrong with Cleaner.thunk's code. Not only will this kill
> ReferenceHandler thread, but entire VM.
Yes "fatal errors" are not uncommon in the JDK, or at least not
completely rare. The general question is whether continuing might do
more harm than good given that some "critical" action has failed. Hard
to know in general so aborting is fairly common response (ala hotspot
running out of C heap memory).
Thanks,
David
-----
> If the purpose of exiting VM was attracting attention to the possible
> bug in Cleaner.thunk's code, then this absolutely works, but wouldn't
> simple message to System.err be enough? Like for example:
>
>
> public void clean() {
> if (!remove(this))
> return;
> try {
> thunk.run();
> } catch (final Throwable x) {
> try {
> new Error("Cleaner caught exception", x)
> .printStackTrace();
> } catch (OutOfMemoryError oome) {
> // can't do much
> }
> }
> }
>
>
> Regards, Peter
>
>>
>> David
>> -----
>>
>>
>>>
>>> Regards, Peter
>>>
>>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>>> This recently added test was found to fail under some conditions -
>>>> namely client compiler with -Xcomp. It seems that the use of all local
>>>> variables enabled the compiler to optimize things in a way that
>>>> stopped the weakref from being enqueued as expected. Simple fix was to
>>>> make the weakref a field.
>>>>
>>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>>
>>>> Thanks,
>>>> David
>>>
>
From peter.levart at gmail.com Mon Jul 8 07:49:22 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Mon, 08 Jul 2013 09:49:22 +0200
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51DA681C.9010402@oracle.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com> <51DA63B3.8070405@gmail.com>
<51DA681C.9010402@oracle.com>
Message-ID: <51DA6F02.5060600@gmail.com>
On 07/08/2013 09:19 AM, David Holmes wrote:
> Hi Peter,
>
> On 8/07/2013 5:01 PM, Peter Levart wrote:
>> On 07/05/2013 01:22 AM, David Holmes wrote:
>>> Hi Peter,
>>>
>>> On 2/07/2013 5:19 PM, Peter Levart wrote:
>>>> Looking at original code once again, I think this was actually a bug.
>>>> The WeakReference instance constructed in (old) line 82, can be GCed
>>>> right away, since nobody is using the local variable after assignment.
>>>
>>> Of course. Doh! I was to busy thinking about the lifetime of the
>>> referent object to consider the reference itself.
>>>
>>>> If WeakReference is GCed it can not be enqueued. The promotion of
>>>> local
>>>> variable into a field is one way to fix this. The other would be to
>>>> use
>>>> the local variable somewhere down the code path, like for example in a
>>>> final throw statement:
>>>>
>>>> 110 throw new IllegalStateException("Reference Handler
>>>> thread
>>>> stuck. weakRef.get(): " + weakRef.get());
>>>>
>>>>
>>>> This would also reveal some more info about the WeakReference when
>>>> there's no sure answer after 10 seconds and could be added to the test
>>>> anyway.
>>>
>>> Okay I've modified the test as suggested. Updated webrev at same
>>> location:
>>>
>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>
>>> In testing it though I simply exposed the remaining flaws in the
>>> ReferenceHandler code. We can still kill the ReferenceHandler thread
>>> with an OOME when it tries to load the Cleaner class (running with a
>>> 5M heap triggers this nicely if you use G1):
>>>
>>> // Fast path for cleaners
>>> if (r instanceof Cleaner) {
>>> ((Cleaner)r).clean();
>>> continue;
>>> }
>>>
>>> and if that passes the clean() might throw OOME (it internally tries
>>> to do a System.exit if an exception occurs but will likely encounter
>>> another OOME trying to create the PrivilegedAction).
>>>
>>> Even the:
>>>
>>> ReferenceQueue q = r.queue;
>>> if (q != ReferenceQueue.NULL) q.enqueue(r);
>>>
>>> might throw OOME because enqueue() might have to load the
>>> FinalReference class.
>>>
>>> So really catching the OOME around the wait() only patches a small
>>> hole. We can't simply put a try/catch in the for(;;) loop because that
>>> doesn't address the problem that if the class loading throws OOME then
>>> subsequent attempts to load that class will also fail. We would have
>>> to preload all possible classes. Even then we might just send the
>>> ReferenceHandler thread into a busy loop of throwing OOME catching it
>>> and retrying!
>>>
>>> So I can fix the test to deal with the Xcomp issue but we may still
>>> see intermittent failures, and the ReferenceHandler thread may still
>>> die from OOME.
>>
>> Hi David,
>>
>> I think the test is fine now.
>>
>> Regarding the resilience of ReferenceHandler thread, I think we should
>> try to preload FinalReference, Cleaner and InterruptedException in the
>> initialization phase of ReferenceHandler thread. There should be no
>> danger of OOME in related cases then.
>
> We would need more than that as we need to ensure there is zero
> classloading needed at any point where OOME might be thrown. That
> would include PrivilegedAction and any transitive closure therefrom.
Hi David,
I currently don't see any other possibility for another class to be
loaded in the ReferenceHandler's run() method, apart from those that you
indicated and what gets loaded in the the Cleaner.thunk's run() method.
>
>> As far as Cleaner's exception
>> handler is concerned, I think it is not universally wise to just exit
>> the VM when any exception is thrown by the Cleaner's thunk.run() method.
>> What if that exception is OOME? That does not mean there's something
>> wrong with Cleaner.thunk's code. Not only will this kill
>> ReferenceHandler thread, but entire VM.
>
> Yes "fatal errors" are not uncommon in the JDK, or at least not
> completely rare. The general question is whether continuing might do
> more harm than good given that some "critical" action has failed. Hard
> to know in general so aborting is fairly common response (ala hotspot
> running out of C heap memory).
Ok then. if we should stick with terminating the VM, what about the
following "allocation-conservative" Cleaner.clean() method:
private static final class TerminateAction implements
PrivilegedAction {
final Error error = new Error("Cleaner terminated abnormally");
@Override
public Void run() {
try {
if (System.err != null) error.printStackTrace();
} finally {
System.exit(1);
}
return null;
}
}
// pre-allocate single instance of TerminateAction
private static final TerminateAction terminateAction = new
TerminateAction();
/**
* Runs this cleaner, if it has not been run before.
*/
public void clean() {
if (!remove(this))
return;
try {
thunk.run();
} catch (final Throwable x) {
synchronized (terminateAction) {
if (terminateAction.error.getCause() == null)
terminateAction.error.initCause(x);
}
AccessController.doPrivileged(terminateAction);
}
}
Regards, Peter
>
> Thanks,
> David
> -----
>
>> If the purpose of exiting VM was attracting attention to the possible
>> bug in Cleaner.thunk's code, then this absolutely works, but wouldn't
>> simple message to System.err be enough? Like for example:
>>
>>
>> public void clean() {
>> if (!remove(this))
>> return;
>> try {
>> thunk.run();
>> } catch (final Throwable x) {
>> try {
>> new Error("Cleaner caught exception", x)
>> .printStackTrace();
>> } catch (OutOfMemoryError oome) {
>> // can't do much
>> }
>> }
>> }
>>
>>
>> Regards, Peter
>>
>>>
>>> David
>>> -----
>>>
>>>
>>>>
>>>> Regards, Peter
>>>>
>>>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>>>> This recently added test was found to fail under some conditions -
>>>>> namely client compiler with -Xcomp. It seems that the use of all
>>>>> local
>>>>> variables enabled the compiler to optimize things in a way that
>>>>> stopped the weakref from being enqueued as expected. Simple fix
>>>>> was to
>>>>> make the weakref a field.
>>>>>
>>>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>>>
>>>>> Thanks,
>>>>> David
>>>>
>>
From paul.sandoz at oracle.com Mon Jul 8 08:29:32 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Mon, 8 Jul 2013 10:29:32 +0200
Subject: RFR: 8015317: Optional.filter, map, and flatMap
In-Reply-To: <51D73CA5.50005@oracle.com>
References: <51D73CA5.50005@oracle.com>
Message-ID: <5BEF47EB-0D85-44C4-8FA4-3E5B297F1B6D@oracle.com>
On Jul 5, 2013, at 11:37 PM, Henry Jen wrote:
> Hi,
>
> Please review the webrev at
>
> http://cr.openjdk.java.net/~henryjen/ccc/8015317.0/webrev/
>
Looks OK to me.
Paul.
> Which adds following method to Optional,
>
> public static Optional ofNullable(T value) {}
> public Optional filter(Predicate super T> predicate) {}
> public Optional map(Function super T, ? extends U> mapper) {}
> public Optional flatMap(Function super T, ? extends Optional>
> mapper) {}
>
> Also included is some cleanup on javadoc.
>
> Cheers,
> Henry
>
From david.holmes at oracle.com Mon Jul 8 08:37:16 2013
From: david.holmes at oracle.com (David Holmes)
Date: Mon, 08 Jul 2013 18:37:16 +1000
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51DA6F02.5060600@gmail.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com> <51DA63B3.8070405@gmail.com>
<51DA681C.9010402@oracle.com> <51DA6F02.5060600@gmail.com>
Message-ID: <51DA7A3C.8080604@oracle.com>
On 8/07/2013 5:49 PM, Peter Levart wrote:
> On 07/08/2013 09:19 AM, David Holmes wrote:
>>>> In testing it though I simply exposed the remaining flaws in the
>>>> ReferenceHandler code. We can still kill the ReferenceHandler thread
>>>> with an OOME when it tries to load the Cleaner class (running with a
>>>> 5M heap triggers this nicely if you use G1):
>>>>
>>>> // Fast path for cleaners
>>>> if (r instanceof Cleaner) {
>>>> ((Cleaner)r).clean();
>>>> continue;
>>>> }
>>>>
>>>> and if that passes the clean() might throw OOME (it internally tries
>>>> to do a System.exit if an exception occurs but will likely encounter
>>>> another OOME trying to create the PrivilegedAction).
>>>>
>>>> Even the:
>>>>
>>>> ReferenceQueue q = r.queue;
>>>> if (q != ReferenceQueue.NULL) q.enqueue(r);
>>>>
>>>> might throw OOME because enqueue() might have to load the
>>>> FinalReference class.
>>>>
>>>> So really catching the OOME around the wait() only patches a small
>>>> hole. We can't simply put a try/catch in the for(;;) loop because that
>>>> doesn't address the problem that if the class loading throws OOME then
>>>> subsequent attempts to load that class will also fail. We would have
>>>> to preload all possible classes. Even then we might just send the
>>>> ReferenceHandler thread into a busy loop of throwing OOME catching it
>>>> and retrying!
>>>>
>>>> So I can fix the test to deal with the Xcomp issue but we may still
>>>> see intermittent failures, and the ReferenceHandler thread may still
>>>> die from OOME.
>>>
>>> Hi David,
>>>
>>> I think the test is fine now.
>>>
>>> Regarding the resilience of ReferenceHandler thread, I think we should
>>> try to preload FinalReference, Cleaner and InterruptedException in the
>>> initialization phase of ReferenceHandler thread. There should be no
>>> danger of OOME in related cases then.
>>
>> We would need more than that as we need to ensure there is zero
>> classloading needed at any point where OOME might be thrown. That
>> would include PrivilegedAction and any transitive closure therefrom.
>
> Hi David,
>
> I currently don't see any other possibility for another class to be
> loaded in the ReferenceHandler's run() method, apart from those that you
> indicated and what gets loaded in the the Cleaner.thunk's run() method.
Under "normal" conditions all the classes should already be loaded once
VM initialization is complete. It is only with very small heaps that we
can get the problem during VM initialization itself ... in which case
maybe we don't care? Or perhaps that too should be a fatal error? (If a
Cleaner has been registered then Cleaner must already be loaded.)
Anything loaded via the run() method will be handled the enclosing code
in Cleaner.
>>
>>> As far as Cleaner's exception
>>> handler is concerned, I think it is not universally wise to just exit
>>> the VM when any exception is thrown by the Cleaner's thunk.run() method.
>>> What if that exception is OOME? That does not mean there's something
>>> wrong with Cleaner.thunk's code. Not only will this kill
>>> ReferenceHandler thread, but entire VM.
>>
>> Yes "fatal errors" are not uncommon in the JDK, or at least not
>> completely rare. The general question is whether continuing might do
>> more harm than good given that some "critical" action has failed. Hard
>> to know in general so aborting is fairly common response (ala hotspot
>> running out of C heap memory).
>
> Ok then. if we should stick with terminating the VM, what about the
> following "allocation-conservative" Cleaner.clean() method:
Adding a try/finally in the PrivilegedAction.run() would seem to suffice.
David
-----
>
> private static final class TerminateAction implements
> PrivilegedAction {
> final Error error = new Error("Cleaner terminated abnormally");
> @Override
> public Void run() {
> try {
> if (System.err != null) error.printStackTrace();
> } finally {
> System.exit(1);
> }
> return null;
> }
> }
>
> // pre-allocate single instance of TerminateAction
> private static final TerminateAction terminateAction = new
> TerminateAction();
>
> /**
> * Runs this cleaner, if it has not been run before.
> */
> public void clean() {
> if (!remove(this))
> return;
> try {
> thunk.run();
> } catch (final Throwable x) {
> synchronized (terminateAction) {
> if (terminateAction.error.getCause() == null)
> terminateAction.error.initCause(x);
> }
> AccessController.doPrivileged(terminateAction);
> }
> }
>
>
> Regards, Peter
>
>>
>> Thanks,
>> David
>> -----
>>
>>> If the purpose of exiting VM was attracting attention to the possible
>>> bug in Cleaner.thunk's code, then this absolutely works, but wouldn't
>>> simple message to System.err be enough? Like for example:
>>>
>>>
>>> public void clean() {
>>> if (!remove(this))
>>> return;
>>> try {
>>> thunk.run();
>>> } catch (final Throwable x) {
>>> try {
>>> new Error("Cleaner caught exception", x)
>>> .printStackTrace();
>>> } catch (OutOfMemoryError oome) {
>>> // can't do much
>>> }
>>> }
>>> }
>>>
>>>
>>> Regards, Peter
>>>
>>>>
>>>> David
>>>> -----
>>>>
>>>>
>>>>>
>>>>> Regards, Peter
>>>>>
>>>>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>>>>> This recently added test was found to fail under some conditions -
>>>>>> namely client compiler with -Xcomp. It seems that the use of all
>>>>>> local
>>>>>> variables enabled the compiler to optimize things in a way that
>>>>>> stopped the weakref from being enqueued as expected. Simple fix
>>>>>> was to
>>>>>> make the weakref a field.
>>>>>>
>>>>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>>>>
>>>>>> Thanks,
>>>>>> David
>>>>>
>>>
>
From joel.franck at oracle.com Mon Jul 8 09:02:19 2013
From: joel.franck at oracle.com (Joel Borggren-Franck)
Date: Mon, 8 Jul 2013 11:02:19 +0200
Subject: Non Inherited repeated annotations should not be searched from
child Class
In-Reply-To: <51AECBF8.90300@linux.vnet.ibm.com>
References: <51ADED9C.1050105@linux.vent.ibm.com>
<51AECBF8.90300@linux.vnet.ibm.com>
Message-ID: <20130708090219.GA3349@jfranck-desktop.jrpg.bea.com>
Hi,
Thanks for reporting this. As Alex wrote on the spec list [1] he has
clarified the spec.
There is a bug filed for this but I don't have time to work on it
at the moment. I'll get around to fixing it in the not too distant
future though.
[1]: http://mail.openjdk.java.net/pipermail/enhanced-metadata-spec-discuss/2013-June/000214.html
cheers
/Joel
On 2013-06-05, Deven You wrote:
> Hi All,
>
> I didn't see this mail in the mailing list for a long time, so I
> just comment here to ensure everyone can receive this message.
>
> Thanks a lot!
> On 06/04/2013 09:37 PM, Deven You wrote:
> >
> >Hi All,
> >
> >I have written a test case[1] to show this problem. (If it is
> >confirmed a real bug, I will convert this test case to jtreg)
> >
> >My expected output is no any output but OpenJDK returns:
> >
> >@NonInheritedAnnotationRepeated(name=A)
> >@NonInheritedAnnotationRepeated(name=B)
> >
> >The reasons are:
> >
> >1. From the spec, Inherited means:
> >
> >Indicates that an annotation type is automatically inherited. If
> >an Inherited meta-annotation is present on an annotation type
> >declaration, and the user queries the annotation type on a class
> >declaration, and the class declaration has no annotation for this
> >type, then the class's superclass will automatically be queried
> >for the annotation type. This process will be repeated until an
> >annotation for this type is found, or the top of the class
> >hierarchy (Object) is reached. If no superclass has an annotation
> >for this type, then the query will indicate that the class in
> >question has no such annotation.
> >
> >2. For repeated annotations, according to the explanation of 1.,
> >If it is non-inherited, querying Child class of this annotation
> >should return null.
> >
> >3. Now the problem is if the repeated annotation is non-inherited,
> >but its container annotation is inherited, OpenJDK will return the
> >repeated annotations of Parent class if we query the Child class.
> >
> >It seems according to the Inherited semantics, even when container
> >annotation is inherited, we should not retrieve parent class
> >non-inherited repeated annotation from a child class.
> >
> >[1] http://cr.openjdk.java.net/~youdwei/ojdk-810/NonInheritedTest/
> >
>
From chris.hegarty at oracle.com Mon Jul 8 09:09:12 2013
From: chris.hegarty at oracle.com (Chris Hegarty)
Date: Mon, 8 Jul 2013 11:09:12 +0200
Subject: RFR: 8016341 java/lang/ref/OOMEInReferenceHandler.java failing
intermittently
In-Reply-To: <51DA16EC.5070509@oracle.com>
References: <51D25932.7040303@oracle.com> <51D27F05.5020201@gmail.com>
<51D603BD.9050708@oracle.com> <51DA16EC.5070509@oracle.com>
Message-ID: <4D09C4EC-273F-4F4D-9F81-061F8C4CBF83@oracle.com>
On 8 Jul 2013, at 03:33, David Holmes wrote:
> Still looking for a reviewer for this please.
The test change looks ok to me.
-Chris
> Thanks,
> David
>
> On 5/07/2013 9:22 AM, David Holmes wrote:
>> Hi Peter,
>>
>> On 2/07/2013 5:19 PM, Peter Levart wrote:
>>> Looking at original code once again, I think this was actually a bug.
>>> The WeakReference instance constructed in (old) line 82, can be GCed
>>> right away, since nobody is using the local variable after assignment.
>>
>> Of course. Doh! I was to busy thinking about the lifetime of the
>> referent object to consider the reference itself.
>>
>>> If WeakReference is GCed it can not be enqueued. The promotion of local
>>> variable into a field is one way to fix this. The other would be to use
>>> the local variable somewhere down the code path, like for example in a
>>> final throw statement:
>>>
>>> 110 throw new IllegalStateException("Reference Handler thread
>>> stuck. weakRef.get(): " + weakRef.get());
>>>
>>>
>>> This would also reveal some more info about the WeakReference when
>>> there's no sure answer after 10 seconds and could be added to the test
>>> anyway.
>>
>> Okay I've modified the test as suggested. Updated webrev at same location:
>>
>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>
>> In testing it though I simply exposed the remaining flaws in the
>> ReferenceHandler code. We can still kill the ReferenceHandler thread
>> with an OOME when it tries to load the Cleaner class (running with a 5M
>> heap triggers this nicely if you use G1):
>>
>> // Fast path for cleaners
>> if (r instanceof Cleaner) {
>> ((Cleaner)r).clean();
>> continue;
>> }
>>
>> and if that passes the clean() might throw OOME (it internally tries to
>> do a System.exit if an exception occurs but will likely encounter
>> another OOME trying to create the PrivilegedAction).
>>
>> Even the:
>>
>> ReferenceQueue q = r.queue;
>> if (q != ReferenceQueue.NULL) q.enqueue(r);
>>
>> might throw OOME because enqueue() might have to load the FinalReference
>> class.
>>
>> So really catching the OOME around the wait() only patches a small hole.
>> We can't simply put a try/catch in the for(;;) loop because that doesn't
>> address the problem that if the class loading throws OOME then
>> subsequent attempts to load that class will also fail. We would have to
>> preload all possible classes. Even then we might just send the
>> ReferenceHandler thread into a busy loop of throwing OOME catching it
>> and retrying!
>>
>> So I can fix the test to deal with the Xcomp issue but we may still see
>> intermittent failures, and the ReferenceHandler thread may still die
>> from OOME.
>>
>> David
>> -----
>>
>>
>>>
>>> Regards, Peter
>>>
>>> On 07/02/2013 06:38 AM, David Holmes wrote:
>>>> This recently added test was found to fail under some conditions -
>>>> namely client compiler with -Xcomp. It seems that the use of all local
>>>> variables enabled the compiler to optimize things in a way that
>>>> stopped the weakref from being enqueued as expected. Simple fix was to
>>>> make the weakref a field.
>>>>
>>>> http://cr.openjdk.java.net/~dholmes/8016341/webrev/
>>>>
>>>> Thanks,
>>>> David
>>>
From jesper.wilhelmsson at oracle.com Mon Jul 8 10:56:47 2013
From: jesper.wilhelmsson at oracle.com (jesper.wilhelmsson at oracle.com)
Date: Mon, 08 Jul 2013 10:56:47 +0000
Subject: hg: jdk8/tl/jdk: 8010734: NPG: The test MemoryTest.java needs to be
updated to support metaspace
Message-ID: <20130708105700.286CF48890@hg.openjdk.java.net>
Changeset: 715d00c95fb2
Author: ehelin
Date: 2013-07-08 11:30 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/715d00c95fb2
8010734: NPG: The test MemoryTest.java needs to be updated to support metaspace
Reviewed-by: alanb
! test/ProblemList.txt
! test/java/lang/management/MemoryMXBean/MemoryTest.java
From sundararajan.athijegannathan at oracle.com Mon Jul 8 13:31:03 2013
From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com)
Date: Mon, 08 Jul 2013 13:31:03 +0000
Subject: hg: jdk8/tl/nashorn: 20 new changesets
Message-ID: <20130708133120.3DFB54889B@hg.openjdk.java.net>
Changeset: 313bdcd2fd22
Author: sundar
Date: 2013-07-03 00:08 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/313bdcd2fd22
8019629: void operator should always evaluate to undefined
Reviewed-by: jlaskey
! src/jdk/nashorn/internal/codegen/Attr.java
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/ir/RuntimeNode.java
! src/jdk/nashorn/internal/runtime/ScriptRuntime.java
+ test/script/basic/JDK-8019629.js
Changeset: 9d3a9fdab668
Author: sundar
Date: 2013-07-03 13:13 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/9d3a9fdab668
8019783: typeof does not work properly for java methods and foreign objects
Reviewed-by: hannesw
! src/jdk/nashorn/internal/runtime/JSType.java
! src/jdk/nashorn/internal/runtime/ScriptRuntime.java
+ test/script/basic/JDK-8019783.js
+ test/script/basic/JDK-8019783.js.EXPECTED
! test/script/basic/NASHORN-759.js.EXPECTED
Changeset: 4afdc5bec43b
Author: sundar
Date: 2013-07-03 14:08 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/4afdc5bec43b
8019791: ~ is a unary operator
Reviewed-by: hannesw
! src/jdk/nashorn/internal/parser/TokenType.java
+ test/script/basic/JDK-8019791.js
+ test/script/basic/JDK-8019791.js.EXPECTED
Changeset: 18d467e94150
Author: attila
Date: 2013-07-03 12:39 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/18d467e94150
8010946: AccessControl.doPrivileged is broken when called from js script
Reviewed-by: jlaskey, sundar
! make/build.xml
! src/jdk/internal/dynalink/beans/AbstractJavaLinker.java
! src/jdk/internal/dynalink/beans/ApplicableOverloadedMethods.java
+ src/jdk/internal/dynalink/beans/CallerSensitiveDetector.java
+ src/jdk/internal/dynalink/beans/CallerSensitiveDynamicMethod.java
! src/jdk/internal/dynalink/beans/ClassString.java
! src/jdk/internal/dynalink/beans/DynamicMethod.java
! src/jdk/internal/dynalink/beans/DynamicMethodLinker.java
! src/jdk/internal/dynalink/beans/FacetIntrospector.java
! src/jdk/internal/dynalink/beans/MaximallySpecific.java
! src/jdk/internal/dynalink/beans/OverloadedDynamicMethod.java
! src/jdk/internal/dynalink/beans/OverloadedMethod.java
! src/jdk/internal/dynalink/beans/SimpleDynamicMethod.java
+ src/jdk/internal/dynalink/beans/SingleDynamicMethod.java
! src/jdk/internal/dynalink/beans/StaticClassIntrospector.java
! src/jdk/internal/dynalink/beans/StaticClassLinker.java
! src/jdk/internal/dynalink/support/AbstractCallSiteDescriptor.java
! src/jdk/internal/dynalink/support/Lookup.java
! src/jdk/nashorn/internal/runtime/linker/Bootstrap.java
! src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java
! src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java
! src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
+ test/script/basic/JDK-8010946-2.js
+ test/script/basic/JDK-8010946-2.js.EXPECTED
+ test/script/basic/JDK-8010946-privileged.js
+ test/script/basic/JDK-8010946.js
+ test/script/basic/JDK-8010946.js.EXPECTED
Changeset: b1980b5f00a1
Author: lagergren
Date: 2013-07-03 13:03 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/b1980b5f00a1
8019585: Sometimes a var declaration using itself in its init wasn't declared as canBeUndefined, causing erroneous bytecode
Reviewed-by: sundar, attila
! src/jdk/nashorn/api/scripting/NashornException.java
! src/jdk/nashorn/internal/codegen/Attr.java
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/objects/ArrayBufferView.java
! src/jdk/nashorn/internal/objects/Global.java
! src/jdk/nashorn/internal/objects/NativeError.java
! src/jdk/nashorn/internal/objects/NativeFloat32Array.java
! src/jdk/nashorn/internal/objects/NativeFloat64Array.java
! src/jdk/nashorn/internal/objects/NativeFunction.java
! src/jdk/nashorn/internal/objects/NativeInt16Array.java
! src/jdk/nashorn/internal/objects/NativeInt32Array.java
! src/jdk/nashorn/internal/objects/NativeInt8Array.java
! src/jdk/nashorn/internal/objects/NativeJava.java
! src/jdk/nashorn/internal/objects/NativeObject.java
! src/jdk/nashorn/internal/objects/NativeRegExp.java
! src/jdk/nashorn/internal/objects/NativeUint16Array.java
! src/jdk/nashorn/internal/objects/NativeUint32Array.java
! src/jdk/nashorn/internal/objects/NativeUint8Array.java
! src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
! src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
! src/jdk/nashorn/internal/runtime/arrays/ObjectArrayData.java
+ test/script/basic/JDK-8019585.js
Changeset: eb1437d16ab4
Author: sundar
Date: 2013-07-03 17:26 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/eb1437d16ab4
8019805: for each (init; test; modify) is invalid
Reviewed-by: lagergren, jlaskey
! src/jdk/nashorn/internal/parser/Parser.java
! src/jdk/nashorn/internal/runtime/resources/Messages.properties
+ test/script/basic/JDK-8019805.js
+ test/script/basic/JDK-8019805.js.EXPECTED
! test/script/basic/forin.js
! test/script/basic/forin.js.EXPECTED
Changeset: 961cffae0828
Author: lagergren
Date: 2013-07-03 15:46 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/961cffae0828
8019811: Static calls - self referential functions needed a return type conversion if they were specialized, as they can't use the same mechanism as indy calls
Reviewed-by: sundar, jlaskey
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! test/script/basic/JDK-8016667.js
+ test/script/basic/JDK-8019808.js
+ test/script/basic/JDK-8019810.js
+ test/script/basic/JDK-8019810.js.EXPECTED
+ test/script/basic/JDK-8019811.js
+ test/script/basic/JDK-8019817.js
+ test/script/currently-failing/JDK-8019809.js
Changeset: fcb484c43348
Author: sundar
Date: 2013-07-03 19:20 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/fcb484c43348
8019814: Add regression test for passing cases
Reviewed-by: jlaskey, lagergren
! src/jdk/nashorn/internal/runtime/ListAdapter.java
+ test/script/basic/JDK-8019814.js
+ test/script/basic/JDK-8019814.js.EXPECTED
Changeset: 29b2b2ed954c
Author: attila
Date: 2013-07-03 18:10 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/29b2b2ed954c
8017768: allow dot as inner class name separator for Java.type
Reviewed-by: jlaskey, sundar
! docs/JavaScriptingProgrammersGuide.html
! src/jdk/nashorn/internal/objects/NativeJava.java
+ test/script/basic/JDK-8017768.js
+ test/script/basic/JDK-8017768.js.EXPECTED
! test/src/jdk/nashorn/test/models/OuterClass.java
Changeset: 7b072ebdf5aa
Author: jlaskey
Date: 2013-07-03 13:41 -0300
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/7b072ebdf5aa
8011629: Object.defineProperty performance issue
Reviewed-by: sundar, attila
Contributed-by: james.laskey at oracle.com
! src/jdk/nashorn/internal/runtime/AccessorProperty.java
Changeset: ad6b18ee4666
Author: attila
Date: 2013-07-04 14:10 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/ad6b18ee4666
8019809: return after break incorrectly sets the block as terminal
Reviewed-by: jlaskey, lagergren
! src/jdk/nashorn/internal/codegen/Lower.java
! src/jdk/nashorn/internal/ir/BlockLexicalContext.java
+ test/script/basic/JDK-8019809.js
- test/script/currently-failing/JDK-8019809.js
Changeset: be2087629eb9
Author: lagergren
Date: 2013-07-04 17:27 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/be2087629eb9
8019821: allInteger switches were confused by boolean cases, as they are a narrower type than int
Reviewed-by: sundar, hannesw
! src/jdk/nashorn/internal/codegen/Attr.java
+ test/script/basic/JDK-8019821.js
Changeset: 8c4a6d9b8a23
Author: lagergren
Date: 2013-07-04 17:28 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/8c4a6d9b8a23
Merge
- test/script/currently-failing/JDK-8019809.js
Changeset: ec84ba68ad39
Author: sundar
Date: 2013-07-05 14:38 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/ec84ba68ad39
8019947: inherited property invalidation does not work with two globals in same context
Reviewed-by: jlaskey, lagergren, hannesw, attila
! make/build-nasgen.xml
! make/build.xml
! src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/objects/AccessorPropertyDescriptor.java
! src/jdk/nashorn/internal/objects/ArrayBufferView.java
! src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java
! src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java
! src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java
! src/jdk/nashorn/internal/objects/Global.java
! src/jdk/nashorn/internal/objects/NativeArguments.java
! src/jdk/nashorn/internal/objects/NativeArray.java
! src/jdk/nashorn/internal/objects/NativeArrayBuffer.java
! src/jdk/nashorn/internal/objects/NativeBoolean.java
! src/jdk/nashorn/internal/objects/NativeDate.java
! src/jdk/nashorn/internal/objects/NativeDebug.java
! src/jdk/nashorn/internal/objects/NativeError.java
! src/jdk/nashorn/internal/objects/NativeEvalError.java
! src/jdk/nashorn/internal/objects/NativeFloat32Array.java
! src/jdk/nashorn/internal/objects/NativeFloat64Array.java
! src/jdk/nashorn/internal/objects/NativeFunction.java
! src/jdk/nashorn/internal/objects/NativeInt16Array.java
! src/jdk/nashorn/internal/objects/NativeInt32Array.java
! src/jdk/nashorn/internal/objects/NativeInt8Array.java
! src/jdk/nashorn/internal/objects/NativeJSAdapter.java
! src/jdk/nashorn/internal/objects/NativeJSON.java
! src/jdk/nashorn/internal/objects/NativeJava.java
! src/jdk/nashorn/internal/objects/NativeJavaImporter.java
! src/jdk/nashorn/internal/objects/NativeMath.java
! src/jdk/nashorn/internal/objects/NativeNumber.java
! src/jdk/nashorn/internal/objects/NativeObject.java
! src/jdk/nashorn/internal/objects/NativeRangeError.java
! src/jdk/nashorn/internal/objects/NativeReferenceError.java
! src/jdk/nashorn/internal/objects/NativeRegExp.java
! src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
! src/jdk/nashorn/internal/objects/NativeStrictArguments.java
! src/jdk/nashorn/internal/objects/NativeString.java
! src/jdk/nashorn/internal/objects/NativeSyntaxError.java
! src/jdk/nashorn/internal/objects/NativeTypeError.java
! src/jdk/nashorn/internal/objects/NativeURIError.java
! src/jdk/nashorn/internal/objects/NativeUint16Array.java
! src/jdk/nashorn/internal/objects/NativeUint32Array.java
! src/jdk/nashorn/internal/objects/NativeUint8Array.java
! src/jdk/nashorn/internal/objects/NativeUint8ClampedArray.java
! src/jdk/nashorn/internal/objects/PrototypeObject.java
! src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
! src/jdk/nashorn/internal/runtime/Context.java
! src/jdk/nashorn/internal/runtime/GlobalFunctions.java
! src/jdk/nashorn/internal/runtime/GlobalObject.java
! src/jdk/nashorn/internal/runtime/ScriptObject.java
! src/jdk/nashorn/internal/runtime/StructureLoader.java
! src/jdk/nashorn/internal/scripts/JO.java
! src/jdk/nashorn/tools/Shell.java
+ test/script/basic/JDK-8019947.js
+ test/script/basic/JDK-8019947.js.EXPECTED
Changeset: edca88d3a03e
Author: hannesw
Date: 2013-07-05 14:36 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/edca88d3a03e
8017084: Use spill properties for large object literals
Reviewed-by: lagergren, sundar
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/codegen/FieldObjectCreator.java
! src/jdk/nashorn/internal/codegen/FinalizeTypes.java
! src/jdk/nashorn/internal/codegen/MapCreator.java
! src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java
! src/jdk/nashorn/internal/codegen/ObjectCreator.java
+ src/jdk/nashorn/internal/codegen/SpillObjectCreator.java
! src/jdk/nashorn/internal/ir/FunctionNode.java
! src/jdk/nashorn/internal/ir/LiteralNode.java
! src/jdk/nashorn/internal/ir/debug/JSONWriter.java
! src/jdk/nashorn/internal/objects/NativeArguments.java
! src/jdk/nashorn/internal/objects/NativeStrictArguments.java
! src/jdk/nashorn/internal/objects/PrototypeObject.java
! src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
! src/jdk/nashorn/internal/parser/Parser.java
! src/jdk/nashorn/internal/runtime/AccessorProperty.java
! src/jdk/nashorn/internal/runtime/PropertyMap.java
! src/jdk/nashorn/internal/runtime/ScriptObject.java
! src/jdk/nashorn/internal/scripts/JO.java
+ test/script/basic/JDK-8017084.js
+ test/script/basic/JDK-8017084.js.EXPECTED
Changeset: ce9cbe70f915
Author: attila
Date: 2013-07-05 15:10 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/ce9cbe70f915
8019819: scope symbol didn't get a slot in certain cases
Reviewed-by: hannesw, jlaskey, lagergren, sundar
! src/jdk/nashorn/internal/codegen/Attr.java
! src/jdk/nashorn/internal/codegen/CodeGenerator.java
! src/jdk/nashorn/internal/codegen/CompilationPhase.java
! src/jdk/nashorn/internal/codegen/FinalizeTypes.java
! src/jdk/nashorn/internal/ir/FunctionNode.java
! src/jdk/nashorn/internal/ir/LexicalContext.java
! src/jdk/nashorn/internal/ir/Symbol.java
! src/jdk/nashorn/internal/parser/Parser.java
+ test/script/basic/JDK-8019819.js
Changeset: 20b2c2dc20e8
Author: lagergren
Date: 2013-07-05 19:35 +0200
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/20b2c2dc20e8
8019983: Void returns combined with return with expression picked the wrong return type
Reviewed-by: sundar, jlaskey
! src/jdk/nashorn/internal/codegen/Attr.java
+ test/script/basic/JDK-8019983.js
+ test/script/basic/JDK-8019983.js.EXPECTED
Changeset: 36d6b6a3fbe0
Author: sundar
Date: 2013-07-08 16:33 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/36d6b6a3fbe0
8020015: shared PropertyMaps should not be used without duplication
Reviewed-by: hannesw, attila
! buildtools/nasgen/build.xml
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java
! buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/StringConstants.java
! make/code_coverage.xml
! make/project.properties
! src/jdk/nashorn/internal/lookup/Lookup.java
! src/jdk/nashorn/internal/objects/ArrayBufferView.java
! src/jdk/nashorn/internal/objects/Global.java
! src/jdk/nashorn/internal/objects/NativeArguments.java
! src/jdk/nashorn/internal/objects/NativeBoolean.java
! src/jdk/nashorn/internal/objects/NativeDebug.java
! src/jdk/nashorn/internal/objects/NativeError.java
! src/jdk/nashorn/internal/objects/NativeJSAdapter.java
! src/jdk/nashorn/internal/objects/NativeJSON.java
! src/jdk/nashorn/internal/objects/NativeMath.java
! src/jdk/nashorn/internal/objects/NativeStrictArguments.java
! src/jdk/nashorn/internal/objects/PrototypeObject.java
! src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java
! src/jdk/nashorn/internal/runtime/AccessorProperty.java
! src/jdk/nashorn/internal/runtime/Context.java
! src/jdk/nashorn/internal/runtime/PropertyListenerManager.java
! src/jdk/nashorn/internal/runtime/PropertyMap.java
! src/jdk/nashorn/internal/runtime/ScriptEnvironment.java
! src/jdk/nashorn/internal/runtime/ScriptObject.java
! src/jdk/nashorn/internal/runtime/resources/Options.properties
! src/jdk/nashorn/internal/scripts/JO.java
! src/jdk/nashorn/tools/Shell.java
Changeset: a75e75cc6a61
Author: sundar
Date: 2013-07-08 18:36 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/a75e75cc6a61
8020035: nashorn jdk buildfile BuildNashorn.gmk still renamed jdk.nashorn.internal.objects package
Reviewed-by: attila, jlaskey
! makefiles/BuildNashorn.gmk
Changeset: c96745616167
Author: sundar
Date: 2013-07-08 18:43 +0530
URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/c96745616167
Merge
From paul.sandoz at oracle.com Mon Jul 8 15:22:39 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Mon, 8 Jul 2013 17:22:39 +0200
Subject: RFR 8019395 Consolidate StreamSupport.{stream,
parallelStream} into a single method
Message-ID:
Hi,
This patch reduced the methods on j.u.stream.StreamSupport from 16 to 8:
http://cr.openjdk.java.net/~psandoz/tl/JDK-8019395-StreamSupport/webrev/
Instead of methods stream/parallelStream, and inStream/intParallelStream etc, there is just stream, and intStream etc, that take a boolean value controlling whether the stream is parallel or sequential.
There are lots of small changes to source due to the refactoring (most which was done automatically).
Paul.
From dl at cs.oswego.edu Mon Jul 8 15:24:15 2013
From: dl at cs.oswego.edu (Doug Lea)
Date: Mon, 08 Jul 2013 11:24:15 -0400
Subject: Possible HashMap update
In-Reply-To: <51D4ABDA.7010801@cs.oswego.edu>
References: <51D4ABDA.7010801@cs.oswego.edu>
Message-ID: <51DAD99F.9030705@cs.oswego.edu>
On 07/05/13 04:55, Paul Sandoz wrote:
>> I played with these in the lambda repo.
>>
>> I needed to make the following additional change for things to compile:
>>
>> --- a/src/share/classes/java/io/ExpiringCache.java Fri Jul 05 10:04:00 2013 +0200
>> +++ b/src/share/classes/java/io/ExpiringCache.java Fri Jul 05 10:45:10 2013 +0200
>> ...
Thanks to those chasing this down, now recorded as a CR at:
http://bugs.sun.com/view_bug.do?bug_id=8017219
Some might think this is a fun javac corner case to read about,
but for present purposes, the moral is that the name of
the internal LinkedHashMap.Entry class, even though it is never
exported, cannot be changed without impacting re-compilability of
some external usages. Fine. We can cope.
For people still following along, see updates at...
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/HashMap.java?view=log
http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/LinkedHashMap.java?view=log
From paul.sandoz at oracle.com Mon Jul 8 15:56:02 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Mon, 8 Jul 2013 17:56:02 +0200
Subject: RFR 8020040: Improve and generalize the F/J tasks to handle right or
left-balanced trees
Message-ID: <290509C5-9C6C-47AC-AF73-F80D3816942A@oracle.com>
Hi,
This patch, contributed by Doug Lea, improves stream resource management of F/J tasks when processing right-balanced (or more accurately right-heavy) trees (e.g. those created from sequential sources):
http://cr.openjdk.java.net/~psandoz/tl/JDK-8020040-tasks/webrev/
It took us a while but the end result is remarkably simple: alternate the forking of left and right tasks.
Large or infinite stream sources hooked up a short-circuiting operation such as limit no longer consume ridiculous amounts of memory.
This patch is related to a previous one Henry sent for review (remove catching of OOMEs for splterators from sequential sources)
Paul.
From dlloyd at redhat.com Tue Jul 2 13:55:15 2013
From: dlloyd at redhat.com (David M. Lloyd)
Date: Tue, 02 Jul 2013 08:55:15 -0500
Subject: @CallerSensitive as public API ?
In-Reply-To: <51CA1CE3.6050203@oracle.com>
References: <51C9760F.7000007@gmail.com> <51C9EE5B.8050300@oracle.com>
<51CA1CE3.6050203@oracle.com>
Message-ID: <51D2DBC3.6080403@redhat.com>
On 6/25/13 5:42 PM, Mandy Chung wrote:
> On 6/25/13 3:04 PM, David Lloyd wrote:
>> We have a use case within our security manager implementation that
>> *can* be solved with the existing getClassContext method, which
>> returns the whole stack, except we don't *need* the whole stack, just
>> one specific frame. Maybe SecurityManager is a good place for this API?
>
> Which frame do you need? How do you use it?
Typically it's the frame belonging to whomever called the method on the
class. So it's not a search situation, it's a constant offset.
>> As an aside, getClassContext returns a Class[]; maybe it should be
>> changed to Class>[] instead.
>
> Ah. I can fix that in my fix for 8007035 [1].
>
> Mandy
> [1]
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018327.html
>> --
>> - DML
>>
>>
>> On Jun 25, 2013, at 8:35 PM, Mandy Chung wrote:
>>
>>> On 6/25/13 3:50 AM, Peter Levart wrote:
>>>> Hi,
>>>>
>>>> I know that @CallerSensitive annotation was introduced to bring some
>>>> order to JDK internal plumbings. It's scope was to support JDK
>>>> internal usage, so it's use is limited to classes loaded by
>>>> bootstrap or extension class-loaders. In JDK-internal code it is
>>>> used mainly for implementing security-sensitive decisions. But since
>>>> the sun.reflect.Reflection.getCallerClass(int) was public and
>>>> unrestricted, it found it's way out into user code, where at least I
>>>> know that it is used in two areas:
>>>>
>>>> 1 - to locate callers in the whole call-stack so that their location
>>>> in class-path can be reported (Log4J is an example)
>>>> 2 - to locate immediate caller so that some resources associated
>>>> with it can be located and used (for example localization data in
>>>> GUI applications)
>>>>
>>>> I don't know how wide-spread 1st usecase is, but the 2nd is common,
>>>> since it's use enables APIs that need not explicitly pass-in the
>>>> calling class in order to locate resources associated with it
>>>> (and/or the class-loader of it). So it would be nice to have such
>>>> supported API in JDK8 at least.
>>> It's good to know these use cases. We leave the method in 7 update
>>> release so as to allow time for applications to transition and also
>>> determine any use case that the SE API should provide if there is no
>>> replacement for it.
>>>
>>>> I'm asking here, to hear any arguments against making such API
>>>> supported and public. Are there any security or other issues? If
>>>> there aren't, what steps should be taken to introduce such API in
>>>> the JDK8 timeframe? I'm thinking of a no-arg method, say
>>>> j.l.Class.getCaller() and moving @CallerSensitive to a supported
>>>> package + enabling it to mark methods in any class (not just system
>>>> and ext classes)...
>>> Besides providing a method returning the caller's class, I'd like to
>>> consider what other options we have and different use cases could be
>>> satisfied by different API. For #2, the problem is that the API to
>>> find a resource, it requires to use the ClassLoader with the right
>>> visibility (the caller's class loader). This is similiar to 8013839
>>> : Enhance Logger API for handling of resource bundles [1]. For
>>> example, a static method Class.getResource to use the caller's class
>>> loader to find the given resource might be an alternative?
>>>
>>> About the timeframe, the API freeze date [2] is Oct 10. If the API
>>> is simple and small effort (test development, security assessement,
>>> etc), there is chance to get that in for jdk8.
>>>
>>> Mandy
>>> [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8013839
>>> [2]
>>> http://openjdk.java.net/projects/jdk8/milestones#API_Interface_Freeze
>>>
>
--
- DML
From feng.l.liu at oracle.com Mon Jul 8 06:35:22 2013
From: feng.l.liu at oracle.com (feng l.liu)
Date: Mon, 08 Jul 2013 14:35:22 +0800
Subject: PermGen leak
Message-ID: <51DA5DAA.8020204@oracle.com>
Hello Experts,
I am building up a test tool with ant, but I encountered so many
DelegatingClassLoaders that put pressures on PermGen. I know that
DelegatingClassLoaders are caused by java reflection.
Google search show some posts indicating generation of
DelegatingClassLoader will be depressed if
sun.reflect.inflationThreshold to zero , I tried it and found that this
idea did not work at all. I dived into the code and found the snippets
as below:
It looks that the DelegatingClassLoader will go away if I set
sun.reflect.noInflation = true and sun.reflect.inflationThreshold to
Integer.MAX_VALUE. I tried it again but this idea did not work as well.
can you please give me some advices on this leak?
thank you in advance
ReflectionFactory.java
String val =
System.getProperty("sun.reflect.noInflation");
if (val != null && val.equals("true")) {
noInflation = true;
}
val =
System.getProperty("sun.reflect.inflationThreshold");
if (val != null) {
try {
inflationThreshold = Integer.parseInt(val);
} catch (NumberFormatException e) {
throw (RuntimeException)
new RuntimeException("Unable to parse
property sun.reflect.inflationThreshold").
initCause(e);
}
}
initted = true;
return null;
}
NativeMethodAccessorImpl.java
public Object invoke(Object obj, Object[] args)
throws IllegalArgumentException, InvocationTargetException
{
if (++numInvocations > ReflectionFactory.inflationThreshold()) {
MethodAccessorImpl acc = (MethodAccessorImpl)
new MethodAccessorGenerator().
generateMethod(method.getDeclaringClass(),
method.getName(),
method.getParameterTypes(),
method.getReturnType(),
method.getExceptionTypes(),
method.getModifiers());
parent.setDelegate(acc);
}
return invoke0(method, obj, args);
}
Best regards
From ivan.gerasimov at oracle.com Mon Jul 8 16:55:47 2013
From: ivan.gerasimov at oracle.com (Ivan Gerasimov)
Date: Mon, 08 Jul 2013 20:55:47 +0400
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51D6B1ED.9090709@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
<51D6A59A.1060703@oracle.com> <51D6B1ED.9090709@oracle.com>
Message-ID: <51DAEF13.8010000@oracle.com>
Thanks, Se?n!
I located the build in which the memleak was first introduced -- it is
jdk8-b69 (hs25-b13).
I've updated the bug http://bugs.sun.com/view_bug.do?bug_id=8019845 with
this.
So what is the correct procedure to go forward now?
Should I update the webrev to include changes to the problem list?
I believe I shouldn't -- this list seems to be a sensitive stuff.
Sincerely yours,
Ivan
On 05.07.2013 15:45, Se?n Coffey wrote:
> Nice work indeed Ivan. Good to have a reliable testcase to catch leaks
> in this area.
>
> I'd also suggest that this test goes on the ProblemList until the new
> leak is sorted out for jdk8. The goal of JPRT runs is to have clean
> runs. If it's on the problemList, then it's a known issue and is
> normally tagged with the relevant bug ID so that the responsible
> engineer knows the current state.
>
> regards,
> Sean.
>
> On 05/07/2013 11:53, Ivan Gerasimov wrote:
>>
>> On 05.07.2013 8:35, Daniel D. Daugherty wrote:
>>> Ivan,
>>>
>>> The changes look fine, I can sponsor your commit, looks like your
>>> OpenJDK user name is 'igerasim', but I need to know a little bit
>>> more about your testing of these fixes. Did you do a test JPRT
>>> job to run the JLI tests (or just the two tests themselves)?
>>>
>> I've only run test from java/lang/instrument when checked the change
>> with JDK6u60 (all passed) and with JDK6u51 (the test failed as
>> expected, since the leak had still been there.)
>>
>>> Based on e-mail about this bug fix, I believe you've found a new
>>> leak in JDK8/HSX-25 with test java/lang/instrument/RedefineBigClass.sh.
>> Right. The test shown a memleak with the the latest jdk8.
>> I filed a bug 8019845 about this leak.
>> Stefan Karlsson guessed that this may be related to 8003419 (NPG:
>> Clean up metadata created during class loading if failure)
>> Then I've checked the builds b57 (test failed) and b58 (test passed),
>> so I confirmed that it may be the reason of the leak being observed now.
>> But now I think that the reason may be different.
>> It just turns out that the test shows failures for (at least) three
>> different leaks - the one you, Daniel, solved (7121600), the one
>> Stefan wrote about (8003419) and the one currently observed (8019845).
>>
>>> That's a good thing, but I think Alan and company would be a bit
>>> grumpy with me if I pushed a test that failed as soon as someone
>>> ran it. :-) Do you know if the revised RetransformBigClass.sh also
>>> finds a new memory leak in JDK8/HSX-25?
>>>
>>> The way to deal with that is to put the test on the Problem.list
>>> as part of the same changeset. However, the T&L folks might not like
>>> that either...
>>
>> Well, the leak is there, and why not have a failing test as a
>> reminder to have it fixed?
>>
>> Sincerely yours,
>> Ivan Gerasimov
>>
>>>
>>> Dan
>>>
>>>
>>> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>>>> Thank you, Daniel!
>>>>
>>>> Please find an updated webrev at
>>>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>>>> It now includes the RetransformBigClass test modified in the same
>>>> way as RedefineBigClass
>>>> If the changes look fine, may I ask you to sponsor the commit, as
>>>> I'm not a committer?
>>>> Here's a link to hg export:
>>>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>>>
>>>>
>>>> Thanks in advance,
>>>> Ivan
>>>>
>>>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>>>> Daniel, thank you for review!
>>>>>>
>>>>>> Here's the updated with all all your suggestions adopted.
>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>>>
>>>>> Looks good.
>>>>>
>>>>>
>>>>>>
>>>>>> I haven't yet considered applying the approach to
>>>>>> RetransformBigClass.
>>>>>> Do you want me to include this into this same change set or
>>>>>> should I make it separately?
>>>>>
>>>>> I would include it in the same changeset.
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>>
>>>>>> Sincerely yours,
>>>>>> Ivan
>>>>>>
>>>>>>
>>>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>>>> Hello everybody!
>>>>>>>>
>>>>>>>> We have a request to improve jtreg test.
>>>>>>>> The test had been written to verify fix for memory leak during
>>>>>>>> class redefinition.
>>>>>>>> The problem is that it always is reported as PASSED even in the
>>>>>>>> presence of the leak.
>>>>>>>>
>>>>>>>> The proposed change is platform specific.
>>>>>>>> It allows memory leak detection only on Linux.
>>>>>>>> This is because the memory leak was in native code, so there's
>>>>>>>> no easy way to detect it from within Java code.
>>>>>>>>
>>>>>>>> Here's the webrev for JDK8 repository:
>>>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>>>
>>>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>>>> leak big enough to cause an Exception to be thrown.
>>>>>>>
>>>>>>> When I originally wrote this test and its companion:
>>>>>>>
>>>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>>>
>>>>>>> I could not come up with a platform independent way to put a small
>>>>>>> upper limit on memory growth. It never dawned on me that putting in
>>>>>>> something on one platform (Linux) was better than nothing.
>>>>>>>
>>>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>>>> No comments.
>>>>>>>
>>>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>>>> Would be better at the top of RedefineBigClassApp rather
>>>>>>> than
>>>>>>> "buried" down here.
>>>>>>>
>>>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>>>> There are several places where a long is passed to
>>>>>>> Long.valueOf().
>>>>>>> Is there some reason you're not passing them directly to
>>>>>>> println()?
>>>>>>>
>>>>>>> line 54: } else {
>>>>>>> The "else" is redundant due to the "System.exit(1)" call
>>>>>>> above it.
>>>>>>> You can drop the "else {" and "}" and shift that last
>>>>>>> println() to
>>>>>>> the left.
>>>>>>>
>>>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>>>> How about at least a comment referring to the Linux proc(5)
>>>>>>> man page... and the fact that the 23rd field is:
>>>>>>>
>>>>>>> vsize %lu Virtual memory size in bytes.
>>>>>>>
>>>>>>> Again, very nicely done!
>>>>>>>
>>>>>>> Dan
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> The surprising thing is that modified test detected the leak
>>>>>>>> with the latest JDK8!
>>>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>>>
>>>>>>>> I've filled a bug
>>>>>>>> http://bugs.sun.com/view_bug.do?bug_id=8019845 "Memory leak
>>>>>>>> during class redefenition" (not yet available.)
>>>>>>>>
>>>>>>>> Sincerely yours,
>>>>>>>> Ivan Gerasimov
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
From bill.pittore at oracle.com Mon Jul 8 16:56:06 2013
From: bill.pittore at oracle.com (BILL PITTORE)
Date: Mon, 08 Jul 2013 12:56:06 -0400
Subject: RFR - Changes to address CCC 8014135: Support for statically
linked agents
In-Reply-To: <51D5A5CD.2070805@oracle.com>
References: <51D494E9.2020200@oracle.com> <51D5A5CD.2070805@oracle.com>
Message-ID: <51DAEF26.5030204@oracle.com>
On 7/4/2013 12:41 PM, Alan Bateman wrote:
> On 03/07/2013 22:17, BILL PITTORE wrote:
>> These changes address bug 8014135 which adds support for statically
>> linked agents in the VM. This is a followup to the recent JNI spec
>> changes that addressed statically linked JNI libraries( 8005716).
>> The JEP for this change is the same JEP as the JNI changes:
>> http://openjdk.java.net/jeps/178
>>
>> Webrevs are here:
>>
>> http://cr.openjdk.java.net/~bpittore/8014135/jdk/webrev.00/
>
> I looked at the javadoc updates to the attach API.
>
> One thing that doesn't come across very clearly is the mapping from
> the agentLibrary parameter to "agent-lib-name". I think that needs a
> few words so that it's clear that it is not literally looking for
> "Agent_OnAttach_agent-lib-name" but rather "Agent_OnAttach" +
> where is the library name in the
> agentLibrary parameter.
>
> As I recall, the JVM Tool Interface is supposed to be referred so as
> "JVM TI" rather than "JVMTI".
Ok, I'll try to re-word it and send it out again.
bill
>
> Otherwise it looks okay to me.
>
> -Alan
>
>
>
>
From paul.sandoz at oracle.com Mon Jul 8 17:11:19 2013
From: paul.sandoz at oracle.com (Paul Sandoz)
Date: Mon, 8 Jul 2013 19:11:19 +0200
Subject: RFR 8019395 Consolidate StreamSupport.{stream,
parallelStream} into a single method
In-Reply-To:
References:
Message-ID: <907C289C-4F81-47D9-80FF-48B0041EE893@oracle.com>
I updated the patch and fixed JavaDoc issues to StreamSupport based on feedback from Henry.
Changes can be seen here:
http://hg.openjdk.java.net/lambda/lambda/jdk/rev/be7d33d54613
Paul.
On Jul 8, 2013, at 5:22 PM, Paul Sandoz wrote:
> Hi,
>
> This patch reduced the methods on j.u.stream.StreamSupport from 16 to 8:
>
> http://cr.openjdk.java.net/~psandoz/tl/JDK-8019395-StreamSupport/webrev/
>
> Instead of methods stream/parallelStream, and inStream/intParallelStream etc, there is just stream, and intStream etc, that take a boolean value controlling whether the stream is parallel or sequential.
>
> There are lots of small changes to source due to the refactoring (most which was done automatically).
>
> Paul.
From sean.coffey at oracle.com Mon Jul 8 17:27:56 2013
From: sean.coffey at oracle.com (=?UTF-8?B?U2XDoW4gQ29mZmV5?=)
Date: Mon, 08 Jul 2013 18:27:56 +0100
Subject: RFR [8016838] java/lang/instrument/RedefineBigClass.sh needs
modification
In-Reply-To: <51DAEF13.8010000@oracle.com>
References: <51D45B8C.7010109@oracle.com> <51D595ED.7050902@oracle.com>
<51D5AEB6.3060608@oracle.com> <51D5B4C5.7060402@oracle.com>
<51D61A66.5010001@oracle.com> <51D64D15.2090105@oracle.com>
<51D6A59A.1060703@oracle.com> <51D6B1ED.9090709@oracle.com>
<51DAEF13.8010000@oracle.com>
Message-ID: <51DAF69C.3000404@oracle.com>
On 08/07/13 17:55, Ivan Gerasimov wrote:
> Thanks, Se?n!
>
> I located the build in which the memleak was first introduced -- it is
> jdk8-b69 (hs25-b13).
> I've updated the bug http://bugs.sun.com/view_bug.do?bug_id=8019845
> with this.
>
> So what is the correct procedure to go forward now?
> Should I update the webrev to include changes to the problem list?
> I believe I shouldn't -- this list seems to be a sensitive stuff.
I'd suggest updating the webrev with the ProblemList
modification/addition. It's best not to add a test to testruns if it's
knowingly failing. The test can be removed from ProblemList when the
jdk8 regression is fixed.
regards,
Sean.
>
> Sincerely yours,
> Ivan
>
>
> On 05.07.2013 15:45, Se?n Coffey wrote:
>> Nice work indeed Ivan. Good to have a reliable testcase to catch
>> leaks in this area.
>>
>> I'd also suggest that this test goes on the ProblemList until the new
>> leak is sorted out for jdk8. The goal of JPRT runs is to have clean
>> runs. If it's on the problemList, then it's a known issue and is
>> normally tagged with the relevant bug ID so that the responsible
>> engineer knows the current state.
>>
>> regards,
>> Sean.
>>
>> On 05/07/2013 11:53, Ivan Gerasimov wrote:
>>>
>>> On 05.07.2013 8:35, Daniel D. Daugherty wrote:
>>>> Ivan,
>>>>
>>>> The changes look fine, I can sponsor your commit, looks like your
>>>> OpenJDK user name is 'igerasim', but I need to know a little bit
>>>> more about your testing of these fixes. Did you do a test JPRT
>>>> job to run the JLI tests (or just the two tests themselves)?
>>>>
>>> I've only run test from java/lang/instrument when checked the change
>>> with JDK6u60 (all passed) and with JDK6u51 (the test failed as
>>> expected, since the leak had still been there.)
>>>
>>>> Based on e-mail about this bug fix, I believe you've found a new
>>>> leak in JDK8/HSX-25 with test
>>>> java/lang/instrument/RedefineBigClass.sh.
>>> Right. The test shown a memleak with the the latest jdk8.
>>> I filed a bug 8019845 about this leak.
>>> Stefan Karlsson guessed that this may be related to 8003419 (NPG:
>>> Clean up metadata created during class loading if failure)
>>> Then I've checked the builds b57 (test failed) and b58 (test
>>> passed), so I confirmed that it may be the reason of the leak being
>>> observed now.
>>> But now I think that the reason may be different.
>>> It just turns out that the test shows failures for (at least) three
>>> different leaks - the one you, Daniel, solved (7121600), the one
>>> Stefan wrote about (8003419) and the one currently observed (8019845).
>>>
>>>> That's a good thing, but I think Alan and company would be a bit
>>>> grumpy with me if I pushed a test that failed as soon as someone
>>>> ran it. :-) Do you know if the revised RetransformBigClass.sh also
>>>> finds a new memory leak in JDK8/HSX-25?
>>>>
>>>> The way to deal with that is to put the test on the Problem.list
>>>> as part of the same changeset. However, the T&L folks might not like
>>>> that either...
>>>
>>> Well, the leak is there, and why not have a failing test as a
>>> reminder to have it fixed?
>>>
>>> Sincerely yours,
>>> Ivan Gerasimov
>>>
>>>>
>>>> Dan
>>>>
>>>>
>>>> On 7/4/13 6:59 PM, Ivan Gerasimov wrote:
>>>>> Thank you, Daniel!
>>>>>
>>>>> Please find an updated webrev at
>>>>> http://cr.openjdk.java.net/~igerasim/8016838/2/webrev/.
>>>>> It now includes the RetransformBigClass test modified in the same
>>>>> way as RedefineBigClass
>>>>> If the changes look fine, may I ask you to sponsor the commit, as
>>>>> I'm not a committer?
>>>>> Here's a link to hg export:
>>>>> http://cr.openjdk.java.net/~igerasim/2commit/8016838-jdk8-ReBigClass-improved.patch
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> Ivan
>>>>>
>>>>> On 04.07.2013 21:45, Daniel D. Daugherty wrote:
>>>>>> On 7/4/13 11:19 AM, Ivan Gerasimov wrote:
>>>>>>> Daniel, thank you for review!
>>>>>>>
>>>>>>> Here's the updated with all all your suggestions adopted.
>>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/1/webrev/
>>>>>>
>>>>>> Looks good.
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> I haven't yet considered applying the approach to
>>>>>>> RetransformBigClass.
>>>>>>> Do you want me to include this into this same change set or
>>>>>>> should I make it separately?
>>>>>>
>>>>>> I would include it in the same changeset.
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Sincerely yours,
>>>>>>> Ivan
>>>>>>>
>>>>>>>
>>>>>>> On 04.07.2013 19:34, Daniel D. Daugherty wrote:
>>>>>>>> On 7/3/13 11:12 AM, Ivan Gerasimov wrote:
>>>>>>>>> Hello everybody!
>>>>>>>>>
>>>>>>>>> We have a request to improve jtreg test.
>>>>>>>>> The test had been written to verify fix for memory leak during
>>>>>>>>> class redefinition.
>>>>>>>>> The problem is that it always is reported as PASSED even in
>>>>>>>>> the presence of the leak.
>>>>>>>>>
>>>>>>>>> The proposed change is platform specific.
>>>>>>>>> It allows memory leak detection only on Linux.
>>>>>>>>> This is because the memory leak was in native code, so there's
>>>>>>>>> no easy way to detect it from within Java code.
>>>>>>>>>
>>>>>>>>> Here's the webrev for JDK8 repository:
>>>>>>>>> http://cr.openjdk.java.net/~igerasim/8016838/0/webrev/
>>>>>>>>
>>>>>>>> Very nicely done! The logic in RedefineBigClass.sh only catches a
>>>>>>>> leak big enough to cause an Exception to be thrown.
>>>>>>>>
>>>>>>>> When I originally wrote this test and its companion:
>>>>>>>>
>>>>>>>> test/java/lang/instrument/RetransformBigClass*
>>>>>>>>
>>>>>>>> I could not come up with a platform independent way to put a small
>>>>>>>> upper limit on memory growth. It never dawned on me that
>>>>>>>> putting in
>>>>>>>> something on one platform (Linux) was better than nothing.
>>>>>>>>
>>>>>>>> Are you planning to add this same logic to RetransformBigClass*?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> test/java/lang/instrument/RedefineBigClass.sh
>>>>>>>> No comments.
>>>>>>>>
>>>>>>>> test/java/lang/instrument/RedefineBigClassApp.java
>>>>>>>> line 48: final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb
>>>>>>>> Would be better at the top of RedefineBigClassApp
>>>>>>>> rather than
>>>>>>>> "buried" down here.
>>>>>>>>
>>>>>>>> line 51: Long.valueOf(vmMemDelta)
>>>>>>>> There are several places where a long is passed to
>>>>>>>> Long.valueOf().
>>>>>>>> Is there some reason you're not passing them directly
>>>>>>>> to println()?
>>>>>>>>
>>>>>>>> line 54: } else {
>>>>>>>> The "else" is redundant due to the "System.exit(1)"
>>>>>>>> call above it.
>>>>>>>> You can drop the "else {" and "}" and shift that last
>>>>>>>> println() to
>>>>>>>> the left.
>>>>>>>>
>>>>>>>> line 71: return Long.parseLong(line.split(" ")[22]) / 1024;
>>>>>>>> How about at least a comment referring to the Linux
>>>>>>>> proc(5)
>>>>>>>> man page... and the fact that the 23rd field is:
>>>>>>>>
>>>>>>>> vsize %lu Virtual memory size in bytes.
>>>>>>>>
>>>>>>>> Again, very nicely done!
>>>>>>>>
>>>>>>>> Dan
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> The surprising thing is that modified test detected the leak
>>>>>>>>> with the latest JDK8!
>>>>>>>>> Latest 6 and 7 are fine, so it might be regression in JDK8.
>>>>>>>>>
>>>>>>>>> I've filled a bug
>>>>>>>>> http://bugs.sun.com/view_bug.do?bug_id=8019845 "Memory leak
>>>>>>>>> during class redefenition" (not yet available.)
>>>>>>>>>
>>>>>>>>> Sincerely yours,
>>>>>>>>> Ivan Gerasimov
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>>
>
From henry.jen at oracle.com Mon Jul 8 18:31:12 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Mon, 08 Jul 2013 11:31:12 -0700
Subject: RFR: 8017141: java.util/stream Spliterators from sequential
sources should not catch OOME
In-Reply-To:
References: <51D4AB0E.8090501@oracle.com>
Message-ID: <51DB0570.4030708@oracle.com>
On 07/04/2013 12:01 AM, Paul Sandoz wrote:
> On Jul 4, 2013, at 12:51 AM, Henry Jen wrote:
>> Hi,
>>
>> Please review the webrev at
>>
>> http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
>>
>
> Note that the same change has already been fixed/pushed forrelevant implementations in j.u.c.
>
> This change in part of a wider change to fix rampant resource usage in some scenarios (other impl changes will follow from lambda to tl later on).
>
> Paul.
>
Ping again.
This is a relative small/straightforward change, and as Paul suggested
it's in a larger context of other changes.
Cheers,
Henry
From forax at univ-mlv.fr Mon Jul 8 18:54:10 2013
From: forax at univ-mlv.fr (Remi Forax)
Date: Mon, 08 Jul 2013 20:54:10 +0200
Subject: RFR: 8017141: java.util/stream Spliterators from sequential
sources should not catch OOME
In-Reply-To: <51DB0570.4030708@oracle.com>
References: <51D4AB0E.8090501@oracle.com>
<51DB0570.4030708@oracle.com>
Message-ID: <51DB0AD2.5000304@univ-mlv.fr>
On 07/08/2013 08:31 PM, Henry Jen wrote:
> On 07/04/2013 12:01 AM, Paul Sandoz wrote:
>> On Jul 4, 2013, at 12:51 AM, Henry Jen wrote:
>>> Hi,
>>>
>>> Please review the webrev at
>>>
>>> http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
>>>
>> Note that the same change has already been fixed/pushed forrelevant implementations in j.u.c.
>>
>> This change in part of a wider change to fix rampant resource usage in some scenarios (other impl changes will follow from lambda to tl later on).
>>
>> Paul.
>>
> Ping again.
>
> This is a relative small/straightforward change, and as Paul suggested
> it's in a larger context of other changes.
>
> Cheers,
> Henry
>
I'm Ok with this patch.
R?mi
From henry.jen at oracle.com Mon Jul 8 19:42:25 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Mon, 08 Jul 2013 12:42:25 -0700
Subject: RFR (2nd): 8015315: Stream.concat methods
In-Reply-To:
References: <51D524D5.4030404@oracle.com>
Message-ID: <51DB1621.8080702@oracle.com>
On 07/04/2013 12:46 AM, Paul Sandoz wrote:
> On Jul 4, 2013, at 9:31 AM, Henry Jen wrote:
>> Hi,
>>
>> I updated the test, and split the ConcatTest.java so we don't encounter
>> the ClassNotFoundException issue on test-ng.
>>
>> Please review the webrev at
>>
>> http://cr.openjdk.java.net/~henryjen/ccc/8015315.1/webrev/
>>
>
> Looks good. I would like to get this in quickly as it will unblock the F/J patch and others. I can push this for you.
>
Thanks, that would be great.
> Peter's keen observation on Spliterator characteristics can be addressed as a separate issue.
>
+1. There is a bug tracking this, 8020061.
> I think the remarks on extends T> should be also be treated as a separate discussion as it has wider implications.
>
I agree with you, and had replied on why it is safe.
I did a quick experiment, it would need quite some effort to work out
the type system for various spliterator implementations.
Cheers,
Henry
From henry.jen at oracle.com Mon Jul 8 19:55:16 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Mon, 08 Jul 2013 12:55:16 -0700
Subject: RFR: 8017141: java.util/stream Spliterators from sequential
sources should not catch OOME
In-Reply-To: <51DB0AD2.5000304@univ-mlv.fr>
References: <51D4AB0E.8090501@oracle.com>
<51DB0570.4030708@oracle.com> <51DB0AD2.5000304@univ-mlv.fr>
Message-ID: <51DB1924.4070101@oracle.com>
On 07/08/2013 11:54 AM, Remi Forax wrote:
> On 07/08/2013 08:31 PM, Henry Jen wrote:
>> On 07/04/2013 12:01 AM, Paul Sandoz wrote:
>>> On Jul 4, 2013, at 12:51 AM, Henry Jen wrote:
>>>> Hi,
>>>>
>>>> Please review the webrev at
>>>>
>>>> http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
>>>>
>>> Note that the same change has already been fixed/pushed forrelevant
>>> implementations in j.u.c.
>>>
>>> This change in part of a wider change to fix rampant resource usage
>>> in some scenarios (other impl changes will follow from lambda to tl
>>> later on).
>>>
>>> Paul.
>>>
>> Ping again.
>>
>> This is a relative small/straightforward change, and as Paul suggested
>> it's in a larger context of other changes.
>>
>> Cheers,
>> Henry
>>
>
> I'm Ok with this patch.
>
Thanks for looking at it, we still need a jdk8 'reviewer'.
Cheers,
Henry
From mandy.chung at oracle.com Mon Jul 8 19:57:37 2013
From: mandy.chung at oracle.com (Mandy Chung)
Date: Mon, 08 Jul 2013 12:57:37 -0700
Subject: RFR: 8017141: java.util/stream Spliterators from sequential
sources should not catch OOME
In-Reply-To: <51DB0570.4030708@oracle.com>
References: <51D4AB0E.8090501@oracle.com>
<51DB0570.4030708@oracle.com>
Message-ID: <51DB19B1.3020904@oracle.com>
On 7/8/2013 11:31 AM, Henry Jen wrote:
> On 07/04/2013 12:01 AM, Paul Sandoz wrote:
>> On Jul 4, 2013, at 12:51 AM, Henry Jen wrote:
>>> Hi,
>>>
>>> Please review the webrev at
>>>
>>> http://cr.openjdk.java.net/~henryjen/tl/8017141.0/webrev/
>>>
>> Note that the same change has already been fixed/pushed forrelevant implementations in j.u.c.
>>
>> This change in part of a wider change to fix rampant resource usage in some scenarios (other impl changes will follow from lambda to tl later on).
>>
>> Paul.
>>
> Ping again.
>
> This is a relative small/straightforward change, and as Paul suggested
> it's in a larger context of other changes.
Looks good to me.
Mandy
From peter.levart at gmail.com Mon Jul 8 20:54:12 2013
From: peter.levart at gmail.com (Peter Levart)
Date: Mon, 08 Jul 2013 22:54:12 +0200
Subject: RFR 7122142 : (ann) Race condition between isAnnotationPresent and
getAnnotations
In-Reply-To:
References: <51C1BEC6.1080308@gmail.com> <51C1FE64.3020000@oracle.com>
<51C88EBF.9020704@gmail.com> <51D43A72.8090508@oracle.com>
<51D5895B.5020006@gmail.com>
<51D68489.2020000@gmail.com> <51D68DED.2030308@gmail.com>
Message-ID: <51DB26F4.8060305@gmail.com>
Helo,
I need a Reviewer for the following patch:
http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.05/
This fixes deadlock situation described in bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7122142
The in-depth evaluation of the patch is described in the introductory
message of this thread:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/018226.html
The above is the 5th revision of the patch that also makes sure a single
AnnotationType instance is ever returned for the same Class object even
when multiple threads concurrently request one.
Regards, Peter
On 07/05/2013 04:04 PM, Joel Borggr?n-Franck wrote:
> Hi Peter,
>
> Thanks for the quick update!
>
> While I have looked over the changes to j.l.Class and the cas in AnnotationType I don't think I'm qualified to review that. (FWIW it looked fine to me but my jmm isn't swapped in at the moment so I won't pretend to know the interactions between volatile and Unsafe cas). Thinking out loud I suppose we can assume a stable offset of fields in Class, and I realize that part has been under review before.
>
> The rest of AnnotationType, AnnotationParser and the tests look fine though. I also ran the tests before and after the change and results were as expected.
>
> Since I'm not a Reviewer kind of reviewer you need to get one those to sign off but after that I think you are good to go. I can sponsor this as well if Alan is busy.
>
> cheers
> /Joel
>
> On 5 jul 2013, at 11:12, Peter Levart wrote:
>
>> Hi Again,
>>
>> Sorry, the 4th revision I posted is not rebased to the current tip of jdk8-tl so it contained some diffs that reverted some things.
>>
>> Here's the correct patch:
>>
>> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.05/
>>
>>
>> Regards, Peter
>>
>>
>> On 07/05/2013 10:32 AM, Peter Levart wrote:
>>> Hi Joel,
>>>
>>> Here's the 4th revision of the patch:
>>>
>>> http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationType/webrev.04/
>>>
>>> This one introduces CAS-ing of the AnnotationType instance into the Class.annotationType field so that there's only a single instance ever returned for a single Class. I also introduced new private static Class.Atomic nested class that is used to lazily initialize Unsafe machinery and to provide a safe wrapper for internal j.l.Class use. Previously this was part of ReflectionData nested class because it was only used for it's purpose. In anticipation to have a need for more atomic operations in the future, I moved this code to a separate class. ReflectionData is now just a record.
>>>
>>> Regards, Peter
From tbuktu at hotmail.com Mon Jul 8 22:28:22 2013
From: tbuktu at hotmail.com (Tim Buktu)
Date: Tue, 9 Jul 2013 00:28:22 +0200
Subject: Final patch for 8014319: Faster division of large integers
Message-ID:
Hi,
I hope everyone had a good July 4 weekend.
I updated the patch for 8014319 (i.e. phase 3 of the BigInteger work).
The patch still consists of three files; they can be found at
https://gist.github.com/tbuktu/1576025/raw/f93093a412eac86d8d81e03b8b9135eb827f2a84/BigInteger.java.phase3
https://gist.github.com/tbuktu/1576025/raw/f628f854491520de472a15fbcc2b6b751efe74e7/MutableBigInteger.java.phase3
https://gist.github.com/tbuktu/1576025/raw/4c3faad4cdebffbd77485482a1e61c9a7a475060/BigIntegerTest.java.phase3
There are only two changes vs last week's version. A missing @author tag
has been added, and common powers of two are now cancelled before
dividing numbers.
I realize the review of the phase 3 patch is about to begin, so I won't
make any more changes to the code.
Thanks,
Tim
From henry.jen at oracle.com Mon Jul 8 22:56:49 2013
From: henry.jen at oracle.com (Henry Jen)
Date: Mon, 08 Jul 2013 15:56:49 -0700
Subject: RFR: 8019551: Make BaseStream public
Message-ID: <51DB43B1.7040208@oracle.com>
Hi,
Please review webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8019551/0/webrev/
This webrev makes BaseStream interface public and has AbstractPipeline
implements BaseStream.
The discussion on make this public can be found at
http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2013-July/002113.html
Cheers,
Henry
From huizhe.wang at oracle.com Tue Jul 9 01:07:32 2013
From: huizhe.wang at oracle.com (huizhe wang)
Date: Mon, 08 Jul 2013 18:07:32 -0700
Subject: RFR: JAXP 1.5 for JDK8/7u40: 8016648: FEATURE_SECURE_PROCESSING
set to true or false causes SAXParseException to be thrown
In-Reply-To: <51D77789.8080605@oracle.com>
References: <51D13933.8090901@oracle.com> <51D1A3F2.2000707@oracle.com>
<51D1CB94.90901@oracle.com> <51D1DE7D.3030105@oracle.com>
<51D53C3A.6000708@oracle.com> <51D54E48.6060503@oracle.com>
<51D5DA43.3050404@oracle.com> <51D68488.2050108@oracle.com>
<51D77789.8080605@oracle.com>
Message-ID: <51DB6254.1080906@oracle.com>
Hi,
I've updated webrev with improved property management, and quality
backed by 320 test cases. Thanks Daniel for the help expanding the test
suite!
Here's the webrev:
http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
-Joe
On 7/5/2013 6:48 PM, huizhe wang wrote:
>
> On 7/5/2013 1:32 AM, Alan Bateman wrote:
>> On 04/07/2013 21:25, huizhe wang wrote:
>>>
>>> Reverted back to the original code:
>>> http://cr.openjdk.java.net/~joehw/jdk8/8016648/webrev/
>>> The code split the version number and look at the 1st or 2nd
>>> element, it thus works for both the current format and the proposed
>>> one, e.g. for 1.7.0, it compares with the 2nd element, and for the
>>> proposed MAJOR.MINOR.FU.*, the 1st or MAJOR.
>> Thanks for dropping the dependency on javax.lang.model. What you now
>> is probably okay although I'm a bit dubious about attempting to
>> support an alternative format (I'm not aware of any proposal that
>> changes the format of the java.version property as changing it would
>> like cause a lot of breakage).
>
> There was a survey from Iris last year, and the JPG site has a
> presentation from Aurelio. But you're right, I'll remove it. If
> there's any change in the future, that is if it happens at all, we can
> always add that back.
>>
>> A minor point but isJDKOrAbove looks a bit odd to me, I'd probably go
>> for something like isJavaVersionGTE or isJavaVersionAtLeast but as
>> it's not part of the API then it doesn't matter of course.
>
> isJavaVersionAtLeast is easy to understand. What does GTE stand for?
>
>>
>> I think I mentioned it a while back but have warnings emitted with
>> System.err can be problematic (gets mixed up with application
>> messages to stderr). I realize the Xerces code seems to do this in
>> places but we really need to see about eliminating these messages or
>> getting consistent logging into this code.
>
> I agree, this one is not particularly graceful. There were 88 matches
> of System.err in Xalan and 75 in Xerces, although some I believe are
> used for debugging. It could take quite some effort.
>
> I mentioned that with a standalone release, we were trying to stay
> away from new JDK features. It's probably better to spend time/effort
> on some upgrades.
>
>>
>>> :
>>>
>>> The last scenario to work on is if FSP is set on the Validator
>>> instead of SchemaFactory. With that, I'm looking at refactoring the
>>> way properties are represented so that they carry state. It would
>>> then be cleaner to pass them from SchemaFactory over to Schema and
>>> then Validator. It's a bit of work. Fortunately, we only have three
>>> of them to deal with.
>> So are you planning to send another webrev or do it as a separate issue?
>
> Looking at affected code by this change, it doesn't seem to be too
> bad. I'll send another webrev.
>
> Joe
>
>>
>> -Alan
>
From joe.darcy at oracle.com Tue Jul 9 02:10:34 2013
From: joe.darcy at oracle.com (Joe Darcy)
Date: Mon, 08 Jul 2013 19:10:34 -0700
Subject: JDK 8 code review request for JDK-8020095: Fix doclint warnings in
java.util.regex
Message-ID: <51DB711A.1040108@oracle.com>
Hello,
Please review my changes to resolve (almost all of):
JDK-8020095 Fix doclint warnings in java.util.regex
http://cr.openjdk.java.net/~darcy/8020095.0/
Full text of the patch also included below.
For some reason I have not been able to determine, even with the patch,
one error remains:
> src/share/classes/java/util/regex/Pattern.java:222: error: text not
> allowed in