summaryrefslogtreecommitdiffstats
path: root/src/tools/tracegen
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-072-2/+2
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in other toolsJarek Kobus2020-06-253-9/+9
| | | | | | Task-number: QTBUG-84469 Change-Id: I90d0e2e723bb4d205d7bf333b21cdf583fdf4ea0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Make it possible to build tools when cross-compilingLeander Beernaert2020-06-022-2/+4
| | | | | | | | | | | | | | | | | | | This patch allows tools to be built for the target platform when the QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration time. To avoid naming conflicts, the target tools are suffixed with "_native". The qt_get_tool_target_name() function can be used to get the tool name for both scenarios (cross and non-cross compilation). Extend pro2cmake to refer to the right target name for tools. The relevant write_XXX functions have a new target_ref parameter that will be "${target_name}" for tools and literally the target name for everything else. Fixes: QTBUG-81901 Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Port tracedef to QRegularExpressionLars Knoll2020-04-131-20/+22
| | | | | Change-Id: I38bbf36719c99d4fda102eca375011c38792dd4a Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-2/+1
|\ | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-2/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Mark the old style unprefixed stream functions deprecatedAllan Sandfeld Jensen2019-12-161-1/+1
| | | | | | | | | | | | | | | | Requires a third definition for the source-compatible but deprecated version. Change-Id: I260ae79f4547f99eed701b10e0b25222f81cd5ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-101-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| | * Fix compile with tracing enabled: include QStringList headerMilian Wolff2019-10-091-0/+1
| | | | | | | | | | | | | | | Change-Id: I40f737338d10a871442bb453fe1eeede9dacec79 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate src/*Alexandru Croitor2019-11-142-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate everything under ./srcAlexandru Croitor2019-11-122-2/+0
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | | Regenerate tools projectsAlexandru Croitor2019-10-081-0/+21
| | | | | | | | | | | | | | | | | | Change-Id: I69a56ca2bd1d5f983197c6cde400c191c5dc7bd9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-141-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
| * | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-06-061-1/+1
| |/ / | | | | | | | | | Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-032-2/+0
|\| | | | | | | | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * | QRegExp include cleanupSamuel Gaist2019-04-192-2/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-165-20/+52
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-064-17/+47
| |\ | | | | | | | | | Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
| | * Forward declare all types required for compilation with `-trace`Milian Wolff2019-04-054-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes compilation with `-trace lttng` or `-trace etw`. We need to forward declare QEvent, QImageReader etc., otherwise the types will be unknown while compiling the trace points. In order to handle this generically, the tracegen utility is extended to support a 'prefix text' in the `*.tracepoints` input files. Any text within curly braces will be embedded as-is in the generated file. This can then be used to add forward declarations for the types we need, including potential namespaces and such. Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
* | | On second thought, install tracegen and qfloat16-tables toolsAlexandru Croitor2019-04-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are not needed per se for a host build, but they are still needed for a cross build (because we don't build tools in that case). Task-number: QTBUG-74133 Change-Id: I891e3852c6846119956982a7bdbf449ad7c4836c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | Stop installing unnecessary thingsAlexandru Croitor2019-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: - tests - tools that are only used duing the Qt build (tracegen and qfloat16-tables) Change-Id: I3a5f678682b5b9318012568a9e4dcdda0967f89b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | CMake: Re-generate bootstrap-related CMakeLists.txt filesTobias Hunger2019-03-041-7/+17
| | | | | | | | | | | | | | | Change-Id: Ia4be80729807c6aaac5b22a0dab81a841d57bdcd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* / Fix build with no-cast-from-asciiSimon Hausmann2018-10-141-1/+1
|/ | | | | Change-Id: I720ceb4e511c914b924c473470f65b5b248f682a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tracepoints: fix ETW generator for pointersAlessandro Ambrosano2018-08-251-0/+3
| | | | | | | | Fixes compilation failure on Windows, due to TraceLoggingValue not correctly casting pointer arguments to a known type. Change-Id: I6027debe4ea3440588dd8677209d6d47048b6b0f Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Tracegen: code tidiesGiuseppe D'Angelo2018-06-291-16/+9
| | | | | | | | | | | | | | | | | * Do not rely on the side-effect that QTextStream returns _null_ strings (rather than empty strings) to signal EOF; just check for it, making the code easier to read. * Scope a variable properly * Use the char-based functions, rather than string-based functions (e.g. QString::split(QChar), not QString::split(QString)) when we're actually passing just one character * Make error cases more verbose Change-Id: I415773a60ea1b9013193a9a77e52655a6459047d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Tracegen: add support for pointers and intptr-like typesGiuseppe D'Angelo2018-06-283-3/+17
| | | | | | | | | | | In general we want to support pointers and pointer-like types (intptr and its variations); the main use case is tracing an object's address. Adjust the lttgt generator to use hex formatting for this kind of aguments; ETW recognizes the pointer argument type automatically. Change-Id: I8249a49b6d0b2d468b84c0fbb7624625421cde9a Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Support for LTTNG and ETW tracingRafael Roquetto2018-01-2814-0/+1417
This commit introduces minimal support for instrumentation within Qt. Currently, only LTTNG/Linux and ETW/Windows are supported. Change-Id: I59b48cf83acf5532a998bb493e6379e9177e14c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>