From 5346da3f11f52530ef3c14d4ff16124b86f922e1 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 5 May 2017 14:20:37 +0200 Subject: Remove the qqmldebugtrace benchmark It benchmarks QElapsedTimer and QDataStream. We should do this in qtbase if we need to do it. The test was not in the parent qml.pro, but it was mentioned in some outdated comments in the QML profiler plugins. Remove those comments, too. Change-Id: I0d1341c32f4a2e02a04a958f76be015fe8d927fb Reviewed-by: Erik Verbruggen Reviewed-by: Lars Knoll --- src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp | 2 -- src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp | 2 -- 2 files changed, 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp index 90e817e2fc..510c745d4e 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp @@ -66,8 +66,6 @@ QQmlProfilerAdapter::QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEngin } // convert to QByteArrays that can be sent to the debug client -// use of QDataStream can skew results -// (see tst_qqmldebugtrace::trace() benchmark) static void qQmlProfilerDataToByteArrays(const QQmlProfilerData &d, QQmlProfiler::LocationHash &locations, QList &messages, diff --git a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp index 0c9fc36463..35beb0ee0d 100644 --- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp +++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp @@ -74,8 +74,6 @@ QQuickProfilerAdapter::~QQuickProfilerAdapter() } // convert to QByteArrays that can be sent to the debug client -// use of QDataStream can skew results -// (see tst_qqmldebugtrace::trace() benchmark) static void qQuickProfilerDataToByteArrays(const QQuickProfilerData &data, QList &messages) { -- cgit v1.2.3 From 8bc243f569e3feb1005fbca426bf24f59c38af2e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 19 May 2017 15:50:22 +0200 Subject: Move the engine() accessor from Object to Managed We can easily do this now that Managed has a pointer to an internal class (which always has a back pointer to the ExecutionEngine). Remove the extra engine pointer from ExecutionContext, and clean up tow methods in String. Change-Id: I98d750b1afbdeadf42e66ae0c92c48db1a7adc31 Reviewed-by: Robin Burchell --- src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 2 +- src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp | 2 +- .../qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp index b4b95f6713..755235a3a7 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp @@ -76,7 +76,7 @@ QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, if (!ctxt) return 0; - QV4::Scope s(ctxt->d()->engine); + QV4::Scope s(ctxt); QV4::ScopedContext ctx(s, ctxt); for (; scope > 0 && ctx; --scope) ctx = ctx->d()->outer; diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp index 9e8be84c33..b82df9c6a9 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugger.cpp @@ -260,7 +260,7 @@ QV4::Function *QV4Debugger::getFunction() const if (QV4::Function *function = context->getFunction()) return function; else - return context->d()->engine->globalCode; + return m_engine->globalCode; } void QV4Debugger::runJobUnpaused() diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 7f842419e7..2015118d95 100644 --- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp @@ -465,7 +465,7 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a } TRACE_PROTOCOL("Context: " << executionContext); - QV4::ExecutionEngine *engine = executionContext->d()->engine; + QV4::ExecutionEngine *engine = executionContext->engine(); if (!engine) { setError(response, QStringLiteral("No execution engine passed")); return; @@ -517,7 +517,7 @@ void NativeDebugger::handleExpressions(QJsonObject *response, const QJsonObject } TRACE_PROTOCOL("Context: " << executionContext); - QV4::ExecutionEngine *engine = executionContext->d()->engine; + QV4::ExecutionEngine *engine = executionContext->engine(); if (!engine) { setError(response, QStringLiteral("No execution engine passed")); return; @@ -669,7 +669,7 @@ QV4::Function *NativeDebugger::getFunction() const if (QV4::Function *function = context->getFunction()) return function; else - return context->d()->engine->globalCode; + return m_engine->globalCode; } void NativeDebugger::pauseAndWait() -- cgit v1.2.3