Martin Duffy
97adbc91fa
instrumentation: Move target data into content files
...
Create a single place to store target data to prevent duplication.
This moves `targetType` and `targetLabels` out of the snippet files
and into a target map in the `cmakeContent` file referenced by each
snippet.
Fixes : #27244
2025-10-02 09:28:20 -04:00
Brad King
35d3fb0e49
Merge topic 'instrumentation-trace-efficient'
...
f029bd04bf instrumentation: Write trace file incrementally
0882a37f73 instrumentation: Load snippets individually for trace
a31e781fe8 instrumentation: Use end time for snippet file names
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !11249
2025-10-01 08:40:43 -04:00
Tyler Yankee
f029bd04bf
instrumentation: Write trace file incrementally
...
Periodically clearing the output stream buffer saves on memory usage
for large traces.
2025-09-30 10:00:39 -04:00
Tyler Yankee
0882a37f73
instrumentation: Load snippets individually for trace
...
Only loading the necessary timing data and deferring the dump of all
snippet data into the trace file saves on memory for large traces.
2025-09-30 10:00:37 -04:00
Martin Duffy
e730008d7e
instrumentation: Record build snippets regardless of hooks
2025-09-26 15:55:08 -04:00
Tyler Yankee
a31e781fe8
instrumentation: Use end time for snippet file names
2025-09-26 11:44:00 -04:00
Martin Duffy
ba3c278da2
instrumentation: Don't remove content files older than an index
...
Prevent callbacks from referencing deleted content files by holding onto them
if any index files exist that may contain a reference.
2025-09-19 11:29:16 -04:00
Martin Duffy
4683db44a1
instrumentation: Write index files to data/index/ subdirectory
2025-09-19 11:29:03 -04:00
Tyler Yankee
bf52fbfbc4
instrumentation: Add Google trace output
...
Add a feature to parse snippets into a trace file compatible with the
Google Trace Event Format.
Fixes : #26674
2025-09-03 15:24:10 -04:00
Martin Duffy
e6b37105ba
instrumentation: Collect custom content from CMake configure
...
Add a `CUSTOM_CONTENT` argument to `cmake_instrumentation()` for collecting
custom content from configure time.
Snippet files include a reference to a JSON file containing any `CUSTOM_CONTENT`
that was added by this command.
Fixes : #26703
2025-08-21 07:20:12 -04:00
Martin Duffy
a249e820a8
instrumentation: Add file lock for build daemon
...
Prevent starting instrumentation build daemon and related hooks if one is
already running, and when during `cmake --build`.
2025-08-06 11:45:40 -04:00
Martin Duffy
9dec460c8c
instrumentation: Store CDash settings in query files
...
Adds new `cdashSubmit` and `cdashVerbose` options to allow enabling
instrumentation in CDash submissions using query files or the
`cmake_instrumentation` command.
Fixes : #26783 , #26727
2025-07-14 15:44:52 -04:00
Martin Duffy
afa94bae1e
instrumentation: Rename queries field to options
...
Fixes : #26728
2025-07-10 16:25:07 -04:00
Brad King
ed8513783c
Merge topic 'instrumentation-fix'
...
e01d12c14f instrumentation: Prevent unnecessary query loading
f26f127183 instrumentation: Reuse single cmsys::SystemInformation
Acked-by: Kitware Robot <kwrobot@kitware.com >
Merge-request: !10863
2025-06-10 09:48:17 -04:00
Martin Duffy
e01d12c14f
instrumentation: Prevent unnecessary query loading
...
Don't load queries from instrumentation directories when GetIsInTryCompile
or before ClearGeneratedQueries from previous configures has run.
2025-06-09 11:33:24 -04:00
Martin Duffy
f26f127183
instrumentation: Reuse single cmsys::SystemInformation
2025-06-09 11:33:18 -04:00
Brad King
2604f5d8b3
Merge topic 'json-errors-filename'
...
f134468a98 JSON: Improve JSON error message formatting
Acked-by: Kitware Robot <kwrobot@kitware.com >
Acked-by: buildbot <buildbot@kitware.com >
Merge-request: !10463
2025-03-14 12:17:02 -04:00
Martin Duffy
f134468a98
JSON: Improve JSON error message formatting
...
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.
This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.
Issue: #26717
2025-03-13 10:44:31 -04:00
Kitware Robot
1772622772
LICENSE: Replace references to Copyright.txt with LICENSE.rst
...
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
while IFS= read -r -d $'\0' f ; do
sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
s/Copyright.txt/LICENSE.rst/
}' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot
de273b2e11
LICENSE: Replace references to Copyright.txt with LICENSE.rst
...
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
while IFS= read -r -d $'\0' f ; do
sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
s/Copyright.txt/LICENSE.rst/
}' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Zack Galbreath
a6d4a9a2ae
ctest: Include cmake instrumentation data in XML files
2025-02-15 06:25:12 -05:00
Martin Duffy
9689155a05
instrumentation: Add Config value to snippet data
2025-02-09 12:29:09 -05:00
Martin Duffy
2680f30caf
instrumentation: Allow multiple CALLBACK arguments
...
Don't require quotes around CALLBACK argument and allow it to be passed
multiple times.
2025-02-04 11:15:20 -05:00
Martin Duffy
fc1d55f6a5
instrumentation: Add preBuild and postBuild hooks for ninja
...
Allows instrumentation indexing and callbacks to occur at the start or end of
every `ninja` invocation.
2025-02-04 11:15:11 -05:00
Martin Duffy
f62a4ab2ee
instrumentation: Refactor cmInstrumentation constructor and usage
...
Creates a global cmInstrumentation pointer on the CMake Instance to
prevent creating multiple instrumentation objects.
2025-02-03 10:10:06 -05:00
Kitware Robot
0b96ae1f6a
Revise C++ coding style using clang-format with "east const"
...
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
2025-01-23 13:09:50 -05:00
Martin Duffy
097d4fd1b5
instrumentation: Collect and record project build system metrics
...
Add a feature for collecting build instrumentation for CMake projects.
Issue: #26099
2025-01-15 09:16:50 -05:00