A separate model will show them in the timeline for better orientation.
Change-Id: I537bac82ddef6a8bcc64ae403731512f8edcc9db
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
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>
The complete() methods do something more specific. We should call them
by what they do. Also, we don't need to signal the finishing of data
acquisition via a signal and most of the postprocessing can happen in
the worker thread.
Change-Id: Iae986aefb8e7e7d4327c481d7a85325bbff7fa48
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
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>
It's not clear what they're supposed to tell us.
Change-Id: I62f4fb1265396b8d61df0ce6e3409f0eda677170
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
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>
Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.
Stating the times as properties allows us to use bindings in more
places, too.
Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
If this is not done multiple event types with empty locations are
regarded as equal which leads to confusion later. Also, it's not a
good idea to change the "location" member for already inserted event
types as that prevents us from looking them up in the eventTypeIds
map.
Finally, preprocessing the filename and stripping certain parts
from the URL prevents a proper lookup later on, so this is removed.
Change-Id: Idbe87e0b16444291bb13ff604ae65e1d7e74c3a5
Task-number: QTCREATORBUG-13382
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
At the end of QmlProfilerFileReader::load() we have a perfectly valid
set of types and events which we can just pass on to the model as-is.
Change-Id: I6981663f409c4647f4d5ae8a73b5d14cc701017b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
- Build the displayname from the location only once per event
- Make sure Qt4 paint events show the "GUI Thread" label
- Remove useless "Animations" displayName. It isn't shown anywhere.
Task-number: QTCREATORBUG-12496
Change-Id: I823676499670fc019b5dbf225668f833d17076b8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The "<bytecode>" and "Source code not available" labels should not be
added to the model as otherwise they end up in trace files. Instead the
view should show them instead of empty strings where it makes sense.
Change-Id: I37a0c8468ead0194771556d9276c24cb7f05c061
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This string crops up in far too many places where it's not supposed to
be. If we really need it we should add it to the views in the exact
places where we want it instead of writing it into the model.
Change-Id: I5f17a2aead7f6c2d42f485bf629baaf759e90547
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Using strings to identify equal events is terribly inefficient. By
keeping a global list of event types we can assign each event a
numerical type index and use that to compare them.
We can also avoid excessive string copying and data duplication by
referring to the global type list where event type information is
needed.
Task-number: QTCREATORBUG-11823
Change-Id: I837bd5d0f5395b0003002ef8dd278fb27679c65d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We never have multi-string event data and dragging around the list
everywhere just adds noise.
Change-Id: I4c73543464abea01d342e3f0a296ed1b05ee2a88
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Generally save both the Message and RangeType attributes so that we
avoid clashes between those types. Also keep all the types in one
place and make their names follow qtdeclarative's conventions.
Change-Id: I811bfcc4b72aaa2a0142babc92d96968ed2d4007
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This function is by a large margin the most often called one when
loading a trace. Passing it as a pointer to qSort certainly doesn't
help. Also, qSort is deprecated.
Task-number: QTCREATORBUG-11823
Change-Id: I98d744d1615733de93a8d35bccaa338643a2f6f4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
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>
There is no real reason for the existence of a QmlProfilerSimpleModel.
Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The Complete message is sent when the profiled app is started if
recording is disabled, that can conflict with previous traces.
This patch tells the data container to ignore subsequent Complete
messages until a new trace is started.
Change-Id: Idfe4501ec93297fcd9c82c306cd93d70c67aec72
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Task-number: QTCREATORBUG-8022
The profiler would switch to state "AppKilled" if the connection was
cut before all the profiling data could be read. With Qt4.8, however,
the application dies before any data is sent at all, and such state
would never be reached. This patch fixes the flow of states and
properly detects when an application started profiling successfully
but dies before delivering the data. If the application doesn't run
at all (for example, launching a QtQuick1.1 app from Qt5), the
profiler fails gracefully without showing the error dialog.
Change-Id: I6fc53127b5dfe41de112e140b77895d430d3f79c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
In the case that the application did not generate any event
after running the profiler, still show an empty trace.
Otherwise the user will think that the profiler didn't work.
Change-Id: Idd15225270d55d834719f66387864433fcb9026d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Don't keep a pointer to elements in QVector (which might get
relocated at any time). Instead, store the index.
Change-Id: If24a408b9f47f0f3a83909ff119867311d87d869
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Rename the QmlJSDebugClient lib to QmlDebug (shorter names, easier differentiation with the shared/qmljsdebug lib).
Also rename
- QDeclarativeDebug* classes to QmlDebug*
- QDeclarativeOutputParser class to QmlOutputParser
To clarify the features,
- Debugger::QmlDebuggerClient is now Debugger::BaseQmlDebuggerClient
- QmlEngineDebugClient is now BaseEngineDebugClient
- QmlDebuggerClient is now QmlEngineDebugClient
- QDeclarativeEngineDebugClient is now DeclarativeEngineDebugClient
Change-Id: Ie15713730a614c8ab4b637fad0924f95b54e633f
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
The cause of the crash was that animation events are a special case
inside the profile data model, and some parts of the statistics
computation were not taking that circumstance into account.
Change-Id: Ibec929abb18fcdd8af4ddb5ff40b125915746725
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
The code of the qmlprofiler client has become a bit too complex,
this patch reorganizes the modules in a more sensible way,
having the modules communicate with each other through a
state machine instead of the excess of signals and slots
from before.
Change-Id: I76f7313779888a1bd07a1cdb1acbf2e47aacf42a
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>