We can only use the timeline view if the scene graph is rendered via
OpenGL. This can be checked from Qt 5.8 on by querying the
RendererInterface. Earlier versions of Qt can only render with OpenGL.
Change-Id: I3f77e2a4dee1f9a1df5d6b1946cf7eb05a1bad01
Task-number: QTCREATORBUG-16503
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QSGGeometry itself doesn't check the result of allocations.
Change-Id: I4533d9abbb6dd26b8bd97e2c1b3dff089d827023
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
As there are only two events views we can handle them separately rather
than keeping them in a list. Also, the object names and dock IDs should
match. This breaks the settings, but that shouldn't be a big problem.
Change-Id: Iac46fd7976d1e747fef4b40cead9a54e830d188f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This allows us to look up the colors by their enum values, rather than
by strings. Lookup by string is prohibitively expensive as the whole
QVariantMap of theme values has to be converted into a JS object
repeatedly and the strings have to be converted between QString and
QV4:String all the time..
Change-Id: Id131840b1a6e1eaabbd8966d60b9baf1ebed00c1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Apparently some versions of Qt can produce traces with unmatched start
and end events. We should not crash on those.
Change-Id: Idfb3273f02470156e9f1863c43477d0c3494e0d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Enforce the presence of a sort role for all items and make sure we
don't call column() during sorting. column() can be very expensive on
large models.
Change-Id: I89555072d8ef051d6e0b4f9819159238a1a40859
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
It is unnecessary as it's already shown in the title, and it wasn't translated,
so it showed as "undefined: <blah>".
Change-Id: I063b78df5778d17db8849f73c470184546e0daeb
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Invalid events with binding loops could trigger a null pointer access
as the the check for creating the nodes for the binding loops render
pass was somewhat stricter than the check for populating them.
This is largely an academic problem, though, found by coverity.
Change-Id: I7f2681960f23e4a31977faa0d538bc257fa4cf2c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
You cannot have a row label on top of the category label, so in
expanded mode, the rows have to start at 1.
Change-Id: I89e5219355919dcc9003a46f9caf8f017b37e6cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The test should also run if there is no kit.
Change-Id: Ia2b5d34f2fc792235fb9da9c77f9235c186addde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The models are in an inconsistent state while we're processing data.
The items may have out of range row numbers, we don't get a
contentChanged() signal for each item added, the labels may not be
in place, yet, etc. We don't want the models to be accessed during
that time.
Change-Id: Ibe81e0943de78d5bb45d46d005e847ec2d4ae66d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We want to use QVariantList here because that is the only list type we
can pass to QML without special registration.
Change-Id: Ia57f8f0c578388da7603ddb6d62288e9cf61e381
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It makes no sense to return a QColor as the only things we are using
are the red, green, and blue components. Furthermore, colorFromHue()
can only generate 360 different colors which we can easily cache
instead of recalculating them on each request.
This significantly reduces the time it takes to update the timeline
render nodes.
Change-Id: I7961014364a1bec5b089285148b2e6c141a6dc7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This significantly reduces the number of signals necessary when
loading traces. The overhead of queueing those signals across threads
was responsible for up to 80% of the time required to load a trace.
Change-Id: I461a2ef9944b0be102a29f8ed6b2b3f2f59f3c0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The compiler does not necessarily get it automatically.
Change-Id: Id37c20960a66775e34b80cbbe666e22505c5b347
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This works around QTBUG-56746, by decoupling the dialog from the
context menu.
Change-Id: I2f13b01003a10598e6f69b14bb7eb8e9141acad8
Task-number: QTCREATORBUG-17149
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We cannot do this because the parent object needs to be notified.
Change-Id: Id70de2acea4aa241ea0e85b5b02327e1f91b7e68
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The flame graph keeps separate "flames" for compile and other QML/JS
events now. The test has to be adapted to check for this.
Change-Id: Ifdbc3331240d30a3acbb9df62a6a44654466273e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is necessary for themable + HighDPI icons in the options dialog.
Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae
Reviewed-by: hjk <hjk@qt.io>
As compiling happens asynchronously it messes up the stack based
approach used to attribute memory usage to QML/JS events. Compiling
generally doesn't use the JavaScript heap, so we can ignore it here.
Change-Id: If8cc4b0ad2b8c2e0531260a8b92b7e2cd76a6d56
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Events in the memory usage model should not be selected when a type
ID is propagated from the statistics or flame graph model. The event
in the respective QML/JS model should rather be selected.
Change-Id: I6646358650f61c424c607e9dd8edb7fd9a61597e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The QML compiler can run asynchronously and produce ranges that don't
match up with other QML/JS ranges. The flame graph model assumes that
all ranges are perfectly nested, and produces incorrect data if they
aren't. The compile ranges are perfectly nested among themselves, and
the other QML/JS ranges are also perfectly nested among themselves, so
we can fix this by keeping separate stacks for them.
Change-Id: If4ea251c6a2e74bd04e142cf184937600ea31a87
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The previous code would crash in the renderer if the type id is smaller
than the detail type of the message. That is rare, but can happen.
Change-Id: I7702284bc61a7c9227c7ad81ecf714255db5db9f
Reviewed-by: Michael Winkelmann <Michael.winkelmann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The QML compiler can run asynchronously and produce ranges that don't
match up with other QML/JS ranges. The statistics model assumes that
all ranges are perfectly nested, and produces incorrect data if they
aren't. The compile ranges are perfectly nested among themselves, and
the other QML/JS ranges are also perfectly nested among themselves, so
we can fix this by keeping separate statistics for them.
Also, choose a less insane data structure for the relatives model.
Change-Id: I146593b67586e7b5aba6b19d360961c142511289
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Clicking on something in the QML profiler should never trigger a switch
to a different mode.
Change-Id: I4784e836b0091d44fd046b605c49d2b10b3e8c34
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
The QmlDebugConnection might immediately signal a connection failure
on connectToHost() or startLocalServer(). If the timer is not running
then, we trigger the QTC_ASSERT in qmlDebugConnectionFailed(), which is
meant to make sure that we don't silently give up. In this case, we
haven't even given up, yet, as the timer is in fact started afterwards.
Change-Id: Ia2c107d9b511092eaf32380203a3b4628139d320
Reviewed-by: hjk <hjk@qt.io>
In the general case we don't want the QmlProfilerRunControl to parse
the QML debug port from the application output. As for most platforms
the ports are mapped via some remote connection mechanism the parsed
port is almost certainly wrong.
In the case of local connections, however, the port is actually
correct, so we keep the output parser in the LocalQmlProfilerRunner.
Change-Id: Ifdaae85196d8b034e67bc2ba0b8c05be980b62e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
It doesn't make sense to distinguish between them. When the content
changes, the labels, the number of items, and the "empty" state
change.
Change-Id: I65f77f65828626fd76bfd968abf67b608b6e267b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When given an empty string as executable and some non-empty arguments
QProcess might emit error() but not errorOccurred(). This was fixed by
2f0ffba638bdb868a810bc0349c240b6b6e172cd in qtbase, but we cannot rely
on that being present, yet. Thus, avoid passing empty strings as
executable.
Change-Id: Ia1bb5ebceb6edeca1e54489d12b838f3cea8851e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It is meant for the timeline and it makes no sense to start counting
at 1 when aggregating the statistics.
Change-Id: I0faa198da7a6b3316d5c989362247d5e7f3b45ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>