diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-05 11:39:24 +1000 |
---|---|---|
committer | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-05 11:39:54 +1000 |
commit | 0284817d6cd7e17afa8da26ee6e9199100754446 (patch) | |
tree | c351d55d5a606c81c72e481f846b9b9e2603c883 /src/qml/debugger/qv8profilerservice.cpp | |
parent | 377eb94eb19dafeca20d12bc6b624f1779fae514 (diff) | |
parent | 36bd7f616f37f5f60e59bce1f0d8970248d627de (diff) |
Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
Diffstat (limited to 'src/qml/debugger/qv8profilerservice.cpp')
-rw-r--r-- | src/qml/debugger/qv8profilerservice.cpp | 14 |
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); } } |