aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-enable QML memory profilingUlf Hermann2017-11-231-0/+21
| | | | | | Task-number: QTBUG-64674 Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Ignore debugger failures with GCC on WindowsSimon Hausmann2017-07-281-0/+15
| | | | | | | | | | | | | | | Capturing the output of the started process mysteriously fails on Windows with gcc. While the nested event loop is run, the readyRead() signal is never emitted. Only after the timer fired and the event loop is terminated, we receive the output we were expecting. Some tests needed adapting to the initializing sub-function failing in QVERIFY/QCOMPARE calls, in order for the process to not crash and the blacklisting to work. Task-number: QTQAINFRA-1334 Change-Id: I4804d94580e7db65595137d19d7b75d75c243257 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-7/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-6/+11
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | * Relax QQmlProfilerService test for scene graph eventsUlf Hermann2016-07-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | The scene graph might decide to do an initial rendering, before the first SceneGraphContextFrame. Change-Id: Ie6d96574b5585cfda4dcd258b6031303f9a37715 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QmlProfiler: When flushing data, send it in the right orderUlf Hermann2016-05-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the adapters immediately return dataReady() when reportData() is invoked. This means that there is only one adapter in the start times list then, which in turn causes all the data from that adapter to be sent at once, without caring for the other adapters' timestamps. Change-Id: Ic1e12fdcefb0a691067518fba100368f13c927f7 Task-number: QTBUG-53590 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QmlProfiler: Extend test to check for timestamp orderingUlf Hermann2016-07-061-1/+22
| | | | | | | | | | | | | | | | | | | | | Timestamps should always increase monotonically. Change-Id: Idfd44e160193aab7bce37b58bc42a94ff087d15e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-241-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickopenglshadereffectnode.cpp src/quick/items/qquickshadereffect.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h src/quick/scenegraph/qsgdefaultglyphnode_p.h Change-Id: I3d6874b4e4231a89d2836c04fe8e7f2ef2d698c4
| * | | QmlProfiler: Don't import QtQuick if we don't use itUlf Hermann2016-05-091-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | This enables some of the tests to run in QML-only environments, without QtQuick. Change-Id: Icc7250b6ddab43730cb4744ffc4e0bade8574d26 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* / / Fix some test failures with QT_NO_OPENGL buildsAndy Nichols2016-05-061-2/+3
|/ / | | | | | | | | Change-Id: I4154084b4a0e0709ee8cb39a856a37a611e2d537 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-201-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QmlDebug: Restructure QPacket and QPacketProtocolUlf Hermann2015-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot use the same data stream version for the client and server versions of QPacket and QPacketProtocol should not deal with QPackets but with simple byte arrays because the underlying QDataStream is hard to copy. The new QQmlDebugPacket picks its data stream version from QQmlDebugConnector now, which adjusts it when connecting. As there can only ever be one QQmlDebugConnector, we can keep the version static. The clients need to query the connection for the correct version. We may connect to several different servers sequentially or we may have a server running while using a client, and we don't want to confuse the versions between those. With this in place, all remaining occurrences of QDataStream are replaced with QPacket or QQmlDebugPacket. Change-Id: I3f6ba73fcbfad5e8df917c5feb9308116738a614 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move QML profiler client to qmldebugUlf Hermann2015-10-301-261/+205
| | | | | | | | | | Change-Id: I506909b68be6cbad631d1645673c2d38460aed33 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move QQmlDebugClient into separate static libraryUlf Hermann2015-10-301-7/+9
| | | | | | | | | | Change-Id: Ib3daf9da2cf6798bd022cfcf54d11e565c9cb4ca Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Properly test services arguments for QQmlDebugServerUlf Hermann2015-10-151-0/+6
|/ | | | | | | | | So far we have only tested that each service is still functional when the services:<service> argument is given on the command line. This test checks that services which aren't specified are indeed not loaded. Change-Id: Ica935da0337b2215898f65cf283d6e11365432a8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow specification of loadable debug services via command lineUlf Hermann2015-08-131-50/+31
| | | | | | | | | We don't want to load the debugger when profiling and vice versa. This makes it easier to prevent unwanted services from getting loaded. Task-number: QTBUG-47623 Change-Id: I28893b6218110274a6d30b27805d89dbb443add3 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Periodically flush profiling data to client.Ulf Hermann2015-08-041-1/+22
| | | | | | | | | | | | | | | | | | | | This reduces memory usage as the data can be deleted once it is sent. It also reduces the time it takes to transmit the data when profiling is stopped. It does incur a runtime cost as the sending now takes place while the application is running. The decision to periodically flush or not is left to the client, who can specify a flush interval when starting profiling. Usage of the flushing feature also relaxes the guarantees regarding the sorting of events before they are sent. Events with higher timestamps are now allowed to arrive before events with lower timestamps. Any clients implementing the flushing need to take this into account. This will eventually allow us to do away with the server-side ordering altogether. Task-number: QTBUG-39756 Change-Id: Idaf4931dc17f224c2bd492078b99e88b1405234e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Use QVector rather than QList for storing QQmlProfilerDataUlf Hermann2015-07-291-6/+6
| | | | | Change-Id: I94519181e915c5e2df9614ad4e1180fb159252e3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Verify that debug client exists before interacting with it.Ulf Hermann2015-06-161-2/+2
| | | | | | | | We don't want the tests to crash if the connection cannot be established. Change-Id: Iebd6d008f6a043b229738d607068ea822fcded9d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Guard profiler service test against unusual clock behavior.Ulf Hermann2015-03-271-60/+168
| | | | | | | | | | | Apparently a monotonic timer can return the exact same timestamp multiple times in a row. In this case the events may be sorted in a different way than we expect. By scanning all events with equal timestamps for the one we're looking for, we can still keep the test useful. Change-Id: I08e1d7ed8d74359a127ac34ebc077375aa70f492 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Test the javascript heap profilerUlf Hermann2014-06-181-3/+64
| | | | | Change-Id: I6ac08e520e263ae1cda9eeccd08dea997f6bdd2f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-06-131-46/+52
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
| * Keep QML and JS messages separate in QQmlProfilerService testUlf Hermann2014-06-061-46/+52
| | | | | | | | | | | | | | | | | | Like that we can deal with misbehaving clocks in the tested application. Task-number: QTBUG-39169 Change-Id: Ia9f9844efb6f20508bccac3ca2d593d01d55fc83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Javascript heap profilerUlf Hermann2014-06-061-0/+13
|/ | | | | | | | | This profiler tracks every memory allocation and deallocation, by the MemoryManager as well as the V4 VM, and exposes them as a stream of events to the profiler service. Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Dump all received messages if tst_QQmlProfilerService failsUlf Hermann2014-06-021-0/+21
| | | | | | | | Without all the context we can't really tell what happened. Task-number: QTBUG-39169 Change-Id: Ic5192498440a0d55c279549243dfce65f8168317 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Record synchronous and asynchronous events separately in profiler testUlf Hermann2014-05-221-129/+84
| | | | | | | | | | | | | | | | Render events as well as frame painting and keyboard and mouse interaction happen largely independently of QML engine events. We cannot rely on a specific composite order of both types. The tests are written in a way that allows us to rely on a specific order within each group, though. Pixmap cache events are a special case and need their own category as the load start events are synchronous while all others are asynchronous. Still, there is a defined ordering between them. Task-number: QTBUG-39169 Change-Id: I35220a22dcb08ea0bb7286e27347c287a5ce7983 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Be more verbose about actual results in tst_qqmlprofilerserviceUlf Hermann2014-05-061-27/+38
| | | | | | | | QCOMPARE and QVERIFY2 are clearly superior to QVERIFY when comparing values in tests. Change-Id: Ia860d6f087680066fbe0ffa311b5557e77f1720c Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Register animation profiler callback also from render threadUlf Hermann2014-03-181-1/+3
| | | | | | | | | | | The QUnifiedTimer in the GUI thread doesn't cover the render thread animations. We need a separate registration for those. We also need to keep track of which animation events are coming from which threads. Task-number: QTCREATORBUG-11659 Change-Id: I1fdd80a5630cc6a33e527b99be7347f3bd63510f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Test case for V4 profiler and its adapterUlf Hermann2014-02-131-0/+39
| | | | | Change-Id: I64af195a16189cd1306ca80d13c0ef002fa31f59 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* V4 profiler adapterUlf Hermann2014-02-131-4/+8
| | | | | | | | This adapter attaches the V4 profiler to the QML profiling infrastructure. Change-Id: Ifaf77a3ba0790bc56d4b155260b0e05593ac799e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Infrastructure for supporting multiple profilers in qqmlprofilerserviceUlf Hermann2014-02-131-1/+9
| | | | | | | | | The concepts of "global" and "engine" profilers are introduced. Profilers can either be attached to specific QML engines and run in their threads or they can be unspecific global profilers running in arbitrary threads. Change-Id: I3862fc65c07ccb33a1ca08cd2425e4079d3ffc02 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Be stricter about the number of messages when testing profiler serviceUlf Hermann2014-01-311-1/+4
| | | | | | | It's better to fail a test than to crash on invalid array access later. Change-Id: Ia3d24218eba80f362908979720657312c8c6cd67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Properly wait for stdout in testUlf Hermann2014-01-291-3/+3
| | | | | | | | Assuming all output is available on the first readyReadStandardOutput() signal leads to flaky test results. Change-Id: I442d7edc905abc067d6c32a4a55afd42ed03e3c9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-241-0/+30
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/dialogs/qquickmessagedialog.cpp src/imports/dialogs/qquickmessagedialog_p.h src/qml/debugger/qqmlprofilerservice_p.h src/qml/jsruntime/qv4regexpobject.cpp tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
| * Parse source location for signal handling functionsUlf Hermann2014-01-211-0/+30
| | | | | | | | | | | | | | | | | | | | | | Previously the source location of signal handlers was always line 0 and column 0. This poses problems when trying to extract meaningful profiling information. The change assigns the source location of the statement declaring the function as the function's source location. Task-number: QTCREATORBUG-11100 Change-Id: I4bb8682b35147a7cfe4ecec342d4a00623bb1e0d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Further pack messages for QQmlProfilerServiceUlf Hermann2014-01-221-6/+6
|/ | | | | | | | | | | Allow multiple detailTypes in each packet and extend the profiling code to make use of that. Note that this changes the usual order of pixmapSizeKnown and PixmapLoadingFinished events. As far as I can see this doesn't affect the QML profiler frontend and the order of these events isn't specified anywhere. Change-Id: Id39ad98594ccf35add4415e08daf9e92ab561237 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make sure that profiling can only be started if debugging is enabled.Ulf Hermann2014-01-151-0/+19
| | | | | | | | | | | Enabling the profiler doesn't make much sense if there is no debug service as the messages can't be sent anywhere then. Furthermore, the profiler instance is only properly initialized if debugging is enabled and thus enabling profiling without debugging being enabled can cause problems. Change-Id: I784a110126d45a9a2bc9d9e14d9a22e2980c3a42 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adapt tests to new events from qqmlprofilerserviceUlf Hermann2013-11-291-10/+10
| | | | | Change-Id: I59baa1f9aa0751d4bffc6eff0332318efc6fe9a8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove '-enable-debugger' argument from qml executableKai Koehne2013-11-161-2/+0
| | | | | | Task-number: QTBUG-34836 Change-Id: I3ab2a16036a1086c0ac1f50880a402caf9f54f2d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make tst_qqmlprofilerservice more robustKai Koehne2013-11-151-2/+3
| | | | | | | | Don't expect only application output to be printed. E.g. a stray qDebug somewhere in Qt could break this test so far ... Change-Id: Ibdc31fba3bd8d822c264bd44515d16e648db9a8e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix flaky QQmlProfilerService::scenegraphData testKai Koehne2013-10-171-6/+5
| | | | | | | | | | | QSGRenderThread::syncAndRender first triggers the frameSwapped() signal, and only then adds the SceneGraphRenderLoopFrame message. We're waiting for the frameSwapped signal to stop profiling, and therefore can't be sure whether we'll get the final SceneGraphRenderLoopFrame message or not. Task-number: QTBUG-33024 Change-Id: I3216667e8e5cdc79f210290ce22cc6b08c579b6a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve output of test caseKai Koehne2013-10-161-2/+10
| | | | | Change-Id: Ib36583120ca42835534f0f8494637aeb9618f317 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Fix segfault in autotestKai Koehne2013-10-161-2/+5
| | | | | | | Do not re-declare variable in local scope! Change-Id: I4f66081603ce86d78965ac12368bda66d86ff0c4 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Remove debug output from tst_qqmlprofilerservice.Gunnar Sletta2013-09-301-2/+0
| | | | | | | I suspect this got snuck in accidentally. Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Try to stabilize the multipleTransitions testLars Knoll2013-09-281-0/+2
| | | | | Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add qml toolAlan Alpert2013-09-171-2/+2
| | | | | | | | | | | | | | | | | | | This tool simply runs QML files using a QQmlApplicationEngine. It is configurable so as to behave, by default, like qmlscene in that it will automatically place non-Window QtQuick 2 Items inside a QQuickWindow with the size of the root item. The configuration is extensible so that other GUI scenes can also use it by altering the configuration files in their installation. On OS X, it is an app bundle, and handles the QFileOpenEvent so that it can be the tool with which qml files are usually launched by double-clicking. (This does not break the ability to use it on the command line too: the options still work, you just have to give the path to the executable inside the bundle.) Change-Id: I6bac813ce188be54842a78d7b532fcf2d54dc443 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* QmlProfiler: fix SceneGraph profilingChristiaan Janssen2013-05-271-1/+1
| | | | | Change-Id: I54c960f0b0da061816223a51795c83a9f9dd3f66 Reviewed-by: Kai Koehne <kai.koehne@digia.com>