aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/pixmapcachemodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QmlProfiler: ModernizeAlessandro Portale2018-12-021-8/+6
| | | | | | | modernize-* Change-Id: Ibdf9c0ae91bf8a622facc7f323112b550f532f15 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlProfiler: Rename all the timeline model data structs to ItemUlf Hermann2018-05-111-8/+8
| | | | | | | | This allows us to define a template for filling a QmlProfilerTimelineModel without spelling out all the type names. Change-Id: I97870287a795d95f58a949729afa715f145817bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move Timeline and FlameGraph into a common "Tracing" libraryUlf Hermann2018-05-041-1/+1
| | | | | | | | | | 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>
* QmlProfiler: Move parts of model manager and trace file to TimelineUlf Hermann2018-04-191-0/+1
| | | | | | | | This way we can use the trace file loading and saving mechanism for other profilers. Change-Id: I98ec1cdde6f7abcea152cabf72e64d4e696dfa59 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Timeline: Move modelId generation into aggregatorUlf Hermann2018-04-171-1/+2
| | | | | | | | | | | The way the notes model works requires every timeline model to have a different ID. Conversely no other kind of model actually needs an ID. Therefore it makes sense to have the TimelineModelAggregator manage the IDs as every timeline model will sooner or later be associated with an aggregator. Change-Id: Ib8b2c88ed883351d4e3e156dd13e1dd113c21808 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* QmlProfiler: Integrate TraceTime into ModelManagerUlf Hermann2018-04-171-5/+4
| | | | | | | | We never use it independently and only a subset of its interface needs to be public. Change-Id: I97bbc638270bcbb8fb1a4097fcfeacf37e96c048 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Timeline: Use some better number typesUlf Hermann2018-01-161-1/+1
| | | | | | | | | | | | The scale parameters are converted to single precision float anyway as soon as we do something with them. We might as well change all the methods to be single precision, too. The min/max row values should really be 64bit as 32bit values are not enough to express memory usage. Change-Id: I2b058b112286eabb1c077f7e746c48b6b99cb416 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlProfiler: Avoid overflows in loadEventRobert Loehning2017-03-211-5/+6
| | | | | Change-Id: I23271d6dc8ede3f76ef712547519b04dc86d94a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlProfiler: Resolve pixmap file name via pixmapcache model in testUlf Hermann2017-01-041-0/+6
| | | | | | | | This tests that the file name is correctly stored in the model and it removes the detour via the model manager. Change-Id: Icc592b6383edcb18bfe31a81eb7ae0736a4f5508 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlProfiler: Only show pixmap cache size on cache change eventsUlf Hermann2017-01-031-1/+1
| | | | | | | | | | | ... and make the default size 0, rather than -1. Showing cache sizes for individual pixmaps doesn't make much sense as other pixmaps might get loaded at the same time. Task-number: QTCREATORBUG-17424 Change-Id: Iead21c21d87b454ef03961d22119e0f5351d11ea Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Timeline: Move printTime() into Timeline and add hours, minutes, nanosUlf Hermann2016-12-191-1/+3
| | | | | | | | We should use it for all time printing instead of duplicating the code everywhere. Change-Id: I530baa31fd7044aefce6201fec0ab27c99a61a1d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Timeline: Use QRgb and a lookup table for colorsUlf Hermann2016-11-091-1/+1
| | | | | | | | | | | | | 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>
* QmlProfiler: Always dispatch memory and pixmap eventsUlf Hermann2016-07-111-14/+26
| | | | | | | | | | These events carry state which needs to be tracked even if they are outside the current range. Change-Id: Ia4bc34010f81cec29cd934ce2fefa0c337aef11f Task-number: QTCREATORBUG-16552 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlProfiler: Don't double-insert pixmap end eventsUlf Hermann2016-07-071-1/+2
| | | | | | | | If the pixmap started loading before the trace started we already do insert(...) a few lines above, which includes inserting the end. Change-Id: Idce0aca84f1c935fc2d4614b758e1575dde59a40 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlProfiler: Provide a sane ctor for QmlEventType and use itUlf Hermann2016-06-101-3/+3
| | | | | | | | ... 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>
* QmlProfiler: Make members of QmlEventLocation privateUlf Hermann2016-06-101-2/+2
| | | | | | | You should not change them independently as that is error-prone. Change-Id: I07890a29b045492fe804b9537094dea763bc1b8d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Add tests for pixmap cache modelUlf Hermann2016-06-081-0/+20
| | | | | Change-Id: Ic3114f6cd205434e2a489112d070300a3c842352 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Don't confuse pixmap stateUlf Hermann2016-06-061-5/+6
| | | | | | | | 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>
* QmlProfiler: Clean up pixmap cache modelUlf Hermann2016-06-061-32/+24
| | | | | Change-Id: I28b32318fe66644b3fe16825efcf86a6d3f9c68a Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* QmlProfiler: Load the timeline model data event by eventUlf Hermann2016-05-231-195/+183
| | | | | | | | | | | | 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>
* QmlProfiler: Remove detailed progress trackingUlf Hermann2016-05-231-4/+0
| | | | | | | | | | 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>
* QmlProfiler: Add a QmlTypedEvent and extend QmlEventUlf Hermann2016-05-091-5/+5
| | | | | | | | | | | | | | | | 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>
* QmlProfiler: Rename QmlEvent::startTime to "timestamp"Ulf Hermann2016-05-061-3/+3
| | | | | | | | 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>
* QmlProfiler: Fix the naming scheme for events and event typesUlf Hermann2016-05-041-4/+4
| | | | | | | | | | 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>
* Move QmlProfiler specific files from qmldebug to qmlprofilerUlf Hermann2016-05-031-8/+8
| | | | | | | | | | 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>
* Merge QmlProfiler and QmlProfilerExtension pluginsUlf Hermann2016-04-261-0/+498
Change-Id: Iaa1de7afda664a7a0779f47d104f863a16a34976 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>