From 54d9a58cf15e72f24cbf74281996835458bd6e23 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 1 Jun 2009 11:12:38 +1000 Subject: Remove some pointless perf metrics --- src/declarative/fx/qfxpath.cpp | 2 +- src/declarative/qml/qmlcompiler.cpp | 2 +- src/declarative/qml/qmlcomponent.cpp | 3 --- src/declarative/qml/qmlengine.cpp | 18 ------------------ src/declarative/qml/qmlmetaproperty.cpp | 4 ---- src/declarative/qml/qmlvme.cpp | 2 +- src/declarative/util/qfxperf.cpp | 30 +++++++++++------------------- src/declarative/util/qfxperf.h | 18 ++++++------------ 8 files changed, 20 insertions(+), 59 deletions(-) diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index 5deaaa5..be731b1 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -357,7 +357,7 @@ void QFxPath::createPointCache() const { Q_D(const QFxPath); #ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer pc; + QFxPerfTimer pc; #endif qreal pathLength = d->_path.length(); const int points = int(pathLength*2); diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 3029934..46695b7 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -470,7 +470,7 @@ bool QmlCompiler::compile(QmlEngine *engine, QmlCompiledComponent *out) { #ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer pc; + QFxPerfTimer pc; #endif exceptions.clear(); diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 24b5dd2..78137e8 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -458,9 +458,6 @@ QObject *QmlComponent::beginCreate(QmlContext *context) return 0; } -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif if (!d->engine->d_func()->rootComponent) d->engine->d_func()->rootComponent = this; diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index c67c220..18f28ed 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -1275,9 +1275,6 @@ QmlContextScriptClass::queryProperty(const QScriptValue &object, QueryFlags flags, uint *id) { Q_UNUSED(flags); -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QmlContext *bindContext = static_cast(object.data().toQObject()); QueryFlags rv = 0; @@ -1308,9 +1305,6 @@ QScriptValue QmlContextScriptClass::property(const QScriptValue &object, const QScriptString &name, uint id) { -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QmlContext *bindContext = static_cast(object.data().toQObject()); @@ -1369,9 +1363,6 @@ void QmlContextScriptClass::setProperty(QScriptValue &object, { Q_UNUSED(name); -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QmlContext *bindContext = static_cast(object.data().toQObject()); @@ -1422,9 +1413,6 @@ QScriptClass::QueryFlags QmlObjectScriptClass::queryProperty(const QScriptValue QueryFlags flags, uint *id) { Q_UNUSED(flags); -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QObject *obj = object.data().toQObject(); QueryFlags rv = 0; QString propName = name.toString(); @@ -1443,9 +1431,6 @@ QScriptValue QmlObjectScriptClass::property(const QScriptValue &object, const QScriptString &name, uint id) { -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QObject *obj = object.data().toQObject(); #ifdef PROPERTY_DEBUG @@ -1472,9 +1457,6 @@ void QmlObjectScriptClass::setProperty(QScriptValue &object, { Q_UNUSED(name); -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif QObject *obj = object.data().toQObject(); #ifdef PROPERTY_DEBUG diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp index 3aa4f1d..4f39ebc 100644 --- a/src/declarative/qml/qmlmetaproperty.cpp +++ b/src/declarative/qml/qmlmetaproperty.cpp @@ -196,10 +196,6 @@ QmlMetaProperty::QmlMetaProperty(QObject *obj, const QString &name) QmlMetaProperty::QmlMetaProperty(QObject *obj, const QString &name, QmlContext *ctxt) : d(new QmlMetaPropertyPrivate) { -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif - d->context = ctxt; initProperty(obj, name); } diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index e68afcc..c85524f 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -201,7 +201,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in #ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer cr; + QFxPerfTimer cr; #endif QmlEnginePrivate::SimpleList bindValues; QmlEnginePrivate::SimpleList parserStatus; diff --git a/src/declarative/util/qfxperf.cpp b/src/declarative/util/qfxperf.cpp index 01ac878..3da52d8 100644 --- a/src/declarative/util/qfxperf.cpp +++ b/src/declarative/util/qfxperf.cpp @@ -44,32 +44,24 @@ QT_BEGIN_NAMESPACE Q_DEFINE_PERFORMANCE_LOG(QFxPerf, "QFx") { - 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(QmlParsing, "Compilation: QML Parsing"); + Q_DEFINE_PERFORMANCE_METRIC(Compilation, " QML Compilation"); + Q_DEFINE_PERFORMANCE_METRIC(VMEExecution, "Execution: QML VME Execution"); 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"); - Q_DEFINE_PERFORMANCE_METRIC(PathCache, "Path cache"); - Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, "Particle creation"); Q_DEFINE_PERFORMANCE_METRIC(FontDatabase, "Font database creation"); - Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, "QFxItem::componentComplete"); - Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, "QFxImage::componentComplete"); - 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(QFxText_setText, "QFxText::setText"); + Q_DEFINE_PERFORMANCE_METRIC(QFxPathViewPathCache, "FX Items: QFxPathView: Path cache"); + Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, " QFxParticles: Particle creation"); + Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, " QFxItem::componentComplete"); + Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, " QFxImage::componentComplete"); + 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(QFxText_setText, " QFxText::setText"); Q_DEFINE_PERFORMANCE_METRIC(AddScript, "QmlScript::addScriptToEngine"); } QT_END_NAMESPACE diff --git a/src/declarative/util/qfxperf.h b/src/declarative/util/qfxperf.h index 23de8b5..9fcf1d6 100644 --- a/src/declarative/util/qfxperf.h +++ b/src/declarative/util/qfxperf.h @@ -51,25 +51,19 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) Q_DECLARE_PERFORMANCE_LOG(QFxPerf) { Q_DECLARE_PERFORMANCE_METRIC(QmlParsing) - Q_DECLARE_PERFORMANCE_METRIC(Compile) - Q_DECLARE_PERFORMANCE_METRIC(CompileRun) - Q_DECLARE_PERFORMANCE_METRIC(CreateComponent) + + Q_DECLARE_PERFORMANCE_METRIC(Compilation) + Q_DECLARE_PERFORMANCE_METRIC(VMEExecution) + 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) - Q_DECLARE_PERFORMANCE_METRIC(PathCache) - Q_DECLARE_PERFORMANCE_METRIC(CreateParticle) Q_DECLARE_PERFORMANCE_METRIC(FontDatabase) + Q_DECLARE_PERFORMANCE_METRIC(QFxPathViewPathCache) + Q_DECLARE_PERFORMANCE_METRIC(CreateParticle) Q_DECLARE_PERFORMANCE_METRIC(ItemComponentComplete) Q_DECLARE_PERFORMANCE_METRIC(ImageComponentComplete) Q_DECLARE_PERFORMANCE_METRIC(ComponentInstanceComponentComplete) -- cgit v0.12