Commit Graph

28 Commits

Author SHA1 Message Date
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
4a1e5a637a QmlProfiler: Drive event loading from the model manager
We want to get rid of the big master list of QmlEvent in
QmlProfilerDataModel, as that gets very large for longer traces. In
order to reduce the dependencies on that list we load the events on the
fly into the child models while they are being received, rather than
having the child models query QmlProfilerDataModel for the event list
later.

As the trace client so far only emitted rangedEvent() for complete
ranges we run into problems with models that need their events sorted.
The rangedEvent() signals were sorted by end time, rather than start
time which makes it inconvenient to analyze them in a stack based way,
for aggregation. This is solved by passing on all the details from the
trace client to the models, with the QmlProfilerDataModel aggregating
the type information before having the events dispatched to the child
models.

Change-Id: I5831a20551f21cf91e27d298a709f604ebd96c3e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-23 12:31:44 +00:00
Ulf Hermann
5ba6f04d4b QmlProfiler: Load the timeline model data event by event
All the models do the same thing when loading the data: They iterate
the list of events, determine for each one if they accept it, and if
so, they load it. After the list has been fully loaded, they do some
finalization. This can be centralized, and ultimately we won't need to
expose the central QVector<QmlEvent> for that anymore.

Change-Id: Ia82facfdc3968200bbec323a02f2fcc02ac44e9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-23 12:04:49 +00:00
Ulf Hermann
1093be0425 QmlProfiler: Remove detailed progress tracking
The progress bar in the state widget was rather meaningless. We rarely
know how many events we expect and it's rather hard to tell how long
each model will take to process them. Instead, we just show a 0-ranged
progress bar to tell the user that "something is happening".

Change-Id: Icb80840d1f0a1538bcf254faa37cbb36e25d342c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-05-23 11:44:13 +00:00
Ulf Hermann
215c0533d2 QmlProfiler: Rename QmlEvent::startTime to "timestamp"
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>
2016-05-06 10:36:40 +00:00
Ulf Hermann
a53780924d QmlProfiler: Apply some code cosmetics
Change-Id: I772713aec3a6c25136174b39b853a9ef3ee42a0b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-06 10:27:09 +00:00
Ulf Hermann
a955537132 QmlProfiler: Fix the naming scheme for events and event types
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>
2016-05-04 09:49:32 +00:00
Ulf Hermann
e5a38bacc4 Move QmlProfiler specific files from qmldebug to qmlprofiler
These file were not used anywhere else and had no business to be in
qmldebug to begin with. Moving them allows us to drop a number of
namespace qualifications and forces us to rename a few local symbols
in other classes in order to avoid name clashes.

Change-Id: I658ed455eec027cbaddacf2980d2ea6827ae6205
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-03 15:00:50 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Ulf Hermann
35cedb2aee QmlProfiler: Allow string data in events
The restriction to put all strings in the type data is becoming a
burden to further enhancements. Also, introduce proper ctors for all
event structs.

Change-Id: I42d3bac96155ac1ac183a2b82785ce0396c5a932
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-17 13:06:29 +00:00
Ulf Hermann
4ff20dfa8c QmlProfiler: Move location lookup into base model
We will need it in a second derived model.

Change-Id: I5d2459c490034b592f643f248bf5be2e44af44aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-16 14:50:32 +00:00
Ulf Hermann
58ffe05a2a QmlProfiler: Improve progress metrics for range models
Change-Id: I32b6c77c020c1a3141878282314d7acd87c90af4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-12 09:16:26 +00:00
Ulf Hermann
6f8acae62d QmlProfiler: Remove QmlProfilerBaseModel
Now that the V8 model is gone we don't need a base model anymore.

Change-Id: I35aee0627f78f417ec9c971e1c7bbf70adfc7b27
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 09:13:43 +00:00
Ulf Hermann
4e7d4ff86a QmlProfiler: Define a main feature for timeline models
They will be shown and hidden when that feature is enabled or disabled.

Change-Id: I42b67bd25729901262298553b118fe2624941789
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-02 10:17:58 +00:00
Ulf Hermann
7344c27622 QmlProfiler: Remove separator comments
It's not clear what they're supposed to tell us.

Change-Id: I62f4fb1265396b8d61df0ce6e3409f0eda677170
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-02 10:17:48 +00:00
Ulf Hermann
e1cfc09603 QmlProfiler: Remove extra clear() from loadData()
The models are expected to have been cleared already at this point.
Clearing them again on loadData() makes it harder to properly set up
their shown/hidden state.

Change-Id: I70644015edb228f6a7a30d8ab3a4ad4b761686a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-30 14:40:42 +00:00
Ulf Hermann
c40d9e9d17 Timeline: Create new library from contents of QmlProfiler
Change-Id: I964b2f149e237eb25a08600e8dab8968e8bc0cb9
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-16 15:22:48 +01:00
Ulf Hermann
516c0d6020 QmlProfiler: Move timeline classes into own namespace
The new namespace "Timeline" is for classes that are supposed to go to
the generic timeline library later.

Change-Id: I1f6dce59de2c37398b1ed89473e1a94ec020104b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-15 14:51:33 +01:00
Ulf Hermann
ef064154a4 QMLProfiler: Use scene graph for painting events in timeline
By using the scene graph we can retain the geometry for events in
the timeline on the GPU and potentially speed up the rendering for
large amounts of items.

Change-Id: I2cfbb8ef4ebc7b56f1977ec1facb4f2e7f2002ee
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-12 11:01:51 +01:00
Ulf Hermann
725623583f QmlProfiler: Separate expanded and collapsed row heights and counts
We'll need to access both of them when building the scene graph. This
change also clarifies the dynamics between expanding categories and
row heights and offsets.

Change-Id: I2e2bf488ad973c95d05f230bf6fff63598f39bf2
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-12-05 14:15:15 +01:00
Ulf Hermann
10d942e268 QmlProfiler: Split AbstractTimelineModel in two classes
We need a general purpose TimelineModel and a specialized
QmlProfilerTimelineModel.

Change-Id: I2da02d65efa11e160cab5fa9f8a21075beb0e2bf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 14:03:58 +01:00
Ulf Hermann
7956b176e6 QmlProfiler: remove useless checks from labels() methods
The view should check if it needs the labels before requesting them.

Change-Id: I935259e91337202224af7890d0617e1b12dd922a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:43 +01:00
Ulf Hermann
91cb52d40b QmlProfiler: Require model manager when constructing timeline models
This relieves us of the headaches created by figuring out what should
happen if the model manager is changed later. Extension models can be
safely created through a factory.

Change-Id: I8cf8fd6d639e4e6c9da66351ea44cfc35fd614a5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:29 +01:00
Ulf Hermann
307d45ecaa QmlProfiler: switch storage for typeId and selectionId
The selectionIds are an integral part of the timeline and have to be
given for each event. The typeIds are optional. Thus it makes more
sense to store the selectionIds in the basic Range classes and have the
derived models handle the typeIds instead of doing it the other way
around.

Change-Id: I824224b6f58e8d45311134887482586283fbff41
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:24 +01:00
Ulf Hermann
4ec75995f8 QmlProfiler: fix selection propagation from event view to timeline
The event view deals in type ids and the timeline view has to handle
selection by type id. Using the coincidence that typeId == selectionId
in the cases we're interested in is ugly.

Change-Id: I6f94ccd2c3945d5901d0a225deee7de077bfce58
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:18 +01:00
Ulf Hermann
936480316f QmlProfiler: Don't needlessly use AbstractTimelineModelPrivate
We can easily implement all specialized models with only the public
interface.

Change-Id: I2fc75ad4a4270d9dd40068e78f9364f3963805e0
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:12 +01:00
Ulf Hermann
b7742f79b6 QmlProfiler: Merge SortedTimelineModel into AbstractTimelineModel
In order to provide a stable interface we need most of
SortedTimelineModel to be private. There is no real benefit in keeping
a distinction between AbstractTimelineModel and SortedTimelineModel as
SortedTimelineModel isn't very useful on its own.

Change-Id: Ibc6945e2740320f430f2634f95c7807d6b460123
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:54:01 +01:00
Ulf Hermann
a42e07beba QmlProfiler: Rename some classes and files to follow the common pattern
The ones we'll refactor into the timeline library should be called
timeline* and the others should be called qmlprofiler*.

Change-Id: I6ecccbe4ef523681ca0baeef140368e2c1839964
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2014-11-21 10:53:53 +01:00