aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/depscanner.h
Commit message (Collapse)AuthorAgeFilesLines
* Apply 'modernize-use-equals-default' fix-itIvan Komissarov2019-11-251-1/+1
| | | | | Change-Id: Iabdc777d2e8492d9903109365b0f3b1a5441ca11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use pass-by-value and moveIvan Komissarov2019-03-071-1/+1
| | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not ignore file dependencies in the Scanner itemChristian Kandeler2019-01-181-4/+7
| | | | | | | We used to look only at artifacts when scanning recursively. Change-Id: I39f968c05dd3e6af362bf3bb98380814b01de172 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Scanner item: Do not re-use the searchPaths value for other inputsChristian Kandeler2019-01-151-0/+3
| | | | | | | | | | | For the C++ scanner, the search paths depend on module properties, not on the actual input file. This assumption does not generally hold for Scanner items, which was not taken into account when this feature was originally introduced. As a result, the first input to get scanned by a Scanner item erroneously provided the search paths for all others. Change-Id: I0159d826dac1f5605494d54cfe96fe468044ca34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* corelib: Apply modernize-use-overrideAlessandro Portale2018-08-201-12/+12
| | | | | | | Add overrides to function, except for destructors. Change-Id: I1a1337b01dfef81b74ba56c5f00bf4d4cfc10935 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Re-use product, module and project script valuesChristian Kandeler2018-01-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These script values were set up from scratch not only for every rule, but also when creating the dependencies array. As a result, a rule traversing the dependencies of a product recursively would potentially create a huge amount of identical script values for modules appearing more than once in the dependency graph, such as the qbs module. See the benchmark data below for how the performance degraded with the size of the project. Instead, we now re-use these values, which stay valid throughout the lifetime of the script engine. For prepare scripts, that's the same as the lifetime of the executor. As a side effect, this also gives us change tracking for accesses to product and module properties via the dependencies array. These were completely unobserved before. Benchmarker result using qbs as the test project: ========== Performance data for Rule Execution ========== Old instruction count: 3265471304 New instruction count: 2733833913 Relative change: -17 % Old peak memory usage: 19023592 Bytes New peak memory usage: 19871640 Bytes Relative change: +4 % Benchmarker result using Qt Creator as the test project: ========== Performance data for Rule Execution ========== Old instruction count: 318848392341 New instruction count: 75056789023 Relative change: -77 % Old peak memory usage: 248922136 Bytes New peak memory usage: 258454408 Bytes Relative change: +3 % Change-Id: Id69062eea4dd8f9c7153599610c52bf4ea986464 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Share ScriptFunction objects between productsChristian Kandeler2017-11-231-1/+1
| | | | | | | | | | | The source code of script functions does not differ among module instantiations, so there's no need to give each product its own copy. For example, resolving the QtCreator super project now allocates about 80 of these objects, rather than 16000, each of which had their own unshared copy of the script source code. Change-Id: I10d67991ce170826346d434fe58ea6608fa18a1f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Remove superfluous Logger from UserDependencyScannerJoerg Bornemann2017-08-011-3/+1
| | | | | | | Nothing is logged here. Change-Id: Ida96c19f6b0c1919bde537ae9cee1101d1cd708e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace QSharedPointer/QWeakPointer with std::shared_ptr/std::weak_ptrJake Petroules2017-05-231-1/+1
| | | | | Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Set script engine's active flag while executing custom scannersJoerg Bornemann2017-01-101-2/+2
| | | | | | | | | | | | | | This reverts commit 6a8a7f4fb25ff7259ed66de70b9b4f956dfe0e14 and fixes QBS-782 in a simpler way, without instantiating another ScriptEngine. Having two script engines in the executor thread is wasteful and even potentially dangerous. Also, the removal of the setProcessEventsInterval(-1) call allows us to cancel long running user dependency scanners. Task-number: QBS-782 Change-Id: If680c66c901c809718013860be3d81241e0f782b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make scanning information persistentChristian Kandeler2017-01-101-0/+15
| | | | | | | | | This way, a change in some artifact or dependency will not cause re- scanning of tons of other header files anymore. Task-number: QBS-1052 Change-Id: I1713da416b47b19275641cbbacd0a5c9da866578 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-041-2/+3
| | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge the C/C++ include scannersChristian Kandeler2016-12-191-3/+3
| | | | | | | | | | | | | | | | | | | We had one scanner for every type of file in the C family, all of which collected the same set of includes, but under a different entry in the scanner cache. Thus, lots of header files were unnecessarily re-scanned. We fix this by making the scanner plugins declare a *list* of tags they can handle and passing the currently active tags in the open() function. ========== Performance data for Rule Execution ========== Old instruction count: 3775190973 New instruction count: 3441085735 Relative change: -9 % Old peak memory usage: 18174216 Bytes New peak memory usage: 17307600 Bytes Relative change: -5 % Change-Id: I222d1ec4bbfbc06ecd8c81faa55a500bc0da1ee6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update license headersIikka Eklund2016-08-291-14/+23
| | | | | | | | | | Patch-set 1 includes *.h Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not process events in custom scanners' script engines.Christian Kandeler2015-04-241-2/+2
| | | | | | | | | | | | | Otherwise we will get calls to slots in the executor at points in time where none are expected. Note: This means that custom scanner scripts become non-interruptible. It is not clear if and how we can fix the relevant bug otherwise. Putting the input artifact scanner into its own thread seems even more problematic. Task-number: QBS-782 Change-Id: I44edebfb2a38dc00062cdb9572991ff9352ddd9f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Clean up dependency scanner classes.Christian Kandeler2015-04-241-16/+16
| | | | | | | | | | - Make implementations of base class virtuals private. - Remove redundant "virtual" keywords. - Remove unused members. - More const-correctness. Change-Id: I9b4134102415610ecaf6fa20dc13d519dc3e74c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* update license headersJoerg Bornemann2015-03-021-2/+2
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Update LicenseEike Ziller2015-01-261-6/+6
| | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* License update.Eike Ziller2014-10-161-7/+8
| | | | | | | Add LGPLv3 option. Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* let scanners operate on FileResourceBase objectsJoerg Bornemann2014-05-201-3/+4
| | | | | | | File dependencies should be scannable for dependencies too. Change-Id: I7223ba65ee6ca02f70c8e48165652550007e91f6 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add new qml item ScannerMaxim Zaitsev2014-03-121-0/+99
This item allows to write custom dependency scanners in modules. Change-Id: I6cb49969973ee29896d1909e7a16bf5da50f8aef Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>