Commit 99603e90 by Martin Liska Committed by Martin Liska

Add data_file to GCOV interm. format (PR gcov-profile/89961).

2019-04-08  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/89961
	* doc/gcov.texi: Document data_file.
	* gcov.c (generate_results): Add data_info into JSON output.

From-SVN: r270204
parent d6366157
2019-04-08 Martin Liska <mliska@suse.cz>
PR gcov-profile/89961
* doc/gcov.texi: Document data_file.
* gcov.c (generate_results): Add data_info into JSON output.
2019-04-01 Bin Cheng <bin.cheng@linux.alibaba.com> 2019-04-01 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/89725 PR tree-optimization/89725
......
...@@ -192,6 +192,7 @@ Structure of the JSON is following: ...@@ -192,6 +192,7 @@ Structure of the JSON is following:
@smallexample @smallexample
@{ @{
"current_working_directory": @var{current_working_directory}, "current_working_directory": @var{current_working_directory},
"data_file": @var{data_file},
"format_version": @var{format_version}, "format_version": @var{format_version},
"gcc_version": @var{gcc_version} "gcc_version": @var{gcc_version}
"files": [@var{file}] "files": [@var{file}]
...@@ -206,6 +207,9 @@ Fields of the root element have following semantics: ...@@ -206,6 +207,9 @@ Fields of the root element have following semantics:
a compilation unit was compiled a compilation unit was compiled
@item @item
@var{data_file}: name of the data file (GCDA)
@item
@var{format_version}: semantic version of the format @var{format_version}: semantic version of the format
@item @item
......
...@@ -1421,6 +1421,7 @@ generate_results (const char *file_name) ...@@ -1421,6 +1421,7 @@ generate_results (const char *file_name)
if (bbg_cwd != NULL) if (bbg_cwd != NULL)
root->set ("current_working_directory", new json::string (bbg_cwd)); root->set ("current_working_directory", new json::string (bbg_cwd));
root->set ("data_file", new json::string (file_name));
json::array *json_files = new json::array (); json::array *json_files = new json::array ();
root->set ("files", json_files); root->set ("files", json_files);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment