[Fwd: Second Code Review for WeakReference leak in the Logging API (6942989)] (original) (raw)
Andrew John Hughes ahughes at redhat.com
Thu Jun 24 08:36:18 PDT 2010
- Previous message: [Fwd: Second Code Review for WeakReference leak in the Logging API (6942989)]
- Next message: [Fwd: Second Code Review for WeakReference leak in the Logging API (6942989)]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 24 June 2010 02:03, Joe Darcy <joe.darcy at oracle.com> wrote:
Hi Dan.
Yes, that would be a fine fix for OpenJDK 6; approved to be pushed! The current build number is b21.
I thought we were supposed to allow fixes to soak in OpenJDK7 first?
Thanks,
-Joe Daniel D. Daugherty wrote:
Joe, I think you might want this one for OpenJDK6. That will allow Google to sync their fix with mine. Only two changes were made after the second round of code review: *** LogManager.java Fri Jun 18 09:51:33 2010 --- /work/shared/bughunt/jdk7/exp/src/share/classes/java/util/logging/LogManager.java Wed Jun 23 11:29:49 2010 *************** *** 423,430 **** // that have been GC'ed. private final ReferenceQueue loggerRefQueue = new ReferenceQueue(); ! ! // Package-level method. // Helper class for managing WeakReferences to Logger objects. // // LogManager.namedLoggers --- 423,430 ---- // that have been GC'ed. private final ReferenceQueue loggerRefQueue = new ReferenceQueue(); ! ! // Package-level inner class. // Helper class for managing WeakReferences to Logger objects. // // LogManager.namedLoggers *************** *** 454,460 **** name = logger.getName(); // save for namedLoggers cleanup } ! // dispose of this LoggerWeakRef object void dispose() { if (node != null) { --- 454,460 ---- name = logger.getName(); // save for namedLoggers cleanup } ! // dispose of this LoggerWeakRef object void dispose() { if (node != null) { jcheck caught trailing whitespace and one comment correction caught by Tony P. Let me know if you want this fix... Dan
-------- Original Message -------- Subject: Second Code Review for WeakReference leak in the Logging API (6942989) Date: Fri, 18 Jun 2010 13:25:55 -0600 From: Daniel D. Daugherty <daniel.daugherty at oracle.com> Reply-To: daniel.daugherty at oracle.com To: serviceability-dev at openjdk.java.net <serviceability-dev at openjdk.java.net>, hotspot-runtime-dev at openjdk.java.net
Greetings, I have a new version of my fix for the WeakReference leak in the Logging API done. This version uses ReferenceQueues; thanks to Eamonn McManus, Jeremy Manson and Tony Printezis for their insights on using ReferenceQueues. Here's a pointer to Tony's paper for background info: http://java.sun.com/developer/technicalArticles/javase/finalization/ This version also has limits on the number of dead Loggers that are cleaned up per call; thanks to Alan Bateman for politely pushing me in that direction. The webrev is again relative to OpenJDK7, but the bug is escalated so the fix will be backported to the JDK6-Update train. So again, I'll need a minimum of two code reviewers. Here is the URL for the webrev: http://cr.openjdk.java.net/~dcubed/6942989-webrev/1/ Thanks, in advance, for any reviews. Dan
-- Andrew :-)
Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com)
Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
- Previous message: [Fwd: Second Code Review for WeakReference leak in the Logging API (6942989)]
- Next message: [Fwd: Second Code Review for WeakReference leak in the Logging API (6942989)]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]