Commit Graph

1631 Commits

Author SHA1 Message Date
Ulf Hermann
80e6bf1ef5 QmlProfiler: Terminate waiting processes when Complete arrives
Previously, in AppStopRequested state we would wait until we are done
processing the data. This is problematic as when aggregating traces
this doesn't happen spontaneously. If we've explicitly asked the
process to terminate it's safe to do so after receiving Complete as
we won't need any more data after this.

Change-Id: I64111ce6039ffc7f6815425c6b7e4432ac528c86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:09 +00:00
Ulf Hermann
51055e6799 QmlProfiler: Don't needlessly defer state transition from dying to idle
Otherwise we can run into an inconsistent state when we try to restart
the process while we're still "waiting" for it to die.

Change-Id: I82afd272a73b3be79328c45c8d027621d1feeace
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-05 08:08:01 +00:00
Ulf Hermann
4f7477872b QmlProfiler: Fix another type/event misnomer
Change-Id: I135c4355b36f0ce7fe0aa2e108dbab1a7dc866e3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-07-04 07:31:27 +00:00
Tim Jenssen
c13f2f0784 init roleNames only one time
Change-Id: I61e120c2e5c4a036c001b410331e09993d7594d6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-20 08:49:33 +00:00
Christian Stenger
a5a6206e92 QmlProfiler: Disable a plugin unit test on Windows
This test does start QC with '-version' which results in a (blocking)
dialog on Windows.

Change-Id: I75fc84382bf7228f17febe4b852db01362b02537
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-14 08:48:47 +00:00
Eike Ziller
42f81503ac QmlProfiler: Fix warnings
Change-Id: I028261a7ceb876e48e6947d518fb5dae0fdcd7d3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-10 12:53:18 +00:00
Ulf Hermann
5101a504b3 QmlProfiler: Clean up statistics view
Fix some misnomers and remove an unused declaration.

Change-Id: Ia5e30ccc7c465a10c5214b7fe025aa0f578cdab4
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:33 +00:00
Ulf Hermann
b326060da8 QmlProfiler: Add tests for QmlNote
Change-Id: Ida4a3ad0adf59d9c21d6405ea6dcbfea5d41ba71
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:28 +00:00
Ulf Hermann
f9dcf28921 QmlProfiler: Add tests for QmlEventType
Change-Id: Id2ee8250c0e89637733a1454de4a60df42612904
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:14 +00:00
Ulf Hermann
69832a22d3 QmlProfiler: Move qHash and operator== for QmlEventType
It makes more sense to have them in the same location as the actual
type.

Change-Id: Ia27970173d14cfe361d4fc007cb461f788350b21
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:10 +00:00
Ulf Hermann
e10bc709bc QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally
change them.

Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 12:43:05 +00:00
Ulf Hermann
ebab4eb406 QmlProfiler: Remove references to binding types
They don't exist anymore.

Change-Id: Id8650dbba15e90f7cd4c485471792bfc8f40674f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 09:13:36 +00:00
Ulf Hermann
7be3713bde QmlProfiler: Drop some useless QVariant ctors
Change-Id: Iadaa9378536cbf3fdc96ea7f7b9cd61b71f1d75e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 09:03:31 +00:00
Ulf Hermann
52ee1141a8 QmlProfiler: Make members of QmlNote private
The only member that can change after initialization is the text.

Change-Id: I6958f510e67c9fd6fe1f109c2676f80d93e7fd0c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 09:03:08 +00:00
Ulf Hermann
0c0cb4b043 QmlProfiler: Add tests for QmlEventLocation
Change-Id: I3d35c87f194e298a57d361053ad5a35efedd67dd
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 09:02:44 +00:00
Ulf Hermann
472745fb2e QmlProfiler: Make members of QmlEventLocation private
You should not change them independently as that is error-prone.

Change-Id: I07890a29b045492fe804b9537094dea763bc1b8d
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 09:02:37 +00:00
Ulf Hermann
a41593c395 QmlProfiler: Run flamegraph view context menu test on a timer
Apparently the popup window is not automatically activated.

Change-Id: I12e952568630d5ffe5d5dab9012b617a28ef9285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-10 09:02:22 +00:00
Ulf Hermann
98207ae020 QmlProfiler: Give test processes some more time to start and stop
Change-Id: I144ee2201feba2d635d1b8af4f6afac78aecdf3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-10 08:55:11 +00:00
Ulf Hermann
eb948c0214 Timeline: Remove selectionIdForLocation()
Nobody needs that.

Change-Id: I83feeb55af24393a3feebfbbd4d0f085b208bb20
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-08 09:44:35 +00:00
Ulf Hermann
287217d5bf QmlProfiler: Add tests for QmlEvent
Change-Id: I9933d6b6225becc66f954f9d00d2ae7091d0bbb1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-08 08:54:41 +00:00
Ulf Hermann
85b5810f9c QmlProfiler: Add some missing bits to QmlEvent
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>
2016-06-08 08:54:37 +00:00
Ulf Hermann
8bdc612b3a QmlProfiler: Add default template param to QmlEvent::number
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>
2016-06-08 08:54:20 +00:00
Ulf Hermann
0023c87098 QmlProfiler: Don't add junk to the end of strings from QmlEvents
The UTF-8 data stored in the event is not necessarily null-terminated.

Change-Id: Id5d4f0b50f8c7c70aa6576121905072984f1c342
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-08 08:49:03 +00:00
Ulf Hermann
6de290a188 QmlProfiler: Add tests for pixmap cache model
Change-Id: Ic3114f6cd205434e2a489112d070300a3c842352
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-08 08:48:59 +00:00
Christian Kandeler
a0f956f050 qbs build: Introduce new module "qtc".
The qtc module gathers properties that used to live in the top-level
project file. This is the first step towards making it possible to build
plugins against an installed Qt Creator ("out of source build").

Change-Id: Ia1514cc9c888e80be01b308e908de48980fcbdb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-08 08:46:00 +00:00
hjk
db9437c2e8 Generalize IDevice::qmlProfilerHost
The idea is to have a way for tools to specify what kind of
control channel they would like to use to communicate with
a device without making the choice explicit dependent on
the exact kind of tool to further decouple device and tool
implementations.

The 'hint' values are there to help the device implementation
to decide on which channel to use exactly in case there are
multiple choices. In any case, the tool is responsible to
check that the returned channel is suitable for its operation.

Currently the only choice is "QmlControlChannel" yielding
a simple wrapper around the former IDevice::qmlProfilerHost()
return value.

Other enum values may potentially be {Tcp,LocalSocket}ControlChannel
(to specify a type of transport) AdbChannel (to specify some
generic helper mechanism). It might also turn out that something
more complex than an enum will be needed, e.g. to express
a set of values with priorities or such, but I'd rather
avoid overengineering for now.

Change-Id: Id386425eb3dd2bb395065f0bdb6f67217cd40a71
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-08 08:16:22 +00:00
Ulf Hermann
d381c6e047 QmlProfiler: Add test for memory usage model
Change-Id: I4364dd5211fee0d017e58fde8af36879d83f23a2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 16:17:11 +00:00
Ulf Hermann
34d5322312 QmlProfiler: Don't continue memory usage ranges across other ranges
When a function returns and is called again, without memory being
allocated or freed in between, we don't want to assign any memory
events from the second call to a memory range starting in the first
call.

Change-Id: I3d5cd10381f31ff73849a5a396ad6bda7661afec
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-06 16:17:04 +00:00
Ulf Hermann
887a71c493 QmlProfiler: Don't confuse pixmap state
If we overwrite the pixmap state, we cannot later check it for the
old value ...

Change-Id: Ic81b9c360457b2ae3b2e1d76aeccfc5309f0782a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 15:15:00 +00:00
Ulf Hermann
6491058e5e QmlProfiler: Clean up pixmap cache model
Change-Id: I28b32318fe66644b3fe16825efcf86a6d3f9c68a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 15:12:20 +00:00
Ulf Hermann
c4079d6ae7 QmlProfiler: Clean up MemoryUsageModel
Don't reimplement locationFromTypeId, make methods public when they are
public in the base class, remove redundant QVariant ctors, inline
memoryTypeName() into the only place where it's used.

Change-Id: I5d780cf27c90a277c13b117c25c80ccce5a4182b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:59:28 +00:00
Ulf Hermann
bcbfd93ee7 QmlProfiler: Remove QmlProfilerPlugin::debugOutput
I doubt that anyone has ever used it.

Change-Id: Icf8c6513f5cdd10a9aa790e7373df9eba7c12ef2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:46 +00:00
Ulf Hermann
16bf9227ba QmlProfiler: Add tests for LocalQmlProfilerRunner
Change-Id: I5d770adace7096f945e6385a62383282df3e5745
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:38 +00:00
Ulf Hermann
d12b99ee2d QmlProfiler: Don't send stopped() signals before started()
Change-Id: I225c4786b8720e24085175cb1c13c662417fd9d8
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:30 +00:00
Ulf Hermann
b3fa768dfd QmlProfiler: Don't populate the file finder if there is no run config
Change-Id: I1cce87162836e0579577616956d9993f26e00a01
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:51:23 +00:00
Ulf Hermann
8d3937d1a8 QmlProfiler: Rename "engine" to "runControl"
Call it the same way it's called everywhere else.

Change-Id: I5e61275c264c337307643c0874b7c764c4e18118
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:44:35 +00:00
Ulf Hermann
bae8f22a6e QmlProfiler: Add test for input events model
Change-Id: I5af5c090312173cdfdb01f88923bfde1667e799b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:43:36 +00:00
Ulf Hermann
d345755b0f QmlProfiler: Add test for flame graph view
Change-Id: I5207e03ad8955f2d291d4fc1b7e5d33b64207379
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-06 14:43:26 +00:00
Ulf Hermann
7ecd0763b9 QmlProfiler: assert that connections are AnalyzerConnections
... before accessing them as AnalyzerConnection

Change-Id: I6f6111ca3b0dede93ac85fbcb5ffbfcf3c7b19aa
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-03 08:45:01 +00:00
Ulf Hermann
7d5d026244 QmlProfiler: Remove useless dtor
Signals will be disconnected by QObject dtor anyway.

Change-Id: I193fa207e02b8f91258d165f0a7eacb0ccc4b9df
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:52 +00:00
Ulf Hermann
c3a873b906 QmlProfiler: Add some consistency to input events model
Methods that are public in the base class should also be public in the
derived class. Also, the accepted() method takes a type, not an event.

Change-Id: I086d382ffc2e71c7efda56b0dbf341942986582c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:43 +00:00
Ulf Hermann
b4462c2553 QmlProfiler: Don't consider invisible flame graph items selected
Technically they can still be selected after hiding the category they
belong to, but we shouldn't show the details window then.

Change-Id: I4f667a397dbe258a302e65b1fb8e4e6eb723c441
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:26 +00:00
Ulf Hermann
3684585839 QmlProfiler: clear model manager only after saving the notes
The notes model wants to resolve IDs from timeline models when saving.

Change-Id: I02c6038c8519101f36db95183bfa05d01a531b97
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:18 +00:00
Ulf Hermann
c81ed0bf9c QmlProfiler: Send the correct end events when restricting to range
Clamping the timestamps and then sending the original events doesn't
make a lot of sense.

Change-Id: I42a42968d0188acb040649483d642c6b3f3e1038
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-03 08:44:11 +00:00
Ulf Hermann
d527cc8d5a QmlProfiler: Add default argument for parent widgets on event views
Change-Id: Id67e87920a09ff2f5f5bbf73327f2cac6b299973
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:36 +00:00
Ulf Hermann
3174c36ab1 QmlProfiler: Add tests for flamegraph model
Change-Id: I185d06a059314f27fe48c5c2f2b92623b6611309
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:28 +00:00
Ulf Hermann
12f160b1f3 QmlProfiler: Add tests for FlameGraph
Change-Id: I1eadb2675e16fcc61e073ea1a730ab065456f964
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:22 +00:00
Ulf Hermann
652846c5c7 QmlProfiler: Add test for debug messages model
Change-Id: Ie6872646c09a89a417379a3e1f551526234ab26a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:18 +00:00
Ulf Hermann
1fc9bcc025 QmlProfiler: Rename QmlProfilerNotesModel::add()
The parent class has a public add() method which has to be qualified if
the child class has a protected one.

Change-Id: I6d61d6123618fc0b5065893656b36559aa5298be
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:23:12 +00:00
Ulf Hermann
09b1fe3f20 QmlProfiler: Drop some unreachable code
The model manager will make sure that the flame graph model doesn't get
any events it doesn't accept.

Change-Id: Ibe6e06c558d138cebe6be5dbc76e8f51e9e1fd95
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-01 09:20:46 +00:00