Fwd: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax (original) (raw)
David Holmes david.holmes at oracle.com
Sun Jun 3 22:55:14 PDT 2012
- Previous message: Fwd: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax
- Next message: Fwd: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Looks okay to me.
David
On 4/06/2012 3:55 PM, Sean Chou wrote:
Hi David,
Thanks for your time, comments are added. The new webrev is http://cr.openjdk.java.net/~zhouyx/7173044/webrev.02/ . Please have a look. On Mon, Jun 4, 2012 at 11:26 AM, David Holmes <david.holmes at oracle.com_ _<mailto:david.holmes at oracle.com>> wrote: Hi Sean, This seems reasonable. Perhaps add a couple of comments: 125 private float usedMemMax[]; // used when max pool size is undefined 202 if (totalMemory < 0) { // max is undefined for this pool David -----
On 4/06/2012 12:12 PM, Sean Chou wrote: Hello, Would any one like to take one more look ? It will help much ! ---------- Forwarded message ---------- From: Sean Chou <zhouyx at linux.vnet.ibm.com_ _<mailto:zhouyx at linux.vnet.ibm.com> <mailto:zhouyx at linux.vnet.ibm._com_ _<mailto:zhouyx at linux.vnet.ibm.com>>> Date: Thu, May 31, 2012 at 3:17 PM Subject: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax To: serviceability-dev at openjdk._java.net <mailto:serviceability-dev at openjdk.java.net> <mailto:serviceability-dev at _openjdk.java.net_ _<mailto:serviceability-dev at openjdk.java.net>> Hi all, MemoryMonitor demo will hang if MemoryUsage obj returns -1 in getMax method. The demo obtains totalMemory from getMax method, and it is used in following loop: " // .. Memory Free .. big.setColor(mfColor); int MemUsage = (int) (((totalMemory - usedMemory) / totalMemory) * 10); int i = 0; for ( ; i < MemUsage ; i++) {_ _mfRect.setRect(x1+5,(float) y1+ssH+i*blockHeight,_ _blockWidth, blockHeight-1);_ _big.fill(mfRect);_ _}_ _"_ _If -1 is returned, MemUsage becomes a very large positive_ _value and_ _the loop hangs_ _the demo._ _The bug is not seen in current openjdk because the beans_ _returned_ _all has a Max_ _value returned. However, -1 is allowed by spec when Max is not_ _set for_ _the bean, and_ _other jdk might return._ _In the patch, max is set to 1m or the max memory usage in_ _history_ _for the bean_ _if there is no max specified. Please take a look._ _Bug:_ _http://bugs.sun.com/_bugdatabase/viewbug.do?bug_id=7173044_ _<http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7173044> Webrev: http://cr.openjdk.java.net/~_zhouyx/7173044/webrev.01/ <http://cr.openjdk.java.net/~zhouyx/7173044/webrev.01/> . -- Best Regards, Sean Chou
-- Best Regards, Sean Chou -- Best Regards, Sean Chou
- Previous message: Fwd: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax
- Next message: Fwd: Request for review: 7173044: Memory monitor demo hangs if MemoryUsage obj returns -1 in getMax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]