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/qqmlcomponent.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/qqmlcomponent.cpp')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index c210639b53..ffa08c3ad5 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -65,6 +65,7 @@ #include <QStringList> #include <QtCore/qdebug.h> #include <qqmlinfo.h> +#include "qqmlmemoryprofiler_p.h" QT_BEGIN_NAMESPACE @@ -744,6 +745,7 @@ QQmlComponent::QQmlComponent(QQmlComponentPrivate &dd, QObject *parent) QObject *QQmlComponent::create(QQmlContext *context) { Q_D(QQmlComponent); + QML_MEMORY_SCOPE_URL(url()); if (!context) context = d->engine->rootContext(); |