| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This fixes -Wmodernize-pass-by-value
Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
This fixes this clang-tidy warning:
warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
Change-Id: I421e1e47462fe0e97788672684d47943af7df850
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
We used to look only at artifacts when scanning recursively.
Change-Id: I39f968c05dd3e6af362bf3bb98380814b01de172
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
According to our benchmarker, this speeds up rule execution by three per
cent.
Change-Id: Iaf146ba6073b897d19e0fe470d7b0dc4a04d264c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The same string literals appeared over and over again in the code base,
causing redundancy in the sources as well as at run-time. We now give
them a name and make sure they get instantiated at most once.
String literals that occur only once are converted from QLatin1String to
QStringLiteral unless they appear only in contexts that make use of
QLatin1String overloads or they are clearly outside of any hot code
paths.
This seems to result in small, but measurable performance improvements,
even if we assume the 1% changes to be noise:
========== Performance data for Resolving ==========
Old instruction count: 3266514138
New instruction count: 3209355927
Relative change: -2 %
Old peak memory usage: 29649896 Bytes
New peak memory usage: 29436264 Bytes
Relative change: -1 %
========== Performance data for Rule Execution ==========
Old instruction count: 3367804753
New instruction count: 3319029596
Relative change: -2 %
Old peak memory usage: 19577760 Bytes
New peak memory usage: 19091328 Bytes
Relative change: -3 %
========== Performance data for Null Build ==========
Old instruction count: 608946535
New instruction count: 604566001
Relative change: -1 %
Old peak memory usage: 14606384 Bytes
New peak memory usage: 14579936 Bytes
Relative change: -1 %
Change-Id: Ia055a52e0a4b6fe6fd0f1e7ba4bfa583cba1b0ef
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
...or operator<< if the argument was itself a list, or brace init where
appropriate.
This is a simple find and replace with manual sanity check.
Change-Id: I94b79cbf3752192dd258001bf1dfcd46f58ca352
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
| |
Change-Id: I59d743f585410cb5c00d36a7b6f9a3e9d696d19e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
They did not have the project and product variables available, and they
accessed module properties in a way that made it look as if they were
normal properties rather than scripts, which was misleading.
Now everything works the same as in Rule scripts and JS commands.
Task-number: QBS-744
Change-Id: I11d70876185d528282a56747747dd8310a77fbc4
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
| |
This is a simple find and replace with manual sanity check.
Change-Id: Iab6d46dcc3be246d1650aae2b1730f933b717be8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Preparation for a follow-up patch.
Change-Id: Iec86f2719d5fee1ca8a564b37baf44f13a8db5cc
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We did both too much and too little: Firstly, we invalidated all rules
that appeared in a file that imported a changed JS file, independent of
whether that import was relevant to the rule. Secondly, we did not catch
changes to recursively imported files at all.
Now we track accesses to functions in imports and invalidate a rule or
command only if a file to which such an access refers has been modified.
More fine-grained checks (e.g. per function) would be possible, but
incur more overhead, as we'd have to store the respective source code in
the build graph.
Change-Id: I95f62d233bf87d2c39abbe37056a8fe434f20b5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
The top-level "module" entry has not been needed ever since we separated
the product properties and module properties maps.
Change-Id: Ic669a6c76206c87ee6458e5528c2a55d1c55bac1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This function can take a FileContextBase object. This enables us to pass
FileContext and ResolvedFileContext objects. We will make use of this in
a subsequent commit.
Change-Id: I052640ed3cb6637b68ac7484d83df532719788ba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Nothing is logged here.
Change-Id: Ida96c19f6b0c1919bde537ae9cee1101d1cd708e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
| |
Task-number: QBS-946
Change-Id: I2fb5d573f7caf44f96fd4a96fd5069a44cdfb16a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use Transformer::translateFileConfig to create an artifact's JS
representation. This removes duplicated code and makes sure that no
artifact property is missing.
Change-Id: Iba3d5713eb08f2c5a6f1aa84e1cfbe09e3a549f6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Reduce the usage of PropertyMapInternal::value.
Change-Id: Ib88fca8d318c43cb1b367a33d2c96ee05c91bd32
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We spent an inordinate amount of resources on scanning and collecting
system headers, of which there are a lot and which typically do not
change in a relevant way. Make this behavior opt-in.
========== Performance data for Rule Execution ==========
Old instruction count: 4331820265
New instruction count: 2557300533
Relative change: -41 %
Old peak memory usage: 18892592 Bytes
New peak memory usage: 16887880 Bytes
Relative change: -11 %
========== Performance data for Null Build ==========
Old instruction count: 521956733
New instruction count: 443021349
Relative change: -16 %
Old peak memory usage: 12498888 Bytes
New peak memory usage: 11186984 Bytes
Relative change: -11 %
[ChangeLog] Introduced cpp.treatSystemHeadersAsDependencies
Change-Id: Iae9d9ca63852fb38a68e8dd2cc10b512eafe15e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
========== Performance data for Resolving ==========
Old instruction count: 2324724447
New instruction count: 2317712921
Relative change: -1 %
Old peak memory usage: 21411584 Bytes
New peak memory usage: 21070552 Bytes
Relative change: -2 %
========== Performance data for Rule Execution ==========
Old instruction count: 4231322611
New instruction count: 4246208129
Relative change: +0 %
Old peak memory usage: 19239000 Bytes
New peak memory usage: 18181072 Bytes
Relative change: -6 %
========== Performance data for Null Build ==========
Old instruction count: 542161499
New instruction count: 505511534
Relative change: -7 %
Old peak memory usage: 13599040 Bytes
New peak memory usage: 11892952 Bytes
Relative change: -13 %
Change-Id: I36b3dbd3fd2a4bc7503ee7779d31bd0217000785
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This allows to ensure that custom (user) locations come before
canonical shared locations of a particular distribution like
MacPorts (/opt/local/include) or FreeBSD (/usr/local/include).
Change-Id: Ia37b28408312300a42ccc31c7532ffdaf49c1c51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Let fileName contain the file name and filePath the file path like
everywhere else.
[ChangeLog] In Scanner items input.fileName now contains a file name,
and input.filePath contains the file path.
Change-Id: I3abc01989c56940df935047db56055936b3ab224
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The list of include paths must not be stored in a temporary
set. Otherwise the order of include paths is undefined.
Also, since introduction of merged top-level modules in commit 16404c35
we don't need to recurse through the dependency hierarchy.
Change-Id: I50a843fc85dbf1cb04883774d43e5904da815579
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
| |
Certain operations might want to know what the script engine is
currently doing. This will be used in a follow-up commit.
Change-Id: I90167c29e94e0f77c7d5ccf20787e9749434e728
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog] Warnings encountered during project resolving are now stored
and will be re-displayed when the project is loaded.
Task-number: QBS-1011
Change-Id: I5fa04d3d537866212abbdf739b09a254843de473
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|\
| |
| |
| | |
Change-Id: I5a0de1ab1c38080d6061045d28fa9220a88ef4ba
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will ensure that source files depending on header files within the
search paths listed in systemIncludePaths and compilerIncludePaths will
be recompiled when those headers change, as well.
Change-Id: I6995fcd533b065505e3eec219294540579a73407
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
doc/reference/items/transformer.qdoc
share/qbs/modules/cpp/GenericGCC.qbs
Change-Id: I45560834560019b18274c373c45651eb8aadd206
|
| |
| |
| |
| |
| |
| | |
Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This functionality is undocumented, has its flaws and is unavailable in
other JS engines. Use the following pattern instead to inject global
variables without polluting the global namespace:
QScriptValue g = engine.newObject();
g.setPrototype(engine.globalObject());
// set properties on g
engine.setGlobalObject(g);
engine.evaluate(...);
engine.setGlobalObject(g.prototype());
Change-Id: I5f92da8cccfa23c3722740c1852a71fd50e8eb8a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove unneeded #includes (particularly from header files).
- Make inline member function implementations less verbose.
- De-QObjectify the Loader class and remove unneeded members & heap
allocations.
- Minor stuff (const issues, unneeded namespace qualifications).
Change-Id: I55f2d7ed98b32faed7582bc6adfa04eb799de874
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
|
|
|
|
|
|
|
|
| |
Meaning that we check whether the value is an error or the engine has an
uncaught exception, and print the respective string.
Change-Id: Ie2912e28a82906c7ee9323e2f0e55c6b3de96872
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
| |
Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
| |
Add LGPLv3 option.
Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The setters take care of keeping the product's artifact-by-filetags hash
up to date. Before, one had to set up the artifact's file tags before
insertArtifactToProduct was called. Otherwise the hash didn't get updated.
Change-Id: Ibb530d2c992d72c0a99152009b4e6eecbf770098
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|
|
|
|
|
|
|
| |
File dependencies should be scannable for dependencies too.
Change-Id: I7223ba65ee6ca02f70c8e48165652550007e91f6
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|
|
This item allows to write custom dependency scanners in modules.
Change-Id: I6cb49969973ee29896d1909e7a16bf5da50f8aef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|