[Qt-interest] Performance problem with Qt4.6.2 and QString on lucid ubuntu
Abdelrazak Younes
younes.abdel at gmail.com
Thu Mar 18 18:09:08 CET 2010
On 03/18/2010 05:59 PM, Abdelrazak Younes wrote:
> Hello,
>
> With Qt4.6.2 my application sudenly rquires a lot of CPU under Linux
> (about 40% cpu, compiled with gcc-4.4 ubuntu lucid). A quick oprofile
> reveals that most of the time is in QBasicAtomicInt::deref() and
> QString::~QString().
>
> The same application compiled with MSVC-2008 on Windows takes
> basically no-cpu (less than 1%).
> The same application compiled with Qt4.5.2 on a Debian system doesn't
> have this problem either...
>
> In my application I do a lot of data passing from the core to the gui
> using QStrings and QStringList. Either by copy and using const reference.
>
Just in case someone has an idea, here is the oprofile:
CPU: Core 2, speed 1992 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
unit mask of 0x00 (Unhalted core cycles) count 100000
samples % image name app name
symbol name
-------------------------------------------------------------------------------
224877 60.3062 libQtCore.so.4.6.2 SoftPlug
/usr/lib/libQtCore.so.4.6.2
224877 100.000 libQtCore.so.4.6.2 SoftPlug
/usr/lib/libQtCore.so.4.6.2 [self]
-------------------------------------------------------------------------------
27198 7.2938 libc-2.11.1.so SoftPlug malloc
27198 100.000 libc-2.11.1.so SoftPlug
malloc [self]
-------------------------------------------------------------------------------
24342 6.5279 libc-2.11.1.so SoftPlug free
24342 100.000 libc-2.11.1.so SoftPlug
free [self]
-------------------------------------------------------------------------------
13646 3.6595 libc-2.11.1.so SoftPlug memcpy
13646 100.000 libc-2.11.1.so SoftPlug
memcpy [self]
-------------------------------------------------------------------------------
11153 2.9909 libc-2.11.1.so SoftPlug
_int_malloc
11153 100.000 libc-2.11.1.so SoftPlug
_int_malloc [self]
-------------------------------------------------------------------------------
8271 2.2181 libc-2.11.1.so SoftPlug
_int_free
8271 100.000 libc-2.11.1.so SoftPlug
_int_free [self]
-------------------------------------------------------------------------------
5938 1.5924 libc-2.11.1.so oprofiled vfprintf
5938 100.000 libc-2.11.1.so oprofiled
vfprintf [self]
-------------------------------------------------------------------------------
4420 1.1853 SoftPlug SoftPlug
QBasicAtomicInt::deref()
4420 100.000 SoftPlug SoftPlug
QBasicAtomicInt::deref() [self]
-------------------------------------------------------------------------------
3337 0.8949 libc-2.11.1.so oprofiled
_IO_file_xsputn@@GLIBC_2.2.5
3337 100.000 libc-2.11.1.so oprofiled
_IO_file_xsputn@@GLIBC_2.2.5 [self]
-------------------------------------------------------------------------------
2947 0.7903 Xorg Xorg
/usr/bin/Xorg
2947 100.000 Xorg Xorg
/usr/bin/Xorg [self]
-------------------------------------------------------------------------------
2914 0.7815 r300_dri.so Xorg
/usr/lib/dri/r300_dri.so
2914 100.000 r300_dri.so Xorg
/usr/lib/dri/r300_dri.so [self]
-------------------------------------------------------------------------------
2528 0.6779 libc-2.11.1.so SoftPlug
malloc_consolidate
2528 100.000 libc-2.11.1.so SoftPlug
malloc_consolidate [self]
-------------------------------------------------------------------------------
2504 0.6715 libQtGui.so.4.6.2 SoftPlug
/usr/lib/libQtGui.so.4.6.2
2504 100.000 libQtGui.so.4.6.2 SoftPlug
/usr/lib/libQtGui.so.4.6.2 [self]
-------------------------------------------------------------------------------
2213 0.5935 SoftPlug SoftPlug
QString::~QString()
2213 100.000 SoftPlug SoftPlug
QString::~QString() [self]
-------------------------------------------------------------------------------
1614 0.4328 libpixman-1.so.0.16.4 Xorg
/usr/lib/libpixman-1.so.0.16.4
1614 100.000 libpixman-1.so.0.16.4 Xorg
/usr/lib/libpixman-1.so.0.16.4 [self]
-------------------------------------------------------------------------------
1451 0.3891 oprofiled oprofiled
/usr/bin/oprofiled
1451 100.000 oprofiled oprofiled
/usr/bin/oprofiled [self]
-------------------------------------------------------------------------------
1435 0.3848 SoftPlug SoftPlug
QList<QString>::node_destruct(QList<QString>::Node*, QList<
QString>::Node*)
More information about the Qt-interest-old
mailing list