diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-03 19:28:35 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-11 11:41:27 +0200 |
commit | 1de6e7b8e0ee465f642e1b2f5a14611e52a7e8c2 (patch) | |
tree | 3ac952d6e7539c0fda1fe3c9cd7f16ace849c91a /src/qml/debugger/qqmlprofiler.cpp | |
parent | 85627c26afb087975fe2e57f91837c9314d54ba7 (diff) |
Select specific features to be recorded when profiling QML
Some features, like the memory profiler, create huge amounts of data.
Often enough, we're not actually interested in all the data available
from the profiler and collecting it all can lead to excessive memory
consumption. This change enables us to optionally turn various aspects
of QML profiling off.
Task-number: QTBUG-41118
Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/qml/debugger/qqmlprofiler.cpp')
-rw-r--r-- | src/qml/debugger/qqmlprofiler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/debugger/qqmlprofiler.cpp b/src/qml/debugger/qqmlprofiler.cpp index 3a647e704d..b102201ff1 100644 --- a/src/qml/debugger/qqmlprofiler.cpp +++ b/src/qml/debugger/qqmlprofiler.cpp @@ -82,9 +82,9 @@ QQmlProfilerAdapter::QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEngin QQmlAbstractProfilerAdapter(service) { engine->enableProfiler(); - connect(this, SIGNAL(profilingEnabled()), engine->profiler, SLOT(startProfiling())); - connect(this, SIGNAL(profilingEnabledWhileWaiting()), - engine->profiler, SLOT(startProfiling()), Qt::DirectConnection); + connect(this, SIGNAL(profilingEnabled(quint64)), engine->profiler, SLOT(startProfiling(quint64))); + connect(this, SIGNAL(profilingEnabledWhileWaiting(quint64)), + engine->profiler, SLOT(startProfiling(quint64)), Qt::DirectConnection); connect(this, SIGNAL(profilingDisabled()), engine->profiler, SLOT(stopProfiling())); connect(this, SIGNAL(profilingDisabledWhileWaiting()), engine->profiler, SLOT(stopProfiling()), Qt::DirectConnection); @@ -111,21 +111,21 @@ void QQmlProfilerAdapter::receiveData(const QList<QQmlProfilerData> &new_data) } -QQmlProfiler::QQmlProfiler() : enabled(false) +QQmlProfiler::QQmlProfiler() : featuresEnabled(0) { static int metatype = qRegisterMetaType<QList<QQmlProfilerData> >(); Q_UNUSED(metatype); m_timer.start(); } -void QQmlProfiler::startProfiling() +void QQmlProfiler::startProfiling(quint64 features) { - enabled = true; + featuresEnabled = features; } void QQmlProfiler::stopProfiling() { - enabled = false; + featuresEnabled = false; reportData(); m_data.clear(); } |