aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api/jobs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace std::vector<ResolvedProductPtr> with QVectorIvan Komissarov2020-01-061-3/+1
| | | | | | | | | | std::vector was copied way too much, it's better to use copy-on-write here This amends de2fea7734 Change-Id: I51afddc88ec6862a1a623b0c9a69c810e9e15a55 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace QList<Internal::ResolvedProductPtr> with QVectorIvan Komissarov2020-01-061-3/+4
| | | | | | | | QList is inefficient with shared_ptr and results in an extra allocation per each element Change-Id: I5d5492d855a233e8aec3f09a67dd4b83fb0d2c13 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* corelib: Apply modernize-use-autoAlessandro Portale2018-08-201-15/+9
| | | | | | | Use more auto. Change-Id: I27e1e2345c6bede459a375663be72ec3370a5e39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make ResolvedProject::products a vectorJoerg Bornemann2018-04-271-1/+3
| | | | | | | The value_type is not suitable for QList. Change-Id: If72af8998e9e1da37c8451bc6dc5925079be43dd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Modernize variable declarationsDenis Shienkov2017-11-301-1/+1
| | | | | | | | Use 'const' and 'auto' keywords more where static_cast is used. Change-Id: I60152b90fe5e44aa1ca513b43f133e604ed6417f Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Use categorized logging for the build graphJoerg Bornemann2017-08-021-0/+3
| | | | | | | | | | | Use Qt's categorized logging feature for debug and trace messages in the build graph part of the library. This greatly simplifies the code as we do not have to check explicitly for the log level, and we do not have to forward a Logger object. Change-Id: If44b9ef74ebb2c4670c25e513ec58e1419588196 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>
* Use a dedicated launcher process to run all ProcessCommandsChristian Kandeler2017-01-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux (and very likely other Unices as well), QProcess::start() incurs a certain overhead, because forking off the child process duplicates some of the parent process' resources. This overhead appears to be proportional to the amount of memory allocated by the parent process, presumably due to page table entries getting copied. This has consequences for qbs, particularly when being used from an IDE such as Qt Creator, which has a higher memory footprint than the command line tool. When using a high job count, as is typical on machines with lots of CPU cores or in a distributed compilation environment, the following problems were observed: - High CPU load in the starting process (Qt Creator). Profiling showed that most of the time was spent in fork() and related functions. - As a result, the number of parallel jobs stalled at a value well below the requested one, slowing down the build. - In some cases, QProcess::start() failed altogether, emitting a message such as "fork() failed: Could not allocate memory". We solve these issues by outsourcing the starting of ProcessCommands to a dedicated launcher tool with modest memory requirements. For each qbs process, we have one instance of this tool running while a build job is going on. Communication with qbs happens via QLocalSocket. The protocol is encapsulated in a QProcess replacement, so almost no changes to existing code were necessary. No performance regressions were observed when using lower job counts. This patch will also enable us to properly support the incredibuild tool in IDEs such as Qt Creator, which you do not want to start via ibconsole. [ChangeLog] Improved scalability of parallel builds on Linux by starting Process commands via a dedicated launcher process. Change-Id: I8966c00a2d67a94c3a380f0e089d61eda122209e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-041-1/+1
| | | | | | | | | | | | | | | | 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>
* Update license headersIikka Eklund2016-08-291-14/+23
| | | | | | | | | | Patch-set 2 includes *.cpp *.c Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-1/+1
|\ | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * 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>
* | Use Qt5-style connectsOrgad Shaneh2016-06-071-14/+13
|/ | | | | | | The heavy lifting was done by clazy. Change-Id: Ibb13c517567b1b32bbda6d26225454d1b003934d Reviewed-by: Christian Kandeler <christian.kandeler@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>
* Invalidate project after certain unsuccessful re-resolving attempts.Christian Kandeler2014-07-301-1/+5
| | | | | | | Namely, if the build data has been mangled by the re-resolving attempt. Change-Id: Ibe020a6bda38a335f95e2d2cef4f37fac3199a7d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add missing metatype registration.Christian Kandeler2014-07-161-1/+1
| | | | | | | | The code path where this is relevant has apparently never been taken, so add an autotest as well (and fix the wording of the error message). Change-Id: I314f1cb888264d30920a58f4e9cbbbf01fbcc4e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Speed up project re-resolving by skipping the loading from file.Christian Kandeler2014-07-161-3/+20
| | | | | | | | When re-resolving an existing project, the build graph already exists in memory and does not have to be read from disk. Change-Id: Icf5cf7396a859d4ee1c495b8cc4fa7a1ee61ff1d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Rename "lockBuildGraph" to "lockProject".Christian Kandeler2014-07-161-6/+6
| | | | | | | To distinguish this lock better from the build graph file lock. Change-Id: Ib520bea568c5f9bf0ea5c87347f5576d82c935c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix race condition in project locking.Christian Kandeler2014-07-161-0/+10
| | | | | | | | We did the unlocking in a different thread, which does not seem like a good idea. Change-Id: Id3427bf52e993011d0f18b0d7f526901e31e9c30 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Normalize signal/slot signaturesOrgad Shaneh2014-03-031-1/+1
| | | | | Change-Id: I88e51bf4c33bbeeacb22a94b735d1faf4f76023f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Move Qt profile setup into a dedicated library.Christian Kandeler2014-01-101-0/+320
Otherwise all changes to the implementation will have to be duplicated in IDEs. Change-Id: I61e6d4fa1ee9b724eb5d9de9f233dc915a6c8bc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>