aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4profiling.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Fix clashes with windows.h definesFriedemann Kleint2023-02-221-2/+2
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I92d269c1fa66ee2fe903554f17e3207d51d56b60 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Profiler: Add move operations to FunctionCallUlf Hermann2022-11-141-0/+1
| | | | | | | | | | | This requires us to check the pointer on destruction, but should make list operations faster, due to the refcount becoming unnecessary. It also fixes some compiler warnings. Fixes: QTBUG-105226 Change-Id: I4b1fe65f08fa89b6b305c34e07e12ff5e165a9f7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | 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>
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | 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>
* QML: Port QV4::CompiledData::Location to new special integer bitfieldUlf Hermann2022-05-111-2/+2
| | | | | | | | Pick-to: 5.15 6.2 6.3 Task-number: QTBUG-99545 Change-Id: If0d6f893f2351a4146ddf125be4079b5e312f308 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-1/+1
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlProfilerService: Drop support for non-location-tracking clientsUlf Hermann2018-02-091-5/+4
| | | | | | | All known QML profiler clients track locations by now. Change-Id: I1613da87dab22cfadfc25a35678d3e816ecda189 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Re-enable QML memory profilingUlf Hermann2017-11-231-1/+2
| | | | | | Task-number: QTBUG-64674 Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Qml jsruntime: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-161-1/+1
| | | | | Change-Id: Ieb99b73037bc5b07caf62121d51a17c3025df97c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlProfiler: Send RangeData and RangeLocation only once per typeUlf Hermann2016-05-271-5/+12
| | | | | | | This saves time when serializing the data to be sent. Change-Id: Ic8c534d55445934a64dd253273099194b27d98af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 profiling: Don't needlessly resolve locationsUlf Hermann2016-05-181-9/+8
| | | | | | | | Resolving locations is fairly expensive and we only need to do it once per location. Change-Id: I8716858f45da9c085e50527ada0611531641dafe Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* V4 profiler: Don't duplicate function locationsUlf Hermann2016-05-021-14/+26
| | | | | | | | | | | | Saving the name/file/line/column over and over for each function call is wasteful. We can instead key them by the pointer to the JS Function object. Also, make sure we don't accidentally detach the data when sending messages. Task-number: QTBUG-52937 Change-Id: I8a03e4003dc3239f88b49c56424df05cd8b9ef8a Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | 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>
* std::sort JS profiling data instead of insert-sorting itUlf Hermann2015-08-241-12/+17
| | | | | | | | | | | | | The original FunctionCall struct is much smaller than the resulting FunctionCallProperties, and thus not as expensive to copy. Repeatedly calling upper_bound on a QVector is not such a great idea, either. Since the usage of QVector instead of QList for the results is new in Qt 5.6, the insert-sorting got slower, making this change a fix for a performance regression. Change-Id: I7154d8cf129b7fbe6e02424fbe16442042a5c3c2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Periodically flush profiling data to client.Ulf Hermann2015-08-041-3/+2
| | | | | | | | | | | | | | | | | | | | 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 instead of QList in V4 profilerUlf Hermann2015-07-201-5/+5
| | | | | | | For complex types QVector results in better performance. Change-Id: I8ac3dccfa4272a755d36964b0373dc115f520223 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-241-0/+1
| | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move memory management related functionality into it's own folderLars Knoll2015-03-021-1/+1
| | | | | | | | | Start moving the memory related functionality into it's own folder. This will simplify refactoring of the GC related functionality later on. Change-Id: I70ec6f512af7a7897625afb84d914c17572b0ccd 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>
* Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-18/+20
| | | | | | | | | | | | Some features, like the memory profiler, create huge amounts of data. Often enough, we're not actually interested in all the data available from the profiler and collecting it all can lead to excessive memory consumption. This change enables us to optionally turn various aspects of QML profiling off. Task-number: QTBUG-41118 Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new licensesJani Heikkinen2014-08-251-18/+10
| | | | | | | | | - 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>
* Properly initialize heap profiler when starting profilingUlf Hermann2014-06-121-1/+18
| | | | | Change-Id: Ia994464b2150dc9a9185280ae0e2f8c615393310 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Javascript heap profilerUlf Hermann2014-06-061-1/+3
| | | | | | | | | 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>
* Remove nArguments and name from QV4::FunctionLars Knoll2014-03-031-1/+1
| | | | | | | | Saves 12 bytes per Function Change-Id: I9a495805f9201eb6162a520ff5c2defeb73dc37a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Satellite profiler for V4Ulf Hermann2014-02-121-0/+101
Self-contained profiler for V4. By itself it doesn't have any connections to qqmlprofilerservice. Change-Id: I471a6119e07eab9c5f4712a16835be49c8886d1a Reviewed-by: Kai Koehne <kai.koehne@digia.com>