[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: trivial fixes for some warnings of clang++
From:       "Jaime Torres Amate" <jtamate () gmail ! com>
Date:       2011-11-27 20:35:12
Message-ID: 20111127203512.10233.90738 () vidsolbach ! de
[Download RAW message or body]

> On Nov. 27, 2011, 10:22 a.m., Ben Cooksley wrote:
> > This fix causes a nasty regression which causes the plugin list in KRunner and \
> > other apps to be nearly unusable when compiled with gcc. Please adjust the \
> > KPluginSelector component of this fix as it must be causing a behaviour change.
> 
> Jaime Torres Amate wrote:
> Could you explain more about the problems you've noticed or fill a bug report? 
> Do I have some time to try to fix the problem you've found in KRunner, instead of \
> reverting the code to a wrong status (as not intended by the developer) again? 
> 
> Ben Cooksley wrote:
> When trying to configure KRunner with this patch applied, CPU usage by KRunner \
> jumps to about 90% on my system. Checking with gdb shows that quite a few geometry \
> change events are being generated and widgets are being hidden and shown again in \
> very quick succession. 
> Reverting your patch and recompiling leads KRunner to use 0-1% of the CPU when \
> browsing the list of plugins in it's configure dialog. 
> Unfortunately there is no definitive backtrace for this issue.
> I think you do have some time to find a proper fix for the issue, yes.
> 
> You can reproduce by opening KRunner and entering it's configuration dialog. The \
> whole of KRunner will become very unresponsive and CPU usage should shoot up to \
> high levels. 
> Jaime Torres Amate wrote:
> 100% reproducible. I'll do my best. gdb to the rescue.
> 
> Thomas Lübking wrote:
> try pushbutton->minimumSizeHint()

I'll try that (minimumSizeHint()).
 What I've done so far:
* kill my krunner process
* valgrind --tool=callgrind krunner
* Alt+f2, config
* whait 2 minutes
* Kill the window with Ctrl+Alt+Esc
* See the usage with kcachegrind.

So far I've seen that (without detecting cycles in kcachegrind) :
void KCategorizedView::Private::topToBottomVisualRect(const QModelIndex &index, Item \
                &item,
                                                      const Block &block, const \
QPoint &blockPos) const  and
QRect KCategorizedView::visualRect(const QModelIndex &index) const
Are being called too much (mutual recursion?)


- Jaime Torres


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103165/#review8503
-----------------------------------------------------------


On Nov. 17, 2011, 2:37 p.m., Jaime Torres Amate wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103165/
> -----------------------------------------------------------
> 
> (Updated Nov. 17, 2011, 2:37 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> Trivial c++ fixes for some warnings of clang++ (2.99.9999)
> memset the structure size, not the pointer size (fortunately, the structure size is \
> greater than pointer size in this case). remove double parenthesis
> change false to 0 as pointer parameter
> use parenthesis to clarify preference between ? and +
> 
> 
> Diffs
> -----
> 
> kdecore/sycoca/kmemfile.cpp a466bde 
> kdeui/fonts/kfontchooser.cpp 541f7db 
> kdeui/tests/ktabwidgettest.cpp fdc3161 
> kross/modules/form.cpp 5e260c1 
> kutils/kemoticons/kemoticonstheme.cpp c145741 
> kutils/kpluginselector.cpp 0a39fcc 
> 
> Diff: http://git.reviewboard.kde.org/r/103165/diff/diff
> 
> 
> Testing
> -------
> 
> Still compiles with g++
> 
> 
> Thanks,
> 
> Jaime Torres Amate
> 
> 


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103165/">http://git.reviewboard.kde.org/r/103165/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 27th, 2011, 10:22 a.m., <b>Ben \
Cooksley</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This fix causes a nasty regression which causes the plugin list in \
KRunner and other apps to be nearly unusable when compiled with gcc. Please adjust \
the KPluginSelector component of this fix as it must be causing a behaviour \
change.</pre>  </blockquote>




 <p>On November 27th, 2011, 6:33 p.m., <b>Jaime Torres Amate</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Could you explain more \
about the problems you&#39;ve noticed or fill a bug report?  Do I have some time to \
try to fix the problem you&#39;ve found in KRunner, instead of reverting the code to \
a wrong status (as not intended by the developer) again? </pre>
 </blockquote>





 <p>On November 27th, 2011, 7:27 p.m., <b>Ben Cooksley</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When trying to configure \
KRunner with this patch applied, CPU usage by KRunner jumps to about 90% on my \
system. Checking with gdb shows that quite a few geometry change events are being \
generated and widgets are being hidden and shown again in very quick succession.

Reverting your patch and recompiling leads KRunner to use 0-1% of the CPU when \
browsing the list of plugins in it&#39;s configure dialog.

Unfortunately there is no definitive backtrace for this issue.
I think you do have some time to find a proper fix for the issue, yes.

You can reproduce by opening KRunner and entering it&#39;s configuration dialog. The \
whole of KRunner will become very unresponsive and CPU usage should shoot up to high \
levels.</pre>  </blockquote>





 <p>On November 27th, 2011, 7:48 p.m., <b>Jaime Torres Amate</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">100% reproducible. \
I&#39;ll do my best. gdb to the rescue.</pre>  </blockquote>





 <p>On November 27th, 2011, 7:55 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">try \
pushbutton-&gt;minimumSizeHint()</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;ll try that \
(minimumSizeHint()).  What I&#39;ve done so far:
* kill my krunner process
* valgrind --tool=callgrind krunner
* Alt+f2, config
* whait 2 minutes
* Kill the window with Ctrl+Alt+Esc
* See the usage with kcachegrind.

So far I&#39;ve seen that (without detecting cycles in kcachegrind) :
void KCategorizedView::Private::topToBottomVisualRect(const QModelIndex &amp;index, \
                Item &amp;item,
                                                      const Block &amp;block, const \
QPoint &amp;blockPos) const  and
QRect KCategorizedView::visualRect(const QModelIndex &amp;index) const
Are being called too much (mutual recursion?)
</pre>
<br />








<p>- Jaime Torres</p>


<br />
<p>On November 17th, 2011, 2:37 p.m., Jaime Torres Amate wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Jaime Torres Amate.</div>


<p style="color: grey;"><i>Updated Nov. 17, 2011, 2:37 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Trivial c++ fixes for some warnings of clang++ (2.99.9999) memset the \
structure size, not the pointer size (fortunately, the structure size is greater than \
pointer size in this case). remove double parenthesis
change false to 0 as pointer parameter
use parenthesis to clarify preference between ? and +
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Still compiles with g++</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kdecore/sycoca/kmemfile.cpp <span style="color: grey">(a466bde)</span></li>

 <li>kdeui/fonts/kfontchooser.cpp <span style="color: grey">(541f7db)</span></li>

 <li>kdeui/tests/ktabwidgettest.cpp <span style="color: grey">(fdc3161)</span></li>

 <li>kross/modules/form.cpp <span style="color: grey">(5e260c1)</span></li>

 <li>kutils/kemoticons/kemoticonstheme.cpp <span style="color: \
grey">(c145741)</span></li>

 <li>kutils/kpluginselector.cpp <span style="color: grey">(0a39fcc)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103165/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic