Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
This document details processes which can be used to identify performance issues.
The Qt Extended documentation includes performance test results for released versions of Qt Extended on several devices. This data may help establish performance expectations for Qt Extended.
Valgrind is a tool which profiles applications by running code under a simulated x86 CPU. Valgrind outputs highly detailed information which can be helpful in identifying performance issues.
Valgrind cannot be used on non-x86 embedded devices.
The process for using valgrind is as follows:
bin/runqtopia -qpe bin/worldtime -runmode callgrind -- --dump-every-bb=500000
bin/runqtopia -runmode callgrind -- --trace-children=yes
valgrind can provide valuable information as follows:
bin/runqtopia -runmode massif -- --format=html
bin/runqtopia -runmode memcheck
For example, language program startup time is 6s, however with callgrind the number of total instructions is 60,000,000.
20/10 = 2 seconds
Note: How was the estimate of 10M instructions/sec was determined?
Therefore, 60M / 6s = 10M instructions/second.
It is difficult to obtain accurate values as other factors effect results so when measuring startup times on device, repeat it a number of times and take the average value.
Qt Extended contains many logs which can be enabled or disabled at runtime. Timestamps can be enabled on these log messages to help determine where time is being spent.
Enable timestamps by modifying the Log2.conf log settings file. This process is documented here. A format string should be set which contains the %t specifier for timestamps. For example, write the following to $HOME/Settings/Trolltech/Log2.conf :
[MessageHandler] Format = %t %p %n: %s
Enable any qLog categories relevant to the code of interest.
Using the above log format results in log messages like the following:
... 606 2563 qpe: Input : Loading IM: "qdockedkeyboard" 611 2569 mediaserver: begin timestamped log messages 613 2563 qpe: Input : DockedKeyboard Instatiated. 613 2563 qpe: Input : Docking input widget for "DockedKeyboard" 614 2563 qpe: Input : Loading IM: "qkeyboard" 618 2563 qpe: Input : Loading IM: "qpredictivekeyboard" 625 2563 qpe: Input : Docking input widget for "PredictiveKeyboard" ... 735 2563 qpe: Component : Creating callScreen 735 2563 qpe: QtopiaServer : Server widget mapping: "CallScreen" -> "Themed" 739 2563 qpe: Component : Created callScreen ...
The timestamp at the beginning of each log message can be used to determine how much time certain tasks take, while the PID (process identifier) and process name allow log messages from separate processes to be separated. In the above example it can be seen that loading the "qpredictivekeyboard" input method takes 7 milliseconds and creating the call screen takes 4 milliseconds.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |