Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Anthony Petrov
Laurent, I'm not subscribed to those mailing list, too. So you could send/forward your review request to the lists yourself - no difference here. Note that I tried sending your message to net-dev@ in the past, and even contacted the maintainer of the mailing list via a private email, but I neve

Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Laurent Bourgès
Anthony or Mandy, Could you ask JMX / Security groups for me to review my patch ? I am currently not registered to these mailing lists. Do you ask me to split the patch in two part: PlatformLogger on one side and Logger on the other side ? Laurent 2013/4/9 Mandy Chung > On 4/9/13 12:37 AM, L

Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Sergey Bylokhov
Hi, Laurent. The changes in awt/swing area looks good. On 4/8/13 3:32 PM, Laurent Bourgès wrote: Anthony, here is an updated patch concerning both PlatformLogger and Logger 'bad' usages: http://jmmc.fr/~bourgesl/share/webrev-8010297.3/ It impacts now awt, swing, JMX, security, network, and apa

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Mandy Chung
On 4/9/13 12:37 AM, Laurent Bourgès wrote: Mandy, first I would like to have the given patch applied to OpenJDK 8 (+ JDK7u) as it fixes many problems: - string concatenations - object creations (Object[] or other objects given as params) - method calls in log statements This is the patch you

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Anthony Petrov
Hi Laurent, Thanks for all your hard work! The fix looks fine to me. I'm also CC'ing jdk8-dev@ to let other teams review the changes in their areas. I've only reviewed the AWT part of the fix. -- best regards, Anthony On 4/8/2013 15:32, Laurent Bourgès wrote: Anthony, here is an updated pa

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Laurent Bourgès
Mandy, first I would like to have the given patch applied to OpenJDK 8 (+ JDK7u) as it fixes many problems: - string concatenations - object creations (Object[] or other objects given as params) - method calls in log statements In a second step, I can help somebody migrating JUL usages to Platfor

Re: sun.awt.X11 logs still using String + (waste)

2013-04-08 Thread Mandy Chung
Peter, Laurent, Peter's idea is a good one to add a couple of convenient methods to take Object parameters that will avoid the creation of array instances. I'd also like to know what variants being used in the jdk to determine the pros and cons of the alternatives (this issue also applies to

Re: sun.awt.X11 logs still using String + (waste)

2013-04-04 Thread Anthony Petrov
Yes, this makes sense. Do you want to update your fix for 8010297 to include these changes as well? -- best regards, Anthony On 04/04/13 15:47, Laurent Bourgès wrote: Dear all, I just realized there is another problem with PlatformLogger log statements: XBaseWindow: public boolean grabIn

Re: sun.awt.X11 logs still using String + (waste)

2013-04-03 Thread Laurent Bourgès
Anthony, could you tell me once it is in the OpenJDK8 repository ? I would then perform again profiling tests to check if there is no more missing isLoggable() statements. Once JMX and other projects switch to PlatformLogger, I could check again. Maybe I could write a small java code checker (pm

Re: sun.awt.X11 logs still using String + (waste)

2013-04-02 Thread Sergey Bylokhov
Hi, Laurent. Fix looks good. Thanks! On 4/2/13 3:35 PM, Laurent Bourgès wrote: Here is the updated patch: http://jmmc.fr/~bourgesl/share/webrev-8010297.2/ Fixed inconsistencies between FINE / FINER log statements: - XScrollbarPeer - XWindo

Re: sun.awt.X11 logs still using String + (waste)

2013-04-02 Thread Anthony Petrov
Looks fine to me as well. Thanks for fixing this, Laurent. Let's wait a couple more days in case Net or Swing folks want to review the fix. After that I'll push it to the repository. -- best regards, Anthony On 4/2/2013 15:35, Laurent Bourgès wrote: Here is the updated patch: http://jmmc.fr/

Re: sun.awt.X11 logs still using String + (waste)

2013-04-02 Thread Laurent Bourgès
Here is the updated patch: http://jmmc.fr/~bourgesl/share/webrev-8010297.2/ Fixed inconsistencies between FINE / FINER log statements: - XScrollbarPeer - XWindowPeer Laurent 2013/4/2 Anthony Petrov > 1. Sergey: I believe this is for purposes of better formating the log > output and making it m

Re: sun.awt.X11 logs still using String + (waste)

2013-04-02 Thread Anthony Petrov
1. Sergey: I believe this is for purposes of better formating the log output and making it more readable by separating or highlighting some sections. I don't think this should be changed. 2. Laurent: can you please address this issue and send us a new patch? -- best regards, Anthony On 4/1/20

Re: sun.awt.X11 logs still using String + (waste)

2013-04-01 Thread Sergey Bylokhov
Hi, Anthony Only two comments: 1 Why we need some special text in the log output like "***" and "###" 2 XScrollbarPeer.java: +if (log.isLoggable(PlatformLogger.FINEST)) { +log.finer("KeyEvent on scrollbar: " + event); +} On 4/1/13 12:20 PM, Anthony Petrov wrote: Aw

Re: sun.awt.X11 logs still using String + (waste)

2013-04-01 Thread Anthony Petrov
Awt, Swing, Net engineers, Could anyone review the fix please? For your convenience: Bug: http://bugs.sun.com/view_bug.do?bug_id=8010297 Fix: http://cr.openjdk.java.net/~anthony/8-55-isLoggable-8010297.0/ -- best regards, Anthony On 3/22/2013 2:26, Anthony Petrov wrote: Hi Laurent, The fix

Re: sun.awt.X11 logs still using String + (waste)

2013-03-21 Thread Anthony Petrov
Hi Laurent, The fix looks great to me. Thank you very much. We still need at least one review, though. Hopefully net-dev@ and/or swing-dev@ folks might help us out a bit. -- best regards, Anthony On 3/20/2013 15:10, Anthony Petrov wrote: Hi Laurent, Thanks for the patch. I've filed a bug a

Re: sun.awt.X11 logs still using String + (waste)

2013-03-20 Thread Anthony Petrov
Hi Laurent, Thanks for the patch. I've filed a bug at: http://bugs.sun.com/view_bug.do?bug_id=8010297 (should be available in a day or two) and published a webrev generated from your patch at: http://cr.openjdk.java.net/~anthony/8-55-isLoggable-8010297.0/ I'm also copying swing-dev@ and net-d

Re: sun.awt.X11 logs still using String + (waste)

2013-03-19 Thread Laurent Bourgès
Hi antony, FYI I started reviewing and fixing all PlatformLogger use cases (not too many as I thought first) mainly used by awt / swing projects to provide you a patch on latest JDK8 source code: I am adding the log level check when it is missing: if (...log.isLoggable(PlatformLogger.xxx)) {

Re: sun.awt.X11 logs still using String + (waste)

2013-03-18 Thread Laurent Bourgès
Hi antony, 2 different things: 1/ PlatformLogger was patched (doLog method) to avoid string operations (message formatting) for disabled logs (patch submiited on JDK8 and JDK7u): http://mail.openjdk.java.net/pipermail/jdk7u-dev/2012-April/002751.html 2/ I looked 2 hours ago on JDK7u AND JDK8 sour

Re: sun.awt.X11 logs still using String + (waste)

2013-03-18 Thread Anthony Petrov
Hi Laurent, Normally we fix an issue in JDK 8 first, and then back-port the fix to a 7u release. You're saying that in JDK 8 the problem isn't reproducible anymore. Can you please investigate (using the Mercurial history log) what exact fix resolved it in JDK 8? -- best regards, Anthony On

Re: sun.awt.X11 logs still using String + (waste)

2013-03-18 Thread Dalibor Topic
On 3/18/13 12:09 PM, Laurent Bourgès wrote: > PS: I may help fixing the source code but I have no idea how to collaborate > (provide a patch ?) Please see http://openjdk.java.net/contribute/ on how to get started. cheers, dalibor topic -- Oracle Dalibor Topic | Principal

sun.awt.X11 logs still using String + (waste)

2013-03-18 Thread Laurent Bourgès
Dear all, I run recently netbeans profiler on my swing application (Aspro2: http://www.jmmc.fr/aspro) under linux x64 platform and I figured out that a lot of char[] instances are coming from String + operator called by sun.awt.X11 code. I looked at PlatformLogger source code but found not way to