[Solved] QML profiling on embedded device: Debugging has not been enabled
-
Hi all,
I have some performance issues on parsing / compiling QML files on my embedded device. I have read this tutorial and want to profile my Qt Quick 4.8.3 application "link":http://doc.qt.digia.com/qtcreator-2.5/creator-qml-performance-monitor.html
I want to run QtCreator on a linux pc for profiling and to do a remote profile session. I don't use QtCreator as IDE but instead I let qmake generate make files for me and use eclipse as IDE (company rule). So I use my makefiles to create the binaries, copy them on my device, start the app and use QtCreator for remote profile connection.
To enable QML profiling in my application I have added the following to my project's .pro file. According to this post: "link":http://lists.qt.nokia.com/pipermail/qt-qml/2011-May/002599.html
@
CONFIG+=declarative_debug
@This is the complete .pro file (example) :
@
TRANSLATION = MY_TRANS.ts
TEMPLATE = app
TARGET = MY_TARGET
QT += core
QT += declarative
CONFIG += declarative_debug
INCLUDEPATH += ....
LIBS...
HEADERS....
@Ok, so step one is to start the application on my embedded device using the -qmljsdebugger commandline option:
@
my_app -qmljsdebugger=port:33456
@The application replies:
@
Ignoring "-qmljsdebugger=port:33456". Debugging has not been enabled.
@How to enable debugging in my project? I have seen guides telling how to do this in QtCreator but I only use the .pro file to generate makefiles and build the application by using those makefiles.
I have build Qt 4.8.3 using the following configure options:
@
-opensource -confirm-license -stl -no-qt3support -no-audio-backend -no-phonon-backend -no-phonon -no-webkit -no-javascript-jit -no-openssl -no-nis -no-cups -no-dbus -no-accessibility -nomake examples -nomake demos -nomake docs -no-rpath -no-xmlpatterns -no-multimedia -no-svg -no-javascript-jit -no-scripttools -no-opengl -declarative
@ -
-
I got a little further. Now Qt logs of my application tells me that the qml debugger is enabled, GREAT! But now I see the following error:
@
Remote debugger plugin has not been found
@AArgh... According to the following link I need to link to the qml debug library. It's explained how to do this in QtCreator. Unfortunately I cannot use that to build qt or my app. Anybody knows how to do this (make a .pro file option)?
"link":http://www.developer.nokia.com/Community/Discussion/showthread.php?230283-Debug-QML-is-impossible
Ps: I will post monday what steps I had to do to get rid of the "Debugging has not been enabled" message.
-
For Qt 4.8.3 to get rid of the Debugging has not been enabled I added the following options to the .pro file:
@
DEFINES += QMLJSDEBUGGER
DEFINES += QT_DECLARATIVE_DEBUG
CONFIG += declarative_debug
@Problem now is that the application tells me:
@
Remote debugger plugin has not been found
@Normally you build the debugger plugin from QtCreator and that plugin is linked to the application. Problem is I don't use QtCreator... Anybody knows how to manually build the plugin and link it to my application?
-
Also fixed the plugin not found message:
Copy the following files from qt/usr/plugins/qmltooling to target:your_application/qmltooling:
@
libqmldbg_tcp.so
libqmldbg_inspector.so
@Set DISABLE_QML_OPTIMIZER=1 shell enviroment variable.
Start your application using the "-qmljsdebugger=port:33456" commandline parameter option.
Now I can finally PROFILE my qml files :D
-
Ok... So next problem..
I run my application using the command line parameter qmljsdebugger=port.
I connect (on linux pc) QtCreator to my target (Analyze QML Profiler remote).
QtCreator and my target connects (I see this in the application log: Connection established).
I go to QtCreator analyse window and I see that the profiler is running ( the elapsed time is increased).When my application is done loading all QML files I stop the profiler (press the red stop icon in the analyze window). The profiler stops but no QML events are recorded.. No events, no timeline, no callees and no callers!
Anybody has a idea what's going on?
Ps: When I do a remote QML debug session I see my main qml window code in QtCreator and I see all set qml properties.
-
Problem solved... Had to use a timer to create a window for the profiler to connect. The problem making the connection is slow, so all my qml files were loaded before the connection was made.
Also I had to update to QtCreator 2.5 (instead of using 2.4 which was included in Qt 4.8.3)!
-
Hi, I am also trying to profile qml on a remote device, but from a windows xp computer to a winCE device.
Steve: I can't find the qmldbg_tcp4.dll you mentioned, and I can't seem to configure QT to build it either for wince. Did you build your dll yourself or did it come with the sdk?
(I can build my application to run on my computer aswell and with a similar qt configuration it does build the dll for this target (win32).)