Commit Graph

96 Commits

Author SHA1 Message Date
Ulf Hermann
39eec848ce QmlProfiler: Delay creation of views until activation
We don't need to waste the time and memory required to create the views
if they are never shown.

Change-Id: I56add08981c90263e6735f5b7e6fac2140b457e4
Fixes: QTCREATORBUG-21894
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-01-28 12:37:45 +00:00
Alessandro Portale
d1df55d128 QmlProfiler: Modernize
modernize-*

Change-Id: Ibdf9c0ae91bf8a622facc7f323112b550f532f15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-12-02 14:27:29 +00:00
Ulf Hermann
6b9ff15ad5 QmlProfiler: Move action registration out of QmlProfilerTool
This enables us to have multiple QmlProfilerTool instances without
conflicting action registrations. Ultimately there should be a way to
unregister actions, or to add some extra description on which tool
instance they refer to, but this is a minimal first step.

The main problem this fixes for now is the warnings generated by the
tests.

Change-Id: I2193fc48a5a68c52f46e5567919f3035bc93df36
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 12:14:58 +00:00
Thiago Macieira
b5f63a76b2 Fix build: add missing #include for QmlProfilerSettings
qglobalstatic.h:87:18: error: field ?value? has incomplete type ?QmlProfiler::Internal::{anonymous}::Q_QGS_qmlProfilerGlobalSettings::Type {aka QmlProfiler::Internal::QmlProfilerSettings}?
qglobalstatic.h:152:9: note: in expansion of macro ?Q_GLOBAL_STATIC_INTERNAL?
qglobalstatic.h:159:5: note: in expansion of macro ?Q_GLOBAL_STATIC_WITH_ARGS?
qmlprofilerplugin.cpp:79:1: note: in expansion of macro ?Q_GLOBAL_STATIC?

Change-Id: I940917d6763842499b18fffd1514e0f3522f3bbd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-02-20 06:16:35 +00:00
hjk
da33f94e20 QmlProfiler: Pimpl QmlProfilerPlugin class a bit more
... to be able to remove an unneeded use of the global object pool.

Plus some code cosmetics.

Change-Id: Ifdb0ff9cd40820a34a8951563402a50a594e4fdd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-19 10:17:36 +00:00
Ulf Hermann
e1ad7a1784 QmlProfiler: Drop static accessors from QmlProfilerTool
It wasn't really a singleton even before. For testing purposes make the
client/state/model managers accessible.

Change-Id: Ie5efbc47a6b9119495f999e4e05877d4789da407
Reviewed-by: hjk <hjk@qt.io>
2018-01-11 14:04:13 +00:00
Ulf Hermann
747818291d QmlProfiler: Test that attachToWaitingApplication tries to connect
Change-Id: Ic71cb60b70e9b68e455795511594a6be5739eb5f
Task-number: QTCREATORBUG-19496
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-08 15:14:27 +00:00
Ulf Hermann
7b4b56c336 QmlProfiler: Tests for QmlProfilerTraceClient
We run a number of test traces through the trace client and make sure
that it doesn't crash and that the events reappear in the right order.

Change-Id: I45bbeeb978f2ab147551aaafa74631f927c710e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 15:10:53 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 09:06:53 +00:00
Eike Ziller
a0a42ff7bd Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/plugins/debugger/gdb/gdbengine.cpp

Change-Id: I8a7c8ca07d6d6005f5d39b8f1477ebbc7a299fbf
2017-08-17 17:29:25 +02:00
Robert Loehning
1acc482130 QmlProfiler: Initialize and reset QmlProfilerPlugin::m_profilerTool
Change-Id: I6efa81c1c89610f50f0057fccce438176bff3120
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-08-16 17:33:26 +00:00
hjk
49ffe0fb40 QmlProfiler: Disconnect some signals on shutdown
It's a workaround, not a proper solution (as indicated by the
SOFT ASSERT: "d->m_profilerState" in file qmlprofilerruncontrol.cpp,
line 144 triggering) The state manager (and possibly more)
is referenced from potentially running run controls, that are ramped
down after the plugin.

Task-number: QTCREATORBUG-18736
Change-Id: Ia20b168fe640c818276a777e1d23feab0cacd565
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-08-16 09:06:22 +00:00
Ulf Hermann
d571b5051e QmlProfiler: Tests for QmlProfilerDetailsRewriter
Change-Id: I26b7f71fad35d569e0fc70fe4f5eaf2796e607cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-15 13:46:05 +00:00
Eike Ziller
b5f49273b0 Merge remote-tracking branch 'origin/4.3' into 4.4
Conflicts:
	src/plugins/qmlprofiler/qmlprofilertraceview.cpp

Change-Id: Ib1d75a8572f650898cb598d008867e2c0514d752
2017-08-14 12:37:06 +02:00
Ulf Hermann
1e781cd396 QmlProfiler: Avoid empty timeline when restricting to ranges
The timeline models were suspended for editing but never restored. To
test the correct behavior a test case for the trace view is added.

Change-Id: Ic1803e9d84656eed97795f1f1674e3d56c83f650
Task-number: QTCREATORBUG-18354
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-07 11:50:19 +00:00
hjk
d93da5f5f1 ProjectExplorer: Add and use a RunConfiguration::registerAspect<>
... to register RunConfigurationAspect creating functions.

Change-Id: I9e7a2cef0bc134ac6a7becbd0b5ecb40c26ef118
Reviewed-by: hjk <hjk@qt.io>
2017-07-17 14:00:28 +00:00
Christian Kandeler
0e2b89e637 QmlProfiler: Fix release build
A header file was indirectly included in debug mode.

Change-Id: I9142fc9b92fd6db1182c6602a0ac4a723aa2c9f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-13 08:50:56 +00:00
hjk
611f373df6 QmlProfiler: Partially dissolve QmlProfilerRunControlFactory
Change-Id: Id902cfa6387bcb6ad96da0cd36f3114f795afd99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-13 07:31:12 +00:00
Ulf Hermann
a36a6e0ad3 QmlProfiler: Add test for config widget
Change-Id: I468ed3c7f75b79d16231b57246e494e29a89b920
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-08 13:12:42 +00:00
Ulf Hermann
392955488c Move flame graph view from QmlProfiler to separate library
We want to use it for other profilers, too.

Change-Id: Ice4bd7fdfce6e0153d62a7c9a83dc7de6d5cba30
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-20 08:55:28 +00:00
Ulf Hermann
f372f4aa5a QmlProfiler: Add tests for client manager
Change-Id: I9d758857dc65daa564ab6a0394250c02ea006832
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-20 08:18:06 +00:00
Ulf Hermann
5c32406296 QmlProfiler: Add binding loops render pass test
Change-Id: I64fbc8fae00e859ce6433ff85ceb5706675b88cc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-14 12:00:40 +00:00
Ulf Hermann
468521b062 QmlProfiler: Add test for attach dialog
Change-Id: I040ef23f780e361037386a92444fcf45aded7a3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-13 14:00:29 +00:00
Ulf Hermann
6361152de2 QmlProfiler: Add test for animations model
Change-Id: I0227d9c97b2b61d68ae5ed9e3f2f7e3776075338
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-13 13:59:36 +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
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
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
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
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
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
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
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
b523eed434 QmlProfiler: Remove QmlProfilerPlugin::instance
We're not using it anymore.

Change-Id: I036d472d0be884f617d000d2077e58ba5b527da9
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-30 10:31:47 +00:00
Ulf Hermann
600e1cdcea Merge QmlProfiler and QmlProfilerExtension plugins
Change-Id: Iaa1de7afda664a7a0779f47d104f863a16a34976
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-26 14:10:17 +00:00
hjk
92e301a054 Debugger: Merge debug mode and analyze mode
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.

Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.

Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.

Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.

Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.

Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-07 15:06:10 +00:00
hjk
55dcec95f7 QmlProfiler: Shuffle tool widget creation around
Put the border between plugin code and view code in a more
natural place.

Change-Id: Ib5250a30e52ec9899dcb01bac23cdad62a2d5c5e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-03-03 09:57:31 +00:00
hjk
f3bd7412ef Debugger: Remove return value from AnalyzerManager::createDockWidget()
Change-Id: If6cd2a68f2f99a1977ded0f05a12790194143274
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-02 08:08:15 +00:00
hjk
931ee3382c Analyzer: Rework the dock widget layout generation
Decouple layout generation from widget generation and
separate analyzer action description from menu action creation.

Tool specific layouts are named "Perspective" now.

Change-Id: I774efe77a07640c4cc26e4e566662c8a673c8831
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-29 10:47:43 +00:00
hjk
aaf05f5acd Move analyzerbase to debugger
This is the first mechanical step to execute on the 'shared pool of
debugger/analyzer views' idea.

Future steps would be providing infrastructure for the view pool,
making all analyzer/debugger views use the pool and then re-extract
a sensible base for a 'analyzer-and/or-debugger' tool plugin interface.

Change-Id: I1bb392e6dd3084fc56937956bee1d6fd9530335d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-25 12:31:06 +00:00
Ulf Hermann
a1dd1e4c5b Add runConfiguration to remote tool starters
Most of them need a run configuration. It's better to pass the
right one than to use various hacky ways to work around it.

Change-Id: Ic21b0ef33bdd79b526b1e1a1ead5ca87d9f32c4d
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-22 17:26:17 +00:00
hjk
789488af4d Analyzer: Remove AnalyzerStartParameters
Change-Id: I4188ffd046cc92be64bf9751e90fe8c66942b08c
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-20 17:10:27 +00:00
hjk
5dad96e3b7 QmlProfiler: Adapt QmlProfilerRunControlFactory to Analyzer changes
Change-Id: I8047cdb3fc65df2139c1a5770218c48e83ef5f5a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-20 16:08:07 +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
hjk
8150209ff7 Analyzer: Slim down AnalyzerStartParameters
* SysRoot can always be determined from kit.
* Pass around RunMode as extra parameter
  not as part of AnalyzerStartParameters.
  That's closer to the pattern used elsewhere.
* Environment was always initialized from the runconfig's
  EnvironmentAspect. The tools can do that directly.
* Provide setter for display name for cases where
  it is not equal to RunConfiguration::displayName

Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-07 18:11:09 +00:00
Ulf Hermann
01e4ba4a10 QmlProfiler: Move constants to qmlprofilerconstants.h
Change-Id: Ic4f1b02bbf9e1467811334a16cd9c13d1924c47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:22:09 +00:00