return profilerInstance()->stopProfilingImpl();
}
+void QDeclarativeProfilerService::sendStartedProfilingMessage()
+{
+ profilerInstance()->sendStartedProfilingMessageImpl();
+}
+
void QDeclarativeProfilerService::addEvent(EventType t)
{
profilerInstance()->addEventImpl(t);
bool success = false;
if (!profilingEnabled()) {
setProfilingEnabled(true);
- addEventImpl(StartTrace);
+ sendStartedProfilingMessageImpl();
success = true;
}
return success;
return success;
}
+void QDeclarativeProfilerService::sendStartedProfilingMessageImpl()
+{
+ if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
+ return;
+
+ QDeclarativeProfilerData ed = {m_timer.nsecsElapsed(), (int)Event, (int)StartTrace, QString(), -1, -1, 0, 0};
+ QDeclarativeDebugService::sendMessage(ed.toByteArray());
+}
+
void QDeclarativeProfilerService::addEventImpl(EventType event)
{
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
static bool startProfiling();
static bool stopProfiling();
+ static void sendStartedProfilingMessage();
static void addEvent(EventType);
static void startRange(RangeType);
static void rangeData(RangeType, const QString &);
private:
bool startProfilingImpl();
bool stopProfilingImpl();
+ void sendStartedProfilingMessageImpl();
void addEventImpl(EventType);
void startRangeImpl(RangeType);
void rangeDataImpl(RangeType, const QString &);