aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4profiling_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-10/+10
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-271-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-1/+1
|/ | | | | | | All known QML profiler clients track locations by now. Change-Id: I1613da87dab22cfadfc25a35678d3e816ecda189 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build without QML debuggingUlf Hermann2018-01-161-0/+4
| | | | | Change-Id: Ie1b18dd00705b1913572b87c6968a63438e7a90c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-091-6/+14
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/memory/qv4mm.cpp src/qml/qml/qqmlbinding.cpp Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
| * Re-enable QML memory profilingUlf Hermann2017-11-231-6/+14
| | | | | | | | | | | | Task-number: QTBUG-64674 Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | V4 Profiler: Re-add memory profiling macrosUlf Hermann2018-01-091-0/+12
| | | | | | | | | | | | | | This is a partial revert of 6a91dcba2e4fa85dc345c2d403c757ab7676e28c Change-Id: I3a501c6a8f17cea8192dca1dba493a8351e429da Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/new-backend' into devSimon Hausmann2017-11-211-28/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir_p.h src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4vme_moth.cpp tests/auto/qml/qml.pro Change-Id: Ia7b6ec24c7fcbcbb1786d9e798d2df294020ae37
| * | Always create a valid CallData object for interpreter callsLars Knoll2017-08-101-28/+11
| | | | | | | | | | | | | | | | | | | | | | | | This will allow removing a few more special cases and to simplify the code further. Change-Id: I3a958e9f68e3c103ea4f2ee6825f893e5931b11d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Refactor context handlingLars Knoll2017-08-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the push/pop context instructions to not modify the JS stack anymore, as that can cause conflicts with the VME (and was an ugly hack in any case). Instead, these instructions not return the old context, that is then stored in a temporary. Get rid of Engine::current and Engine::currentContext. The StackFrame structures do now contain the only and authoritive data. This finally gives us a nice setup where we create and destroy frames on the stack when entering/leaving functions. Change-Id: If161e3e941f59865c47ecfe1e094faf62b52bfa0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Introduce a JS stack frame that corresponds to the C++ stack frameLars Knoll2017-08-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The frame currently contains the function itself and the current context. Change-Id: I7d3402627fbc90e860a7bdc277585f365f5b4cb5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | No need to pass the Engine pointer to VME::exec()Lars Knoll2017-08-031-5/+5
| | | | | | | | | | | | | | | Change-Id: I1e43305e26833a6d9b714e89f59ccead6bd12605 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * | Get rid of the compilation unit related members in ExecutionContextLars Knoll2017-08-031-2/+2
| |/ | | | | | | | | | | | | | | | | | | And change the signature for VME::exec to take the QV4::Function that should be executed. This is in preparation to being able to run functions that will not need to allocate an execution context on their own. Change-Id: I34538a8723006f4ec24583805e88a66e750100c3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* / Make qml-debug a proper featureUlf Hermann2017-11-081-2/+2
|/ | | | | Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix -no-qmldebug debug build with MSVCKai Koehne2017-02-011-1/+1
| | | | | | | | | [Platform Specific Changes][Windows] Fixed compilation on MSVC with -no-qml-debug configure argument. Task-number: QTBUG-58412 Change-Id: I915ed3d345b3f1e4e5863456522784ab6c9b15cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4 Profiler: Don't delete compilation units when copying trace dataUlf Hermann2016-12-201-3/+2
| | | | | | | | | | | | | If the trace data is the only thing holding a reference to a particular compilation unit and we are copying the last FunctionCall from that compilationUnit onto the second last, we have to first addref() and then release() as otherwise it might disappear in between. Also we don't need to check m_function for null, as the ctor guarantees it is never null. Change-Id: I6eaf64abe71f9785d4e76e18dabd9a0676564da1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Make the first QML profiling check as quick as possibleErik Verbruggen2016-12-011-1/+1
| | | | | | | | In most cases there is no QML profiler attached, so hint the compiler about that. Change-Id: Ied75e58e608ccc689d2a9a1b0bf6e8f65769c94f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Make ExecutionEngine's debugger and profiler privateUlf Hermann2016-07-281-9/+9
| | | | | | | | 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>
* Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-281-0/+20
| | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Don't pass size and pointer through allocation trackersUlf Hermann2016-07-281-21/+20
| | | | | | | | By not relying on the return value of the macros we can #define them away later, when compiling with -no-qml-debug Change-Id: I24d50fa3f5d8e8765a42b050c81ddfae20f20a23 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-281-1/+0
| | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlProfiler: Send RangeData and RangeLocation only once per typeUlf Hermann2016-05-271-1/+48
| | | | | | | 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-1/+11
| | | | | | | | 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-2/+12
| | | | | | | | | | | | 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>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* std::sort JS profiling data instead of insert-sorting itUlf Hermann2015-08-241-0/+1
| | | | | | | | | | | | | 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>
* 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>
* 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>
* Change signature or runtime methods to take an engine pointerLars Knoll2014-11-121-5/+5
| | | | | | | | | This makes a lot more sense in the long term and is the more maintainable solution, once the GC starts moving objects around in memory Change-Id: I8f327c0f5b5b0af38c5fe1a217852ee8c4a5c2fc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlExpression/QQmlScriptString/QQmlBinding crashesSimon Hausmann2014-10-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | In the QQmlScriptString we store the binding id and it is an index into the runtimeFunctions array of the compilation unit. However we don't store the compilation unit and instead in QQmlBinding and QQmlExpression try to retrieve it from the cache via the context url (we have the context after all). That turns out to be not a reliable way, as sometimes the URL might slightly differ from the originally compiled cache (qrc:/// turning to qrc:/ maybe). Consequently the type is (unnecessarily) compiled again and unfortunately not _linked_, therefore the runtime functions array is empty. Another option is that when the component was created from a QByteArray, then no entry exists in the cache in the first place. This patch addresses the problem by storing a reference to the compilation unit in the QQmlContextData. That we can safely retrieve and it'll make sure the compilation unit also stays alive. In the process of that the manual reference counting was switched over to QQmlRefCount and QQmlRefPointer for QV4::CompilationUnit. Task-number: QTBUG-41193 Change-Id: I9111f9a3b65618e453954abcd789c039e65a94f7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-5/+13
| | | | | | | | | | | | 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>
* Profiler: Fix MSVC warning about signed integers.Friedemann Kleint2014-07-031-1/+1
| | | | | | | | | src\qml\jsruntime\qv4profiling_p.h(144) : warning C4146: unary minus operator applied to unsigned type, result still unsigned Introduced by ac56e7cda724aa7463ef6ffe5f0e93bd3208cb51 . Change-Id: Ib77234d663bfafd9d55ae2dd551b0aabd6561d6d Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* Properly initialize heap profiler when starting profilingUlf Hermann2014-06-121-1/+2
| | | | | Change-Id: Ia994464b2150dc9a9185280ae0e2f8c615393310 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Javascript heap profilerUlf Hermann2014-06-061-1/+39
| | | | | | | | | 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>
* Satellite profiler for V4Ulf Hermann2014-02-121-0/+169
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>