QmlProfiler: Allow preselection of events to be recorded

This allows us to reduce the amount of data we need to handle
if the user isn't interested in certain categories.

Task-number: QTBUG-41118
Change-Id: Ieaac12fb1dec29d6035642f433bc1a1d49e545c2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-09-09 18:22:58 +02:00
parent 7290c43da1
commit 6d58de0bad
17 changed files with 214 additions and 19 deletions

View File

@@ -162,7 +162,8 @@ void QmlProfilerClientManager::enableServices()
disconnectClientSignals();
d->profilerState->setServerRecording(false); // false by default (will be set to true when connected)
delete d->qmlclientplugin.data();
d->qmlclientplugin = new QmlProfilerTraceClient(d->connection);
d->qmlclientplugin = new QmlProfilerTraceClient(d->connection,
d->profilerState->recordingFeatures());
delete d->v8clientplugin.data();
d->v8clientplugin = new QV8ProfilerClient(d->connection);
connectClientSignals();
@@ -191,6 +192,8 @@ void QmlProfilerClientManager::connectClientSignals()
// fixme: this should be unified for both clients
connect(d->qmlclientplugin.data(), SIGNAL(recordingChanged(bool)),
d->profilerState, SLOT(setServerRecording(bool)));
connect(d->profilerState, SIGNAL(recordingFeaturesChanged(quint64)),
d->qmlclientplugin.data(), SLOT(setFeatures(quint64)));
}
if (d->v8clientplugin) {
connect(d->v8clientplugin.data(), SIGNAL(complete()), this, SLOT(v8Complete()));
@@ -223,6 +226,8 @@ void QmlProfilerClientManager::disconnectClientSignals()
// fixme: this should be unified for both clients
disconnect(d->qmlclientplugin.data(), SIGNAL(recordingChanged(bool)),
d->profilerState, SLOT(setServerRecording(bool)));
disconnect(d->profilerState, SIGNAL(recordingFeaturesChanged(quint64)),
d->qmlclientplugin.data(), SLOT(setFeatures(quint64)));
}
if (d->v8clientplugin) {
disconnect(d->v8clientplugin.data(), SIGNAL(complete()), this, SLOT(v8Complete()));