diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2012-02-27 13:01:03 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-27 15:26:26 +0100 |
commit | cfad9eb4df8b8e389143b138ca4536bca0d163eb (patch) | |
tree | 5f937943d987870eb47f26432887ab7db685d73d /src | |
parent | 8e3284135d2be23ca1be79569271f39092d6d6b4 (diff) |
QmlProfiler: send v8 profiling started signal
Change-Id: Ie26bd47c9b79a7f524b9c5bc59146be1ea93761d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/debugger/qv8profilerservice.cpp | 14 | ||||
-rw-r--r-- | src/declarative/debugger/qv8profilerservice_p.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/declarative/debugger/qv8profilerservice.cpp b/src/declarative/debugger/qv8profilerservice.cpp index 5ae2d01cc2..7a8a3507cf 100644 --- a/src/declarative/debugger/qv8profilerservice.cpp +++ b/src/declarative/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); } } diff --git a/src/declarative/debugger/qv8profilerservice_p.h b/src/declarative/debugger/qv8profilerservice_p.h index 706907ae23..3762845fd3 100644 --- a/src/declarative/debugger/qv8profilerservice_p.h +++ b/src/declarative/debugger/qv8profilerservice_p.h @@ -85,6 +85,7 @@ public: V8Complete, V8SnapshotChunk, V8SnapshotComplete, + V8Started, V8MaximumMessage }; |