| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This service provides information about the state of the
most recently used QmlEngine in a way that can be integrated
with "native" debuggers (GDB, LLDB, potentially CDB).
Unlike the existing QV4 debugger service, the data extraction
is triggered by direct calls from the native debuggers, i.e.
has the examined QmlEngine stopped at the time of inspection.
Since roundtrips through the native debuggers are expensive,
an additional goal is to minimize roundtrips.
Change-Id: Ic420129bbc15162197e35b52d92e882c027c9f6d
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Q_IMPORT_PLUGIN already adds the Qt namespace to the symbols.
Task-number: QTBUG-48415
Change-Id: I25b4ffdcddd0bdd52bfd390964b9c1a333a79b30
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This debug connector offers a few simple C functions a native debugger
can hook into to communicate with QML debug services.
It is the base of the 'native mixed' debugging mode in Qt Creator.
Change-Id: I32ce1f21be8e3522dccf1210d4de3b131b819bc5
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I563b4df01b6d57c4a5a015be34c7a7616f4894de
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ib7fbbab5760e1f0c9727f8767ff79f64075fd358
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The client expects them without quotes and other error messages
don't have quotes (except for some in QQmlDebugServer which have
to be replaced anyway).
Change-Id: I75716f9223b268697801a91ea506817647e1e594
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The compilation of .js resources was missed and the compile times were
underestimated because the dependency resolution and error checking
wasn't factored in. In particular we only profiled the done() step for
QQmlTypeData. However, JavaScript compilation also occurs in the
dataReceived() step of QQmlScriptBlob and QQmlTypeData will already
parse the program into an AST at that step.
Compile steps can be nested now, but considering the fact that
significant time may be spent before and after compiling dependencies
for a parent module, this seems to be the best way to model them.
Furthermore, in order to not needlessly convert QUrl to QString at
runtime, the compilation profiler saves the files now as QUrl.
Change-Id: I215a87787f9117c069ecd77b2d913cc0b0ff3c89
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
We don't want to load the debugger when profiling and vice versa. This
makes it easier to prevent unwanted services from getting loaded.
Task-number: QTBUG-47623
Change-Id: I28893b6218110274a6d30b27805d89dbb443add3
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|
|
|
|
|
|
|
| |
It's only used by plugins now.
Change-Id: Ia73a2a22ba6bccbd85bbca6eda2fb9f5a8d6dd3b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Icd4e6a6c57bc3ac65cb43d2329d236012b988678
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I12627a07ceedea4aceafa6f0e630c0cab69d156d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
As we look up services by name we should also add and remove them by
name. As the thread doesn't run during adding and removing of services
we don't have to check the client plugins for the initial state.
It's also a good idea to eventually disconnect any signals that we
connect on addService().
Change-Id: I9acd17d2caafe15831f32b7b959dc2dea9cab08c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The inspector service doesn't do anything useful without the QtQuick2
plugin and vice versa. This way we can also use the
QQmlDebugPluginManager.
Change-Id: I78f154dcc9103ec9ec3d2eda216bfb293231583e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Debug services can now be added as plugins in qmltooling/ .
QQmlDebugConnector will load any service plugins matching the factory's
iid before open()'ing the connector.
Change-Id: I2e4cabd714018f62cf4d60b0ebd2827a85431964
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I8dc95f64c6df7303e8f580f191ee35da2284718b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
We can use the command line arguments already retrieved by
QQmlDebugConnector and we can return early in error conditions.
Also, make sure we don't pass QStringLiterals to QRegExp.
Change-Id: I06ce6eec9ea3adeabb9f4d35de8024eab8729d35
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
As QQmlDebugServer is not accessible from outside we can just make the
constructor public now.
Change-Id: I06633330db861fcc78f9c1c0362755987c4ffed2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This will allow us to remove the instance() methods and create the
services from factories in plugins. Also, it allows us to remove the
isDebugging member from QQmlEnginePrivate.
Change-Id: Id9d9820a910902ecfdb1e8175e215093ce3d0965
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
We will access the services' functionality through those interfaces
once they live in their own plugins.
Change-Id: I0a0d7e73c07cb874b3b507cc4a9d304588c87bca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces memory usage as the data can be deleted once it is sent.
It also reduces the time it takes to transmit the data when profiling
is stopped. It does incur a runtime cost as the sending now takes place
while the application is running. The decision to periodically flush or
not is left to the client, who can specify a flush interval when
starting profiling.
Usage of the flushing feature also relaxes the guarantees regarding the
sorting of events before they are sent. Events with higher timestamps
are now allowed to arrive before events with lower timestamps. Any
clients implementing the flushing need to take this into account. This
will eventually allow us to do away with the server-side ordering
altogether.
Task-number: QTBUG-39756
Change-Id: Idaf4931dc17f224c2bd492078b99e88b1405234e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id2de4ab8c17f7e0412b44a1d30c6238861464989
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
We will need to derive from service-specific interfaces once we move
the services into plugins and QQmlConfigurableDebugService doesn't need
to live in QtQml.
Change-Id: I151f32ea0f8be9719b245fc19164269c6e62a84a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
There is no point in using pimpl for purely internal classes,
especially when we move them to their own plugins.
Change-Id: I2ee8bf2ded2242d91bab89f589a131dc3bcc9a55
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This results in much cleaner code than the previous implementation
using QMetaObject::invokeMethod().
We have to use read locks now for adding and removing engines, as we
should have done already before. If a condition is waiting on a write
lock you cannot acquire a read lock from another thread. So, if we kept
the write locks we wouldn't be able to receive messages while the engines
are waiting.
Change-Id: Icfe641601dec2f8d7181ae579146ed603d57a4c2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
m_clientPlugins will only be accessed from the server thread, so it
doesn't need to be protected by a mutex. m_plugins will only be
modified before the server thread starts and after it ends. During the
runtime of the thread it is constant and thus doesn't need to be
protected, either.
Engines are supposed to be added and removed after any waiting for
connections and hello messages is done, so we can reuse the hello mutex
for synchronization there.
Change-Id: I09037430804c264a5f784c4b5a85668d87851b12
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
As all services have to register before the server starts and cannot
unregister until after the thread is stopped, we don't need any
additional service advertisement anymore.
Change-Id: I20977560b4f7a3acb08a6cc703916bebf61d0220
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By forcing all debug services to register before the thread starts we
can get rid of the complicated thread synchronization and have a more
natural API for the services.
We can also better enforce the thread situation when registering
services in QQmlDebugServer now. QQmlProfilerService should not
moveToThread() in its constructor as the thread has not been started,
yet. The thread affinity of QQmlProfilerService doesn't make any
difference anyway, as all relevant methods are protected by mutexes
and it doesn't have any slots.
Change-Id: I57db9e2bf94ec6884ede694715dadf5bfd687334
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Previously, the server could wake the helloCondition before the main
thread was waiting on it. This would lead to the main thread then
waiting forever once it hit the wait() statement.
Change-Id: I694d65f72cf6be6e4c5a0c65ea4aea8a5878bf5b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlDebugConnector has to check the parameters before deciding if (and
what kind of) instance to create. It also has to add the services
itself as we don't want to tie a specific implementation of
QQmlDebugConnector to a specific set of services. Logic to load the
services from plugins will be added in a separate change. Integrating
the service initialization with the connector initialization enables us
to load the services before the server thread startsi, which will
simplify the thread synchronization.
QQmlConfigurableDebugService has to recheck for blockingMode once it
gets enabled as it cannot rely on being enabled right away anymore. It
should have done that already before as it's possible to disable and
re-enable services.
Change-Id: I9d161d78836bae10d688a90b4c2a32efed320412
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This will allow us to move QQmlDebugServer into a plugin. The new QQmlDebugServer
is the interface exposed to connection plugins. The interface exposed to services
is renamed to QQmlDebugConnector, as technically it doesn't have to be a
"server".
Change-Id: Id508b8c0a6960228e889f45a437b73060392db39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
JSON Payloads look better without the quotes.
Change-Id: I5a7954ab58449cccabc29b0d3b499838dafe9338
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I94519181e915c5e2df9614ad4e1180fb159252e3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
We don't want to require core-private for no reason.
Change-Id: Iff92e52d1894dde9b2155b4e42c21eec2b852f97
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
It isn't used anywhere.
Change-Id: I73e2f448be30c04dca4d7122d173782e302478bd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
The only thing we ever want to do is look up a service by name.
Change-Id: I45007d3c742201ccc0871379a91b37381f6d1760
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
It's clear that the public API of QQmlDebugService is meant to be used
by QQmlDebugServer or future replacements. Restricting access with
"friend" requires listing all those possible replacements.
Change-Id: I197f1fa53cf985f52cfe5e077a95eda1ed5214b4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
They were only used internally or for redundant checks in the tests.
Change-Id: Iaa7d52be030adaa52a07b28fba53bdef9fada879
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
They all internally map to one-liners and just add to binary size and
complexity. Especially, the most used one, isDebuggingEnabled(), simply
checks if there is a QQmlDebugServer::instance().
Change-Id: Ib269928e08506894d933f6696e34ff0d3acb048b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I30f0ea1d34c9cb8d66f9dfd1e381ecc6ae8ccc61
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
It's very inefficient.
Change-Id: Icde138c015379679c4d5a8c2c8e30cb39a1bb245
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
The client most likely won't be able to deal with a previously
announced service suddenly disappearing anyway. All other services only
deregister themselves once the server shuts down and this behavior will
become mandatory in order to reduce thread synchronization problems.
Change-Id: I76e812f3dbcb2cd48eccf9b5a8829751ef7463f0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: If45e084cc080c03b486fdfea33fadb4bb16e8cef
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I0f2cf0a09dfbfb1c2db79b3b5e0c35da546e5c31
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
When splitting the QML tooling into several plugins we need a unified
way to load them.
Change-Id: I3e17dc5e9427cc45db962f7fa0a695514544d64c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
When moving the server into a plugin we won't be able to directly
access it anymore.
Change-Id: Iea0bac187cfa5cda69a0852b36d61f535e12d6c6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
By tracking object destruction we can avoid looping over all cached
objects to find out which ones are still OK and we don't have to
manually clear the cache anymore. Looking up objects by source location
is specific to the engine debug service and should be done there.
Change-Id: I7dab73a7bf9c17087784f1bd9c5aef513b31e2c1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
For complex types QVector results in better performance.
Change-Id: I8ac3dccfa4272a755d36964b0373dc115f520223
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|
|
|
|
|
|
|
| |
They aren't supposed to change after construction.
Change-Id: I4aee0c04f5bb77b0e75c016ecbc72ea34639d587
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I4e0e79ebae3d42664bcf617193ca347890cf922e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I7e75be206a1821018efc435337963f131b2996a8
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|