Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The squeeze() function is called by clients for QVLA's, which means
it's copying 1-2KiB of data (depending on sizeof(value_type)) just
to iterate over a small part of it.
Use a C++11 ranged for loop.
Change-Id: I2c33ae0c5a3d9d941cd9e385fc6bbb4fb0fa3c2c
Reviewed-by: hjk <hjk@qt.io>
Add a classId to TraceEvent and TraceEventType and add is() and as()
methods that check for it.
Change-Id: I76fe1df624516b36db90d57d4788b17e0b690726
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Replace with assignments/memcpy for members.
Detected by GCC8.
Change-Id: I9866ea0215cf5d43b55ed10d21e4efa371315365
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This allows us to share code between the two, in particular the QML code
for the Details window, and the theme code. This way we can potentially
deduplicate some code.
Change-Id: I3a0d26b18488bd2a46b5b077b5b5d79ac2dfc5ce
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Timeline will become a generic trace handling library. It needs some
abstract concept of events and event types.
Move operator== and operator!= for QmlEvent into the test as we don't
use them anywhere else.
Move the operators for QmlEventType to QmlProfilerTraceClient. We want
to get rid of the hash there as soon as we can assume that no
application we want to profile doesn't support server type IDs.
Change-Id: Icde4e3e7634e387171dc1d8bef7bbe8e71684a1a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Qt containers have int as size type, while std containers have size_t.
We can use auto and decltype to deal with this. Also, memcpy and malloc
expect size_t, not int.
Change-Id: Id2942d14978c8a15f72967962d551ddb20905471
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
If the external data is quint16_max long, we need to stop writing at
quint16_max - 1. So we cannot rely on unsigned integer overflow to
enforce the boundary.
Also, use for (...) rather than foreach (...). This should easily offset
the extra overhead introduced by the bounds check.
Change-Id: I51d1aef1040fbaa8396ca80ec7e30b2fe7b7dd0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We want move constructor, move assignment, ==, and !=. Also, drop some
unreachable code.
Change-Id: I65f24d7ba0f146ad37ec4b7c438b47d4abc3d688
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The number type used to transfer data from the internal to the external
list is an implementation detail, and qint64 will always work. Users
can optimize the casting by choosing the same type as the external list
uses to store the numbers, though.
Change-Id: I069c31b130960519e7d27ec79a456924f7777364
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
The UTF-8 data stored in the event is not necessarily null-terminated.
Change-Id: Id5d4f0b50f8c7c70aa6576121905072984f1c342
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
c:\dev\insrc\devqc\src\plugins\qmlprofiler\qmlevent.h(274): warning
C4267: '=': conversion from 'size_t' to 'quint16', possible loss of data
Change-Id: I86ab7a9b2d01a3da70dd765cb64c6e58c1044cc1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We try to further compress the QML events when saving as we can use the
additional space in that case.
Change-Id: Ida308963685169d1daabd7936612628fd4d265ae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The QmlTypedEvent is mainly useful to read a generic QmlEvent and
QmlEventType from a QPacket. QmlEventType has a stream operator to do
exactly that. QmlEvent also gets further options to store 32-bit data
in addition to 64- and 8-bit data. Also, with the more generic storage
layout we can reduce the memory consumption of range events by 50%.
This comes at the cost of additional memory allocations for non-range
events, but as non-range events are significantly less frequent than
range events, this is a good tradeoff. Finally the new storage layout
lends itself to efficient serialization, which will help when
developing new storage and transfer formats for QML traces.
Change-Id: I420de68b0142f23c8fb2ca8b329d7ffe69c83fe0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
As many events are instantaneous and we're going to drop the duration
property soon, this is more fitting.
Change-Id: I6e13dd076a5b9df16aed44bf9f631ea5760e9cbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Move them out of the QmlProfilerDataModel class, drop the "Data"
suffix, and rename symbols that refer to them in order to call them by
their names.
Change-Id: I41151359921b325edb79111371083c4185bd148b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>