aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * V4: Free up 2 address bits in 64bit modeErik Verbruggen2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for the OS to use 49 address bits. It also maps JS Undefined to the C++ nullptr on 64bit. Task-number: QTBUG-54822 Change-Id: I7cc90620f499be1506a61aac77d72d067308838c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Add a facility to version type information for debugginghjk2016-09-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This serves the same purpose as qtbase/corelib/global/qhooks.cpp, but is meant to be in sync with changes in Qt Declarative internals. Change-Id: I5a4a7d9ca5c340367581749e05d09380590c46fb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Qml debugger: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-121-3/+5
|/ / / | | | | | | | | | | | | Change-Id: Id48d8a2986e6035042064c27e9453d0678315983 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Add QT_NO_QML_DEBUGGER to MODULE_DEFINES on -no-qml-debugUlf Hermann2016-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If -no-qml-debug is set when building QtQml, we have to add QT_NO_QML_DEBUGGER when building application code, because this build option modifies the headers and linking an application built with QML debugging against a Qt built without is crashy. Change-Id: Ib150810f40deb98dcf398e3998401358a25155d9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Remove some unused members on -no-qml-debugUlf Hermann2016-07-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It's debatable if the uglification is worth the overhead of a few pointers. Change-Id: I63b55b2043b8752a94d4b862c3892915135a72b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-2810-16/+165
| | | | | | | | | | | | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-283-11/+9
| | | | | | | | | | | | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QmlDebug: Inline most of QQmlDebugServiceUlf Hermann2016-07-272-38/+8
| | | | | | | | | | | | | | | | | | | | | | | | The compiler might be able to optimize better if it knows the methods are empty. Change-Id: Ib730e857d1ab948bb2f5c5006f4911d2e6db282d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Remove QQML_NO_DEBUG_PROTOCOLUlf Hermann2016-07-271-16/+1
| | | | | | | | | | | | | | | | | | | | | There is no sane way to set this. Change-Id: I5f7b70d1947d469dd01a1454180f01ad0d1c099d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Move QQmlMemoryProfiler to debugger directoryUlf Hermann2016-07-263-0/+246
| | | | | | | | | | | | | | | Change-Id: Ia1b1038a684f6ec34af777090d4d21021eac01f1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlCompiledData used to contain the binary data for instantiating QML types in the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler create a QV4::CompiledData::CompilationUnit. Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | QmlProfiler: Send RangeData and RangeLocation only once per typeUlf Hermann2016-05-273-28/+24
|/ / | | | | | | | | | | | | This saves time when serializing the data to be sent. Change-Id: Ic8c534d55445934a64dd253273099194b27d98af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-192-14/+0
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * QmlDebug: Drop explicit Q_IMPORT_PLUGIN statementsUlf Hermann2016-05-092-14/+0
| | | | | | | | | | | | | | | | | | | | qmake is clever enough to include the plugins without this. Furthermore, the explicit imports duplicate the plugins in static builds and they lead to cross linking from QtQml to QtQuick. Task-number: QTBUG-50306 Change-Id: I822e000481f583f513b863f54f65eb8ff772c0c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlProfiler: Reduce memory usage for file names and URLsUlf Hermann2016-05-022-68/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the various file names are actually not kept as QStrings in the respective objects being profiled, our saving them as QStrings in each and every profiling event is not implicitly shared and causes a huge memory overhead. Avoid that by saving each location only once, indexed by a disguised pointer to the object it refers to. Normally, objects could disappear during the profiling session, and new objects could be allocated in their place, which would mess up our indexing system. We prevent that by referencing the objects when we index them, thus preventing them from getting auto-destructed. Mind that those are not JavaScript objects but rather functions, bindings, components and the like. So, this will only cause a memory leak if you're compiling and dropping QML components over and over. Task-number: QTBUG-52937 Change-Id: Ia4dfb09a71a5c9a2d6ce25c3811bbe2a1036c1c1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlProfiler: Pass detailType directly, rather than as a bit fieldUlf Hermann2016-04-271-13/+13
| | | | | | | | | | | | | | | | | | | | There can only be one detail type for compressed set of messages. This is unlikely to change anytime soon. Also, be more careful about not detaching the data when sending the messages. Task-number: QTBUG-52937 Change-Id: I859b12889b0766543dac00b21784e14b76e458b6 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Allow custom debug connectorsUlf Hermann2016-03-263-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | Expose a generic method for loading connector plugins in QQmlDebuggingEnabler and don't insist on the two known ones when actually loading them. This allows third-party connector plugins to be loaded, for example to pass QML trace events to a generic tracing library. Change-Id: I4f66dfabdbd0c3aff3676f7e2591e0a6c42f8f7f Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlProfiler: Send events in smaller batchesUlf Hermann2016-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | This enables more parallel data processing and limits the memory usage. Benchmarks with the "planets" example from canvas3d show that this change reduces the time between the profiling being stopped and the last events arriving in the profiling client by about 50%. Change-Id: Iea16f9e2ae3adf584ec4a3c7fc766eaa21740f98 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Qml: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: I3be5a2be9ba5d55546472eac28f5f639a496bf3b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1916-224/+320
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Rewrite inspector serviceUlf Hermann2016-01-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inspector service had bitrotted to a point where there was little code to be rescued. Apparently it was never really finished and quite some code didn't make any sense. This change removes some features that were unused or didn't work correctly: 1. Panning and Zooming with mouse wheel and touch interaction. This might be useful in some contexts, but the implementation was so broken that it wasn't worth trying to fix it. The whole idea of doing this on the layer of QQuickItems is not so great because there is no distinction between spontaneous changes triggered by the application and debugging interaction triggered from outside. It might be better to implement such functionality on a lower level, e.g. in the renderer. 2. Reloading the scene with debug changes. Use one of the other debug services to change properties. Clearing the component cache is a rather drastic measure and not necessary here. In turn, we get support for inspecting multiple windows, and all subclasses of QQuickWindow are supported now. Also, show-on-top works now. Task-number: QTBUG-33376 Change-Id: I65497f49c6b46128a600b0e3a31483eeef40313c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make QQmlDebugConnector::hasEngine() constUlf Hermann2015-12-221-1/+1
| | | | | | | | | | Change-Id: I7441c24e3c2ae00ac274aa053d2e03d8f61ac830 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlDebug: Add functionality to query if a server knows an engineUlf Hermann2015-12-151-0/+1
| | | | | | | | | | Change-Id: Iba40a1705c18d19c4ef5723aeb8ee5113e31041c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Extend QDebugMessageServiceUlf Hermann2015-11-172-0/+3
| | | | | | | | | | | | | | | | Add category and timestamp, and allow synchronizing the timestamps with QQmlProfilerService. Change-Id: I8dc67e43e1087e231167fc4cfdfb5f659e00c5b2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use QJSEngine instead of QQmlEngine in debug servicesUlf Hermann2015-11-174-16/+17
| | | | | | | | | | | | | | | | | | This allows us to use the debug infrastructure in a JavaScript-only environment. Also add override declarations to make such changes easier in the future. Change-Id: I171271f0ad3868b3de71a8a2316a24602f94200a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QmlDebug: Restructure QPacket and QPacketProtocolUlf Hermann2015-11-176-228/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QmlDebug: move QQuickProfiler into a pluginUlf Hermann2015-11-171-2/+12
| | | | | | | | | | | | | | | | This saves some code in QtQuick and allows us to split up QPacket into different versions for client and server. Change-Id: I9b8c723274fb11d6321c5002910148b193aa6b40 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlProfiler: Collect useful input eventsUlf Hermann2015-10-301-0/+15
| | | | | | | | | | | | | | | | | | Just "Key" or "Mouse" as only attributes of input events are not very useful. This change adds some additional information and also collects input events from QQuickWindow. Change-Id: I062bbffeef3fa87776bc8be33f2321edf793faa2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlProfiler: Remove binding typesUlf Hermann2015-10-281-3/+0
| | | | | | | | | | | | | | | | | | There is only one type of binding left and as all clients check atEnd() before trying to get the bindingType from the stream we can just remove all of this. Change-Id: I4d50ef4a691630b521292cb622ef539b3494a970 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into origin/devUlf Hermann2015-10-224-5/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.h src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h src/qml/debugger/qqmldebugserviceinterfaces.cpp src/qml/jsruntime/qv4debugging_p.h Change-Id: I82a4ce1bcd4579181df886558f55ad2b328d1682
| * QmlDebug: Add a debug service for use with native debuggershjk2015-10-162-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This service provides information about the state of the most recently used QmlEngine in a way that can be integrated with "native" debuggers (GDB, LLDB, potentially CDB). Unlike the existing QV4 debugger service, the data extraction is triggered by direct calls from the native debuggers, i.e. has the examined QmlEngine stopped at the time of inspection. Since roundtrips through the native debuggers are expensive, an additional goal is to minimize roundtrips. Change-Id: Ic420129bbc15162197e35b52d92e882c027c9f6d Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * QmlDebug: Don't duplicate Qt namespace when importing debug pluginsUlf Hermann2015-10-161-1/+3
| | | | | | | | | | | | | | | | | | | | Q_IMPORT_PLUGIN already adds the Qt namespace to the symbols. Task-number: QTBUG-48415 Change-Id: I25b4ffdcddd0bdd52bfd390964b9c1a333a79b30 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QmlDebug: Add a debug connector for use with native debuggershjk2015-10-161-3/+12
| | | | | | | | | | | | | | | | | | | | This debug connector offers a few simple C functions a native debugger can hook into to communicate with QML debug services. It is the base of the 'native mixed' debugging mode in Qt Creator. Change-Id: I32ce1f21be8e3522dccf1210d4de3b131b819bc5 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * Fix compile error.Milian Wolff2015-10-151-1/+1
| | | | | | | | | | | | Change-Id: I563b4df01b6d57c4a5a015be34c7a7616f4894de Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Put QPacketProtocol into its own static libraryUlf Hermann2015-10-155-39/+227
| | | | | | | | | | | | | | | | | | | | | | | | We need it in 3 places in qtdeclarative and we could also use it in QtCreator. We don't want to bundle it with the debug client code as it is also necessary for the server. QPacket replaces QQmlDebugStream as it has the same purpose. This also fixes the inconsitent handling of data stream versions. Change-Id: I650fae353f267511c551b427d9169f4d718aa7f2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-252-3/+5
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * Add a \sinceLars Knoll2015-09-231-0/+2
| | | | | | | | | | Change-Id: Ib7fbbab5760e1f0c9727f8767ff79f64075fd358 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
| * Remove quotes from debug connector error messagesUlf Hermann2015-09-151-3/+3
| | | | | | | | | | | | | | | | | | The client expects them without quotes and other error messages don't have quotes (except for some in QQmlDebugServer which have to be replaced anyway). Change-Id: I75716f9223b268697801a91ea506817647e1e594 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add public methods to set debug services to be loadedUlf Hermann2015-09-152-0/+62
| | | | | | | | | | | | Task-number: QTBUG-47623 Change-Id: I94adba27e1220df6b6f0690df83ea32f956ef917 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Actively translate feature flags between QML and V4 profilersUlf Hermann2015-09-151-2/+2
| | | | | | | | | | | | | | Relying on the enums to be equal is somewhat dangerous. Change-Id: I0d5ebd37a2310b8916e521f7261bbf88786e712f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QmlDebug: Rename debug "server" to "connector"Ulf Hermann2015-09-151-13/+13
| | | | | | | | | | | | | | | | | | | | The fact that we're using QQmlDebugServer for TCP and local connections is an implementation detail that's largely irrelevant to the user. Also, mark the correct parameters as unused if the whole debug protocol is disabled. Change-Id: I8eae1783414016b0ae2cbbf99e9f4f9556a80345 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make keys of all debug services publicUlf Hermann2015-09-152-6/+35
|/ | | | | Change-Id: I4af1c351b92f35c11559f68fe9ab60063a665724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix profiling of QML/JS compilationUlf Hermann2015-08-241-5/+6
| | | | | | | | | | | | | | | | | | | The compilation of .js resources was missed and the compile times were underestimated because the dependency resolution and error checking wasn't factored in. In particular we only profiled the done() step for QQmlTypeData. However, JavaScript compilation also occurs in the dataReceived() step of QQmlScriptBlob and QQmlTypeData will already parse the program into an AST at that step. Compile steps can be nested now, but considering the fact that significant time may be spent before and after compiling dependencies for a parent module, this seems to be the best way to model them. Furthermore, in order to not needlessly convert QUrl to QString at runtime, the compilation profiler saves the files now as QUrl. Change-Id: I215a87787f9117c069ecd77b2d913cc0b0ff3c89 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Allow specification of loadable debug services via command lineUlf Hermann2015-08-132-1/+12
| | | | | | | | | 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>
* Move QQmlConfigurableDebugService into qmltooling/sharedUlf Hermann2015-08-042-107/+0
| | | | | | | It's only used by plugins now. Change-Id: Ia73a2a22ba6bccbd85bbca6eda2fb9f5a8d6dd3b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move debugger-specific services into a common pluginUlf Hermann2015-08-048-2506/+1
| | | | | Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move profiler and engine control services into a pluginUlf Hermann2015-08-0410-1130/+4
| | | | | Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Clean up QQmlDebugConnector's addService() and removeService()Ulf Hermann2015-08-042-4/+4
| | | | | | | | | | | As we look up services by name we should also add and remove them by name. As the thread doesn't run during adding and removing of services we don't have to check the client plugins for the initial state. It's also a good idea to eventually disconnect any signals that we connect on addService(). Change-Id: I9acd17d2caafe15831f32b7b959dc2dea9cab08c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move inspector service and QtQuick2 inspector into a common pluginUlf Hermann2015-08-045-344/+2
| | | | | | | | | The inspector service doesn't do anything useful without the QtQuick2 plugin and vice versa. This way we can also use the QQmlDebugPluginManager. Change-Id: I78f154dcc9103ec9ec3d2eda216bfb293231583e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add a factory for QQmlDebugService and use it to load pluginsUlf Hermann2015-08-043-0/+74
| | | | | | | | | Debug services can now be added as plugins in qmltooling/ . QQmlDebugConnector will load any service plugins matching the factory's iid before open()'ing the connector. Change-Id: I2e4cabd714018f62cf4d60b0ebd2827a85431964 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>