Commit Graph

1631 Commits

Author SHA1 Message Date
Ulf Hermann
7d23ee717d QmlProfiler: Remove dead code
No need to keep properties around that aren't read anywhere.

Change-Id: Ie9300ad646466a6a2368f644a420d8654891805f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-31 10:34:38 +02:00
Ulf Hermann
1111c06aac Android: notify qml profiler when app is stopped
As we cannot determine reliably what happened to the app we drop the
"success" parameter to notifyRemoteFinished(). It was almost always
true before and where it wasn't it didn't do anything useful. The
transition from AppRunning to AppKilled without AppDying in between
was invalid and would have triggered an assertion when it happened.

Task-number: QTCREATORBUG-11760
Change-Id: Iebf4ca9bddbcc7b152131f9574bc5f2c0a8ba44f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-03-19 12:29:49 +01:00
Ulf Hermann
76994c3387 QmlProfiler: Make sure y-offset in category labels is an integer
This is only a workaround, for older versions of Qt. The real bug is
that a non-integer y offset is interpreted inconsistently by QtQuick.

Task-number: QTCREATORBUG-11732
Change-Id: Idcad0bf0cbef58b41c45e38aa29596717523ed0b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-03-18 12:15:55 +01:00
Ulf Hermann
71da9c4ac8 QmlProfiler: Save/Load thread ids in trace files
Without this, a trace will change if you save and then reload it.

Change-Id: I78bc6c58df2eb79305c069a5e45f62f9bf58c4ce
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-17 15:03:38 +01:00
Ulf Hermann
08eaa92085 QmlProfiler: Fix logic when timeout-connecting to QML port
The timeout signal doesn't contain the QML port but we might know it if
we've explicitly set it. The previous logic makes no sense at all.

Change-Id: I820255e492e919ee916a5f859d7809a6c5233399
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-17 14:12:21 +01:00
Ulf Hermann
64f31afd5d QmlProfiler: Fix order of updates to timeline contentX and contentWidth
contentWidth has to be updated before contentX as the WheelArea
underneath will clamp its horizontal value to its bounds on change and
thus break the update to contentX if contentWidth is growing.

As contentX is automatically updated by changes to contentWidth it's
generally a good idea to prevent any reactions to  that with a recursion
guard. When updating contentWidth before contentX this becomes necessary
for correct operation.

Task-number: QTCREATORBUG-11699
Change-Id: I34fff7a55e93745d658e8cbb5ac3d430a42770e8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-14 17:07:01 +01:00
Frantisek Vacek
2c732970b8 Qnx: Add support for qml profiler in BlackBerry/Qnx
We cannot set -qmljsdebugger arg in bar-descriptor.xml file since
it can be done in DeployStep only. QTC architecture do not allows this.

Current approach modifies already deployed MANIFEST.MF on the device.

This patch has nothing to do with QML analyzer for pure QNX,
it's purely for BlackBerry.

Task-number: QTCREATORBUG-10520
Change-Id: I89e83c6ff70a7a35344ff7e3fe573fc19e797ccb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-14 16:27:55 +01:00
Jarek Kobus
96a3fd53e8 Fix tooltips, add lacking dots
Change-Id: Id54a11b6868d5033fd1ecfd6324b7e50b94e305c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-03-13 12:06:27 +01:00
Ulf Hermann
ed537dabfe QmlProfiler: Remove pointless second check for endTime
If the selected events aren't in the specified time range the selection
should be fixed.

Change-Id: I8cb6b57054888433b5ebf66fce3b479b3266f86e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 15:58:50 +01:00
Ulf Hermann
ae32a276a1 QmlProfiler: Make sure that very narrow events can be hovered over
By giving the area the mouse "covers" a non-zero width events that last
only a very short time can be selected even if no pixel in the timeline
falls "into" them.

Task-number: QTCREATORBUG-11692
Change-Id: I53b74e2a770719872e0afc57740f7762636dc641
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 15:58:41 +01:00
Joerg Bornemann
84df758ec6 use new base import style in qbs files
Change-Id: Iecf32122df41f304ec6df538bb0dd8a263238a86
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-03-11 14:20:22 +01:00
Ulf Hermann
cc4aae532d QmlProfiler: Show multiple rows for animations from different threads
Task-number: QTCREATORBUG-11659
Change-Id: I40ed0ff755b5583947de08207993325dc1039d87
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 10:14:03 +01:00
Ulf Hermann
14dc364c2e QmlProfiler: Remove pointless struct
Change-Id: I9a67048ba5c4dfc238c9f8456601922c4528a53c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-11 10:13:48 +01:00
Ulf Hermann
16bfbceeba QmlProfiler: Allow filtering either JS or QML from the events view
As a lot of events show up as QML bindings and signals and as
JavaScript functions the events view can be hard to navigate. This
change allows the user to either filter out JavaScript events and make
it look like the old QML events view or filter out QML events and make
it look like the old V8 JavaScript view.

Change-Id: I9e0c1184da21263ae174f322b8fcd8ee5ca13f6d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-10 12:41:43 +01:00
Ulf Hermann
64af5c12e0 QmlProfiler: Deduplicate color selection and saturate colors some more
The original timeline colors are hard to see on certain devices. This
makes them stand out more from the background.

Change-Id: Icf6ef8a8ea360b7f47609f8673c4c6e22b091296
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-10 12:10:39 +01:00
Ulf Hermann
998bb89739 QmlProfiler: Use crisper left/down arrows for the timeline
Before they were rather blurry. The new ones are uncompressed and
strictly black/transparent. Also the "smoothing" is rather detrimental
in this case, so it's switched off now.

Change-Id: I38fe0bf9e3420a2077b5535958053718981bce4f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-10 11:57:55 +01:00
Leena Miettinen
4cc473c2e2 QML profiler: fix messages and UI text
Use English instead of Latin. Fix capitalization of JavaScript.

Change-Id: Ibd0e7122e4270554aad7beaa5f8cc727a208ad93
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-07 15:43:43 +01:00
Ulf Hermann
72d1850a0d QmlProfiler: Cache file lookup when loading events
The file lookup is the single most expensive operation when loading
events from a profiled application, in particular because so far we're
doing one lookup per source location, many of which are actually in the
same files. Caching those lookups for a short time dramatically
increases performance.

Change-Id: Iaa47327aca3f34cbad194757d3ba152205788682
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-07 15:43:07 +01:00
Ulf Hermann
1b6b1077cd QmlProfiler: Fix glitches when vertically resizing the timeline
Change-Id: I4b75ea08e1822ddaf2a1b4ef6de2d43b3cfad1a1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-06 13:02:05 +01:00
Ulf Hermann
f696d01e72 QmlProfiler: Don't needlessly interrupt the timeline flicking motion
If the timeline is being flicked and we manually set contentX from the
zoomControl callback it will stop. That's unnecessary as the flicking
itself will trigger further updates to zoomControl.

Change-Id: Id14bde1bb33d6b1f6d719a41df23074981e474da
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-03-06 13:01:38 +01:00
Ulf Hermann
bd43c1c51b QmlProfiler: take the left border into account when painting time marks
Without this the time marks are 1 pixel off in relation to the main
view.

Change-Id: Iee8aaee447fedb9c57934c8089874414d9000995
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-27 14:54:56 +01:00
Ulf Hermann
3cc743f1bf QmlProfiler: Provide a horizontal scroll bar for the timeline
This requires the consolidation of the nested Flickable elements into
one, which is probably a good idea anyway. The horizontal scroll bar is
important because people might not understand that they can use the
overview for scrolling.

Change-Id: Ie1555265fc3edafaf6e6e4f34d77b0d034d45639
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-27 14:54:45 +01:00
Ulf Hermann
6d8b70ed57 QmlProfiler: relay context menu from trace view to parent widget
As QQuickView is a window with its own event handling, disconnected
from the main window, we need to relay relevant events manually.

Task-number: QTCREATORBUG-11535

Change-Id: If316225ecc01ddc4255c209d7df70a9cee812596
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-26 15:50:33 +01:00
Ulf Hermann
676e4f582e QmlProfiler: Properly initialize private members of timeline models
Task-number: QTCREATORBUG-11565
Change-Id: I227fba871beeed79923e794c03a08ff154c9e4f8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-26 15:33:33 +01:00
Ulf Hermann
0b6b67ca07 QmlProfiler: Don't use the canvas context if it isn't ready
The documentation indicates that onPaint can actually be called
while the context isn't ready.

Change-Id: I32d861e016e5e990f3d940a35ec28956902041ba
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-26 15:33:26 +01:00
Ulf Hermann
cd85ac700d QmlProfiler: Remove gradient borders
It just looks so much better with "clean" borders.

Change-Id: I9aae0e6f24556042e23580e224abb696913fc989
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-02-25 17:46:15 +01:00
Ulf Hermann
8d1916a7ac QmlProfiler: retrieve the function names when loading a trace
The "displayname" element is something else and not very useful.

Change-Id: I3971de9ea2b042186748099df13076c24aec7bcc
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-21 15:17:26 +01:00
Ulf Hermann
b633fc186a QmlProfiler: Fix range selection
MainView.eventCount is always 0 since the last cleanup. It doesn't do
anything useful and can be removed.

Task-number: QTCREATORBUG-11515
Change-Id: I367a11e41c34e691550b6d6e5943fc372f0f04ca
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-21 12:37:30 +01:00
Ulf Hermann
666c810505 QmlProfiler: repeat lookup of filename when retrieving source location
The local file names are in fact not cached and it's unclear if that
would be a good idea.

Task-number: QTCREATORBUG-11525
Change-Id: Ib4faa5b2cfcc094e24d1a42333c3db1843068539
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-21 12:32:40 +01:00
Ulf Hermann
59ef288517 QmlProfiler: Accept qrc:/ as local files when setting initial details
If this is not done a lot of Creating and Compiling events look bad.

Task-number: QTCREATORBUG-11525
Change-Id: I2af584d3d0468cbc54960c4e16036e9bcf42511b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-21 12:32:33 +01:00
Lorenz Haas
ac70c168da Optimize usage of QPalette
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.

Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-21 08:53:28 +01:00
Ulf Hermann
750dab55a4 QmlProfiler: Don't call complete() after loading V8 model from file.
The model manager is responsible for triggering model completion.

Change-Id: I163ec824a6800d4180129f19cf920db6126b7ec5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 17:10:29 +01:00
Ulf Hermann
461e677b89 QmlProfiler: Consistently apply the d-pointer pattern to all models
Change-Id: I338291ee94f0301039c2b2e04b6c37fff66a2995
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 17:10:08 +01:00
Ulf Hermann
19652d7b84 QmlProfiler: Remove dead code.
Change-Id: Ib44094740e93f1389c3caa07371866714a375f04
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 16:39:14 +01:00
Ulf Hermann
605f525654 QmlProfiler: Clarify interaction when expanding category labels
Change-Id: I22c106b1493ee323c6f8baf92faa0fd543386c9b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:58:55 +01:00
Ulf Hermann
abcb7b0604 QmlProfiler: Move the data structs of the V8 model into the model class
QmlProfilerDataModel does it the same way and we don't pollute the
namespace as much like this.

Change-Id: Id1ed2c444cb2556fb8f1c886a754e51f3eae5772
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:58:20 +01:00
Ulf Hermann
58e3c9ed05 QmlProfiler: Unify QML and V8 data models
There is no real reason for the existence of a QmlProfilerSimpleModel.

Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:57:29 +01:00
Ulf Hermann
133199a033 QmlProfiler: Unify source file lookup between V8 and QML models
They should both look up the source details when loading data
and they shouldn't do that again on gotoSourceLocation.

Change-Id: I433a4ff36a314822dff320ba4c8f398a6e3eaee3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:26:31 +01:00
Ulf Hermann
4bfa5d62e0 QmlProfiler: Reduce code duplication between timeline models
Change-Id: Ic898ad06437209040c029304ee156f5aef5929da
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:26:03 +01:00
Ulf Hermann
7d2199db7d QmlProfiler: Show "anonymous function" instead of empty string
Events with empty names are generally anonymous javascript functions.
Empty strings like to break layouts and aren't very descriptive anyway.

Change-Id: I3add8bd697633368ef20bab4b9788b0d46e7a16f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:03:40 +01:00
Ulf Hermann
d09d508795 QmlProfiler: Only analyze binding loops for bindings and signals
Recursion markers for javascript, creating, or compiling aren't very
interesting.

Change-Id: I3220d06e1763619c01dabca31ef238b31b11dfbb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-19 15:03:29 +01:00
Ulf Hermann
8f5df0b7da QmlProfiler: Make time formatting available to all timeline models
... and remove some dead code.

Change-Id: Ifdec932b87e8d33420d9713bfde9c4002f34844b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:49:22 +01:00
Ulf Hermann
2a00002e80 QmlProfiler: eliminate redundant isEmpty() methods
Change-Id: I05a82b0620a739d27478501ab43d2ac23839a811
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:48:49 +01:00
Ulf Hermann
55f28b971b QmlProfiler: eliminate redundant name() methods.
Change-Id: I6190fb1ba9fb86741362a251ddd3e39357b9a604
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:48:35 +01:00
Ulf Hermann
db7c75597c QmlProfiler: eliminate redundant categories() methods
Change-Id: I3a85322cc583de37f1cc4eb256e3382a92c5c179
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:46:17 +01:00
Ulf Hermann
adada0b95d QmlProfiler: Unify handling of category labels
Change-Id: I32ab2e354d3e45653e8dcb2cf8b0195d199786a6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:45:52 +01:00
Ulf Hermann
f3267b8893 QmlProfiler: Don't throw an assert if app is killed while profiling.
Without this you get lines like this on the console:

SOFT ASSERT: "m_state == Done || m_state == Empty" in file
[...]/qmlprofilermodelmanager.cpp, line 62

Change-Id: Ia3fb98cd5e9fb683e3265d0fd3ed1ca99784270d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:45:01 +01:00
Ulf Hermann
70aa948f0c QmlProfiler: Remove some useless signals and QML variables
We don't want to emit a signal for each event being added. That's
expensive and doesn't serve any purpose. We also don't have to save
the availability of data in QML as it isn't used anywhere.

Change-Id: I32db06a1955a7cfd6b569f50b81bf5278333b622
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:44:46 +01:00
Ulf Hermann
abb55de9b5 QmlProfiler: Make the progress bar somewhat nicer.
Allow adding a weight to certain tasks so that the movement of the bar
gets smoother and update the progress from more places.

Change-Id: Ifb8331dc77116cc0464b3970cd6344fbbeacec41
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:44:32 +01:00
Ulf Hermann
47ce17b1ba QmlProfiler: Sanitize the signal exchange between models a bit
The model manager should only set its state to 'Done' if all models are
actually done. When that is the case it can safely emit dataAvailable,
too, freeing us of the need to apply a heuristic to the progress
percentage. In order to have a unified interface to the completion of
model processing an abstract base class for QML and V8 models is
introduced.

Task-number: QTCREATORBUG-11466
Change-Id: Id89c7ef5e24004baab7f37ee5486b69e7611aee0
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-18 14:43:52 +01:00