summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-20 05:44:34 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-20 05:44:34 (GMT)
commitb5bada2b06d85ea74a851b98d3652aff8e64a723 (patch)
tree62ec1052863e2f9c702f5507c65cb2420aa91ccc /src
parente4d41f8090838359ae0deb1af410e8a501a6a9b6 (diff)
downloadQt-b5bada2b06d85ea74a851b98d3652aff8e64a723.zip
Qt-b5bada2b06d85ea74a851b98d3652aff8e64a723.tar.gz
Qt-b5bada2b06d85ea74a851b98d3652aff8e64a723.tar.bz2
Cleanup and fixes for performance logging.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfximage.cpp3
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp5
-rw-r--r--src/declarative/util/qfxperf.cpp17
-rw-r--r--src/declarative/util/qfxperf.h13
4 files changed, 22 insertions, 16 deletions
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 4197a80..064580e 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -863,6 +863,9 @@ QString QFxImage::source() const
void QFxImage::setSource(const QString &url)
{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QFxPerfTimer<QFxPerf::PixmapLoad> perf;
+#endif
Q_D(QFxImage);
if (url == d->source)
return;
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index ead7ee5..435a586 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -12,6 +12,8 @@
#include <QStack>
#include <QtDebug>
+#include <qfxperf.h>
+
QT_BEGIN_NAMESPACE
using namespace JavaScript;
@@ -621,6 +623,9 @@ QmlScriptParser::~QmlScriptParser()
bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url)
{
+#ifdef Q_ENABLE_PERFORMANCE_LOG
+ QFxPerfTimer<QFxPerf::QmlParsing> pt;
+#endif
const QString fileName = url.toString();
QTextStream stream(data, QIODevice::ReadOnly);
diff --git a/src/declarative/util/qfxperf.cpp b/src/declarative/util/qfxperf.cpp
index 5ce8646..ae51157 100644
--- a/src/declarative/util/qfxperf.cpp
+++ b/src/declarative/util/qfxperf.cpp
@@ -44,16 +44,20 @@
QT_BEGIN_NAMESPACE
Q_DEFINE_PERFORMANCE_LOG(QFxPerf, "QFx") {
- Q_DEFINE_PERFORMANCE_METRIC(XmlParsing, "XML Parsing");
- Q_DEFINE_PERFORMANCE_METRIC(Compile, "XML Compilation");
- Q_DEFINE_PERFORMANCE_METRIC(CompileRun, "XML Compilation Run");
- Q_DEFINE_PERFORMANCE_METRIC(CssParsing, "CSS Parsing");
+ Q_DEFINE_PERFORMANCE_METRIC(QmlParsing, "QML Parsing");
+ Q_DEFINE_PERFORMANCE_METRIC(Compile, "QML Compilation");
+ Q_DEFINE_PERFORMANCE_METRIC(CompileRun, "QML Compilation Run");
Q_DEFINE_PERFORMANCE_METRIC(CreateComponent, "Component creation");
Q_DEFINE_PERFORMANCE_METRIC(BindInit, "BindValue Initialization");
Q_DEFINE_PERFORMANCE_METRIC(BindCompile, "BindValue compile");
Q_DEFINE_PERFORMANCE_METRIC(BindValue, "BindValue execution");
Q_DEFINE_PERFORMANCE_METRIC(BindValueSSE, "BindValue execution SSE");
Q_DEFINE_PERFORMANCE_METRIC(BindValueQt, "BindValue execution QtScript");
+ Q_DEFINE_PERFORMANCE_METRIC(ContextQuery, "QtScript: Query Context");
+ Q_DEFINE_PERFORMANCE_METRIC(ContextProperty, "QtScript: Context Property");
+ Q_DEFINE_PERFORMANCE_METRIC(ObjectQuery, "QtScript: Query Object");
+ Q_DEFINE_PERFORMANCE_METRIC(ObjectProperty, "QtScript: Object Property");
+ Q_DEFINE_PERFORMANCE_METRIC(ObjectSetProperty, "QtScript: Set Object Property");
Q_DEFINE_PERFORMANCE_METRIC(BindableValueUpdate, "QmlBindableValue::update");
Q_DEFINE_PERFORMANCE_METRIC(PixmapLoad, "Pixmap loading");
Q_DEFINE_PERFORMANCE_METRIC(MetaProperty, "Meta property resolution");
@@ -65,11 +69,6 @@ Q_DEFINE_PERFORMANCE_LOG(QFxPerf, "QFx") {
Q_DEFINE_PERFORMANCE_METRIC(ComponentInstanceComponentComplete, "QFxComponentInstance::componentComplete");
Q_DEFINE_PERFORMANCE_METRIC(BaseLayoutComponentComplete, "QFxBaseLayout::componentComplete");
Q_DEFINE_PERFORMANCE_METRIC(TextComponentComplete, "QFxText::componentComplete");
- Q_DEFINE_PERFORMANCE_METRIC(ContextQuery, "QtScript: Query Context");
- Q_DEFINE_PERFORMANCE_METRIC(ContextProperty, "QtScript: Context Property");
- Q_DEFINE_PERFORMANCE_METRIC(ObjectQuery, "QtScript: Query Object");
- Q_DEFINE_PERFORMANCE_METRIC(ObjectProperty, "QtScript: Object Property");
- Q_DEFINE_PERFORMANCE_METRIC(ObjectSetProperty, "QtScript: Set Object Property");
Q_DEFINE_PERFORMANCE_METRIC(QFxText_setText, "QFxText::setText");
}
QT_END_NAMESPACE
diff --git a/src/declarative/util/qfxperf.h b/src/declarative/util/qfxperf.h
index b1f9bd0..d1f3a5b 100644
--- a/src/declarative/util/qfxperf.h
+++ b/src/declarative/util/qfxperf.h
@@ -50,16 +50,20 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
Q_DECLARE_PERFORMANCE_LOG(QFxPerf) {
- Q_DECLARE_PERFORMANCE_METRIC(XmlParsing);
+ Q_DECLARE_PERFORMANCE_METRIC(QmlParsing);
Q_DECLARE_PERFORMANCE_METRIC(Compile);
Q_DECLARE_PERFORMANCE_METRIC(CompileRun);
- Q_DECLARE_PERFORMANCE_METRIC(CssParsing);
Q_DECLARE_PERFORMANCE_METRIC(CreateComponent);
Q_DECLARE_PERFORMANCE_METRIC(BindInit);
Q_DECLARE_PERFORMANCE_METRIC(BindCompile);
Q_DECLARE_PERFORMANCE_METRIC(BindValue);
Q_DECLARE_PERFORMANCE_METRIC(BindValueSSE);
Q_DECLARE_PERFORMANCE_METRIC(BindValueQt);
+ Q_DECLARE_PERFORMANCE_METRIC(ContextQuery);
+ Q_DECLARE_PERFORMANCE_METRIC(ContextProperty);
+ Q_DECLARE_PERFORMANCE_METRIC(ObjectQuery);
+ Q_DECLARE_PERFORMANCE_METRIC(ObjectProperty);
+ Q_DECLARE_PERFORMANCE_METRIC(ObjectSetProperty);
Q_DECLARE_PERFORMANCE_METRIC(BindableValueUpdate);
Q_DECLARE_PERFORMANCE_METRIC(PixmapLoad);
Q_DECLARE_PERFORMANCE_METRIC(MetaProperty);
@@ -71,11 +75,6 @@ Q_DECLARE_PERFORMANCE_LOG(QFxPerf) {
Q_DECLARE_PERFORMANCE_METRIC(ComponentInstanceComponentComplete);
Q_DECLARE_PERFORMANCE_METRIC(BaseLayoutComponentComplete);
Q_DECLARE_PERFORMANCE_METRIC(TextComponentComplete);
- Q_DECLARE_PERFORMANCE_METRIC(ContextQuery);
- Q_DECLARE_PERFORMANCE_METRIC(ContextProperty);
- Q_DECLARE_PERFORMANCE_METRIC(ObjectQuery);
- Q_DECLARE_PERFORMANCE_METRIC(ObjectProperty);
- Q_DECLARE_PERFORMANCE_METRIC(ObjectSetProperty);
Q_DECLARE_PERFORMANCE_METRIC(QFxText_setText);
}