diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-15 21:05:45 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-02-15 21:05:45 +0100 |
commit | cf142cd637620e2af6ede46c4f2cefe0206d6159 (patch) | |
tree | 10ec6455b795a45152999e74335e5ae7f592903a /src/qml/memory/qv4mm.cpp | |
parent | 70f35501da4d1bbb36703dcc7b121c454f8d57a9 (diff) | |
parent | 238cc098d785b4fe76fbc8422b340d98ff8c1a1b (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I2d4c012c8ca578f90d7eb56dbc6b306ac7cbb841
Diffstat (limited to 'src/qml/memory/qv4mm.cpp')
-rw-r--r-- | src/qml/memory/qv4mm.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index 4a0c12b9da..9c51013317 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -342,6 +342,9 @@ bool Chunk::sweep(ExecutionEngine *engine) v->destroy(b); b->_checkIsDestroyed(); } +#ifdef V4_USE_HEAPTRACK + heaptrack_report_free(itemToFree); +#endif } Q_V4_PROFILE_DEALLOC(engine, qPopulationCount((objectBitmap[i] | extendsBitmap[i]) - (blackBitmap[i] | e)) * Chunk::SlotSize, @@ -390,6 +393,9 @@ void Chunk::freeAll(ExecutionEngine *engine) b->vtable()->destroy(b); b->_checkIsDestroyed(); } +#ifdef V4_USE_HEAPTRACK + heaptrack_report_free(itemToFree); +#endif } Q_V4_PROFILE_DEALLOC(engine, (qPopulationCount(objectBitmap[i]|extendsBitmap[i]) - qPopulationCount(e)) * Chunk::SlotSize, Profiling::SmallItem); @@ -602,6 +608,9 @@ HeapItem *BlockAllocator::allocate(size_t size, bool forceAllocation) { done: m->setAllocatedSlots(slotsRequired); Q_V4_PROFILE_ALLOC(engine, slotsRequired * Chunk::SlotSize, Profiling::SmallItem); +#ifdef V4_USE_HEAPTRACK + heaptrack_report_alloc(m, slotsRequired * Chunk::SlotSize); +#endif // DEBUG << " " << hex << m->chunk() << m->chunk()->objectBitmap[0] << m->chunk()->extendsBitmap[0] << (m - m->chunk()->realBase()); return m; } @@ -659,6 +668,9 @@ HeapItem *HugeItemAllocator::allocate(size_t size) { chunks.push_back(HugeChunk{c, size}); Chunk::setBit(c->objectBitmap, c->first() - c->realBase()); Q_V4_PROFILE_ALLOC(engine, size, Profiling::LargeItem); +#ifdef V4_USE_HEAPTRACK + heaptrack_report_alloc(c, size); +#endif return c->first(); } @@ -675,6 +687,9 @@ static void freeHugeChunk(ChunkAllocator *chunkAllocator, const HugeItemAllocato b->_checkIsDestroyed(); } chunkAllocator->free(c.chunk, c.size); +#ifdef V4_USE_HEAPTRACK + heaptrack_report_free(c.chunk); +#endif } void HugeItemAllocator::sweep(ClassDestroyStatsCallback classCountPtr) |