aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qv4mm
Commit message (Collapse)AuthorAgeFilesLines
* Trigger the garbage collector when allocating InternalClass objectsUlf Hermann2019-03-261-20/+34
| | | | | | | | | | | | | | | | | As we check the icAllocator's slots on shouldRunGC() we should also check shouldRunGC() when adding slots. Otherwise we might never run the GC when only allocating InternalClasses. In addition, account for the "unmanaged" size of the PropertyAttributes that are part of the InternalClass objects. Those can be large. In cases where an excessive number of large InternalClass objects is created the garbage collector is now invoked frequently, which costs a significant number of CPU cycles, but prevents the memory usage from growing indefinitely. Task-number: QTBUG-58559 Change-Id: Icf102cb6100f6dba212b8bffe1c178897880eda0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: Don't mark InternalClass::parent when garbage collectingUlf Hermann2019-03-201-0/+26
| | | | | | | | | | The parent pointer is only kept so that we can update the parent's transitions when removing a child. There is no need to keep the parents alive for the children. Fixes: QTBUG-58559 Change-Id: Ia28183966bde6d478ca030fe11195489925dfc13 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* MemoryManager: Only clear weak values onceUlf Hermann2019-01-233-2/+88
| | | | | | | | | | | | We want to keep the weak values alive while the destruction callbacks are running, so that they can still access them. We set them to undefined later anyway because we expect the destruction callbacks to mess with the values. Therefore there is no point in also setting them in between. Fixes: QTBUG-72137 Change-Id: I83f70230f5b4ad2761c74770f975b14a5ca71f18 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: Avoid copying WeakValues with wrapped QObjectsUlf Hermann2018-11-221-0/+40
| | | | | | | | | | | Such WeakValues are kept alive until the respective QObject is deleted. Therefore they are quite expensive. In this case we don't actually need a copy as on retrieval we only want a ReturnValue and on inserting we just want to replace the value in the map. Fixes: QTBUG-71817 Change-Id: I385c55140337d468289046243941077ba1ff61a3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Remove QV4_MM_* env variables from old GCMichael Winkelmann2018-03-081-9/+2
| | | | | | | | With the new block based allocator introduced in 5.9, these variables have no effect anymore. Also removed or modified the related autotests. Change-Id: I3acbdd89ef75b93cebb065313e689e0a360d8687 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Increase test coverage for the V4 memory managerFrank Meerkoetter2016-06-202-0/+66
This commit adds a small test that exercises a number of code paths inside qv4mm.cpp which are normally gated via environment variables. Change-Id: Ibe959387a9b86ce68df258513446d2165fe06ee2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>