aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger/qv8profilerservice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/debugger/qv8profilerservice.cpp')
-rw-r--r--src/qml/debugger/qv8profilerservice.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/debugger/qv8profilerservice.cpp b/src/qml/debugger/qv8profilerservice.cpp
index eba8b0feef..6473a2f4fb 100644
--- a/src/qml/debugger/qv8profilerservice.cpp
+++ b/src/qml/debugger/qv8profilerservice.cpp
@@ -187,6 +187,13 @@ void QV8ProfilerService::startProfiling(const QString &title)
v8::CpuProfiler::StartProfiling(v8title);
d->m_ongoing.append(title);
+
+ // indicate profiling started
+ QByteArray data;
+ QDataStream ds(&data, QIODevice::WriteOnly);
+ ds << (int)QV8ProfilerService::V8Started;
+
+ sendMessage(data);
}
void QV8ProfilerService::stopProfiling(const QString &title)
@@ -205,6 +212,13 @@ void QV8ProfilerService::stopProfiling(const QString &title)
// can happen at start
const v8::CpuProfileNode *rootNode = cpuProfile->GetTopDownRoot();
d->printProfileTree(rootNode);
+ } else {
+ // indicate completion, even without data
+ QByteArray data;
+ QDataStream ds(&data, QIODevice::WriteOnly);
+ ds << (int)QV8ProfilerService::V8Complete;
+
+ sendMessage(data);
}
}