diff options
author | Glenn Watson <glenn.watson@nokia.com> | 2012-05-15 11:57:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-15 05:30:26 +0200 |
commit | e0eec47cac3f9f06613011dd70db74b7cd7d61ef (patch) | |
tree | a7def7294cf3d32493ba79f25b182889ea51bfd8 /src/qml/qml/qqmlincubator.cpp | |
parent | fec5068733373750d3a913fe3e6b3464a3f7275b (diff) |
Add hooks for declarative memory profiler.
These macros effectively do nothing if the profiling library has not
been preloaded. However, if the library is loaded they provide some
additional context for each heap allocation, by tagging each
subsequent allocation with the QML file that caused the allocation
to occur.
Change-Id: Ib1f56d0df0664e118e04e53e22a6942317b1baed
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index bd3fe52355..3cd03a9b1b 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -45,6 +45,7 @@ #include "qqmlcompiler_p.h" #include "qqmlexpression_p.h" +#include "qqmlmemoryprofiler_p.h" // XXX TODO // - check that the Component.onCompleted behavior is the same as 4.8 in the synchronous and @@ -259,6 +260,8 @@ void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i) { if (!component) return; + QML_MEMORY_SCOPE_URL(component->url); + typedef QQmlIncubatorPrivate IP; QRecursionWatcher<IP, &IP::recursion> watcher(this); |