summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorFrank Winklmeier <frank.winklmeier@cern.ch>2020-01-20 09:42:50 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-22 14:58:52 (GMT)
commitc829f0cfcaa4753743fde1900091e1233c41350b (patch)
tree319fee9604ee4f5f4c6a006855b5d055f5b81a68 /Help
parent5e38b8f608fee599494aadd0d4b5ed9366843bda (diff)
downloadCMake-c829f0cfcaa4753743fde1900091e1233c41350b.zip
CMake-c829f0cfcaa4753743fde1900091e1233c41350b.tar.gz
CMake-c829f0cfcaa4753743fde1900091e1233c41350b.tar.bz2
trace: Add time and stack level to JSON output format
Add the timestamp and stack depth of the function call to the JSON trace output format. This information can be useful for cmake profiling and call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats). Improve unit test to allow for varying set of keys to check in trace lines.
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake.1.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 4315f0a..44b1f2f 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -279,7 +279,9 @@ Options
"file": "/full/path/to/the/CMake/file.txt",
"line": 0,
"cmd": "add_executable",
- "args": ["foo", "bar"]
+ "args": ["foo", "bar"],
+ "time": 1579512535.9687231,
+ "frame": 2
}
The members are:
@@ -288,8 +290,8 @@ Options
The full path to the CMake source file where the function
was called.
- ``line``
- The line in `file` of the function call.
+ ``line``
+ The line in ``file`` of the function call.
``cmd``
The name of the function that was called.
@@ -297,6 +299,12 @@ Options
``args``
A string list of all function parameters.
+ ``time``
+ Timestamp (seconds since epoch) of the function call.
+
+ ``frame``
+ Stack frame depth of the function that was called.
+
Additionally, the first JSON document outputted contains the
``version`` key for the current major and minor version of the