aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmltooling/qmldbg_profiler
Commit message (Collapse)AuthorAgeFilesLines
* Tooling: Use QHash/QMap's constFind() to avoid unnecessary detachesVladimir Belyavsky2024-04-232-4/+4
| | | | | | | | Use QHash/QMap's constFind() instead of non-const find() where applicable to avoid unnecessary detaches. Change-Id: I3906c7ff0601b2b4c336c6e4312319b76fa0c183 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-072-20/+20
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-073-10/+10
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-071-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove Qt key words from header filesYuhang Zhao2022-07-192-2/+2
| | | | | | | | | | | So that users can use QT_NO_KEYWORDS when linking against QtDeclarative, even if they are using private headers. Docs, examples and tools are not touched because it's not necessary. Pick-to: 6.4 Change-Id: Idc30797074aaa72576429ebdaaf915d7f5acf84e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-081-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1110-380/+20
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlProfilerServiceFactoryPlugin: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102948 Change-Id: Idc57e5a664a62d8ed199582a1230e508e227abf7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add quick3d events and types to qmlprofilerJanne Koskinen2021-12-201-0/+10
| | | | | | | | | | | | Loads qquick3dprofiler plugin if exists Task-number: QTBUG-98146 Pick-to: 6.3 Change-Id: I52ffaf4d68ad44161778a9cf5707afb1938012ca Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace 0 pointer constants with nullptrAllan Sandfeld Jensen2021-10-182-2/+2
| | | | | | | Replaced in most common patterns. Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-101-1/+1
| | | | | | | Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: I6126387bcfc8c93211d782edd9fc127fba88f66f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: I0dd04990d047aae73382421614723360b8e48aaa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename qt plugin targets to end with PluginAlexandru Croitor2021-06-251-1/+2
| | | | | | | | | | So that CMake automatically calls find_package for each of those plugins when the module they belong to is find_package()d. Pick-to: 6.2 Change-Id: I0c9badc29227e60bbe344de3b2c5fbe887dab3e2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-23/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate qtdeclarative/srcAlexandru Croitor2020-05-291-1/+1
| | | | | | | | | | Includes - renaming of internal plugin api call - generation of QT_QMLTYPES_FILENAME - addition of a few TARGET_DESCRIPTION Change-Id: I72b5647b8c16af9945795ead62a075322b6bb2f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-051-5/+1
| | | | | | Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-292-2/+2
|\ | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * Change some unite(const QHash &) to insert(const QHash &)Mårten Nordheim2020-01-242-2/+2
| | | | | | | | | | | | | | | | | | | | None of the other code handles it like a multi hash, so let's change the calls from unite() to insert since we now have an option which won't silently create a multi hash. Change-Id: I520295bde81c4ad1b0665308fcaf5fe41c6c3039 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Regenerate plugins namesAlexandru Croitor2020-01-291-3/+3
| | | | | | | | | | | | Change-Id: I3e1974f383974787bbfc95e06311c173fb06efdc Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-1/+1
| | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate projectsAlexandru Croitor2019-11-141-1/+0
| | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate qtdeclarative before mergeAlexandru Croitor2019-10-111-2/+0
| | | | | | | | | | | | Change-Id: I5710110679220c4e22bc7f8b540f18a51b735ddf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Generate CMake projects for qmltoolingLeander Beernaert2019-08-121-0/+30
|/ | | | | | | | Generate missing CMake projecst for qmltooling. Required for tests to pass. Change-Id: I7dbf434a547f4fad13f403f0760406132aef5e9d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QML Tooling: Fix ordering of memory events in V4 profiler adapterUlf Hermann2018-11-141-2/+5
| | | | | | | | | | | We should not send memory events that are chronologically after the next call event, even if the time threshold given by the profiler service would allow us to do so. When the remaining call events are sent, the chronological order would otherwise be violated. Fixes: QTBUG-71515 Change-Id: Iee27304f836a899b2b35133316cecd3d34f128c6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-265-4/+10
|\ | | | | | | | | | | | | | | Conflicts: src/imports/imports.pro src/src.pro Change-Id: Icdc39b6169d15b2102acd0e4d550a8d91e4b0744
| * Make QPacketProtocol independent of QmlUlf Hermann2018-04-235-4/+10
| | | | | | | | | | | | | | | | | | | | Just because we need a data stream version for QQmlDebugPacket, we don't need to add such a huge dependency. Using a template here adds some boiler plate to all users of QQmlDebugPacket, but this is worth it. Task-number: QTBUG-60996 Change-Id: Ibade8757e28ac772942129c22c8721b504da3aee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-282-3/+15
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I8276669e257f35a76768ef7f8795a8605cf4c9bc
| * QML Tooling: Don't send StartTrace if we haven't started any profilersUlf Hermann2018-03-271-2/+1
| | | | | | | | | | | | | | | | | | | | If the client requested the trace to be started before any engines were registered, this would result in a StartTrace with an empty list of engines, which would never be matched by an EndTrace. This is rather confusing. It's better to send nothing at all. Change-Id: I8728628bd7c9fe068f7275c499440f95542dcc11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QML Tooling: Remember global "enabled" flag in profiler serviceUlf Hermann2018-03-272-1/+14
| | | | | | | | | | | | | | | | | | | | If profiling has been enabled for all engines, that now also holds for engines to be registered in the future. This way the client doesn't need to employ the EngineControl service just to figure out when the first engine registers. Change-Id: I44a441bb6ead25abdadac1ae3e4edf9b0a9659f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-272-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/parser/qqmljslexer.cpp src/qml/qml/v8/qv8engine.cpp src/qml/util/qqmladaptormodel_p.h src/quick/items/qquickanimatedsprite.cpp tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp Change-Id: I16702b7a0da29c2a332afee47728d6a6ebf4fb3f
| * use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlProfilerService: Drop support for non-location-tracking clientsUlf Hermann2018-02-096-39/+24
|/ | | | | | | All known QML profiler clients track locations by now. Change-Id: I1613da87dab22cfadfc25a35678d3e816ecda189 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Shawn Rutledge2018-02-061-12/+20
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-021-12/+20
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| | * QQmlProfilerService: Only send "Complete" if no more engines are runningUlf Hermann2018-01-161-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, make sure to report all engine's events when stopping one. Otherwise the timestamps will reset when reporting multiple engines in a row (such as when stopping the application). Task-number: QTBUG-65767 Change-Id: I0a6a9170069318dd5b8a7422cb7e248c87d5adce Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | | Remove double indirection between QJSEngine and QV4::ExecutionEngineUlf Hermann2018-02-021-1/+1
|/ / | | | | | | | | | | | | | | As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQmlProfilerService: Avoid type ambiguitiesUlf Hermann2018-01-151-5/+8
| | | | | | | | | | | | | | | | | | Use C++ cast operators, and always choose types of defined length when interacting with the packet protocol. Also, don't let the client overflow the flush interval setting. Change-Id: I2f4654d4e3e350a979a989784dc61fbc8b97df2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Dissolve src/plugins/qmltooling/sharedUlf Hermann2017-11-056-10/+5
| | | | | | | | | | | | | | | | | | QQmlDebugPacket is moved to PacketProtocol, and the other headers to src/qml/debugger. This makes it easier to develop debug plugins in external repositories. Change-Id: I1ab099a304dad793ec13aaef414071cab6d7d408 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQmlEngineControlService: Make data types explicitUlf Hermann2017-10-241-4/+5
| | | | | | | | | | | | | | | | When dealing with QDataStream it's always better to specify the size of integer types. Change-Id: I23ebeef2c57a7a6238c8a4942df9e436df117e63 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-253-19/+19
|/ | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QmlProfiler: Avoid race conditions in QQmlTypeLoaderUlf Hermann2017-09-053-12/+29
| | | | | | | | | | | | | We have to make sure all profiler calls to one adapter are done from the same thread. It turns out that all the calls from QQmlTypeLoader are done from the type loader thread. By using a separate adapter for that, we avoid any extra locking. Task-number: QTBUG-62987 Change-Id: I5cffcc30b84dd4154daa0c56312a1141ce2033e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove the qqmldebugtrace benchmarkUlf Hermann2017-05-081-2/+0
| | | | | | | | | | | | It benchmarks QElapsedTimer and QDataStream. We should do this in qtbase if we need to do it. The test was not in the parent qml.pro, but it was mentioned in some outdated comments in the QML profiler plugins. Remove those comments, too. Change-Id: I0d1341c32f4a2e02a04a958f76be015fe8d927fb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-263-0/+6
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* headers: Add missing override and remove redundant virtualAlexander Volkov2016-12-071-1/+1
| | | | | | Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlDebug: Only wait in EngineControl service when "block" is activeUlf Hermann2016-11-242-2/+4
| | | | | | | | | This is more in line with the other services, and in practice we always want to switch on blocking mode when using EngineControl anyway. Change-Id: Ic8dc36b7ea0cf68ed7af670dddee8e7d351f6e0a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-11-032-6/+6
|\ | | | | | | | | | | | | Conflicts: tools/qmljs/qmljs.cpp Change-Id: Ifa9e74bdb780eaff22fbc9ba1c514d0078a3fb29
| * Cast enums to int before streaming into QDataStreamThiago Macieira2016-10-232-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are decoded as ints, as in QPacket &operator>>(QPacket &ds, QmlObjectProperty &data) { int type; ds >> type >> data.name >> data.value >> data.valueTypeName >> data.binding >> data.hasNotifySignal; data.type = (QmlObjectProperty::Type)type; return ds; } So we should serialize the same, since the required operator<< and >> don't exist. Change-Id: I33dc971f005a4848bb8ffffd1478edcf2e916dfc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlProfilerService: reduce allocationsAnton Kudryavtsev2016-10-071-7/+18
| | | | | | | | | | | | | | Use QHash::equal_range() instead of QHash::values() Change-Id: Iac84fdb12ca3f638bb23e966d822c58db602b63e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Plugins: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-262-15/+15
|/ | | | | | | | | | Mark some local variables as const to prevent detach()'ing. Use qAsConst where is not possible mark as const. If a container is changed in a loop's body, just make copy like 'foreach'. Change-Id: Ic453a688a9edf8a864d47f6e3a605164508a027c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: Make ExecutionEngine's debugger and profiler privateUlf Hermann2016-07-281-7/+7
| | | | | | | | This will allow us to #define them away on -no-qml-debug, saving two pointers per engine. Change-Id: I400cffd32cd7f55ff0e68565734b6002b9f901d5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>