Skip to main content

QtWS15- The CPU Usage Analyzer for Device Creation, Ulf Herman, The Qt Company

Qt World Summit 2015, OCTOBER 5-7, BERLIN, GERMANY The CPU Usage Analyzer for Device Creation: The usual approach to analyzing the CPU usage of Linux-based Qt applications is running them through valgrind, using the "callgrind" tool. This works well for Desktop applications and provides very accurate statistics on how an application spends its CPU time. However, for embedded devices with limited resources valgrind is not the best choice. Also, such statistics do not show the interaction between different threads or distinguish between idle and busy periods during the run time of an application. QtCreator 3.4 has a new CPU Usage Analyzer, specially targeted for Device Creation. It will be enabled with Boot2Qt 5.5 and it allows you to get a detailed picture of the functions where your application spends its time. The CPU Usage Analyzer provides a zoomable timeline view like the QML Profiler, so that you can see what functions are running in what threads at any given time. In future releases a statistics view will be added. The data is collected with the Linux perf tool, which is less accurate but much faster than valgrind. This way meaningful data can be collected even on resource-constrained devices. The talk will showcase the new functionality in a live demo.