From 1ee9f50d26f32d57affa9d14b8d8cfead7bbce2c Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 8 Mar 2018 09:05:26 +0000 Subject: [PATCH] Document gcov-io (PR gcov-profile/84735). 2018-03-08 Martin Liska PR gcov-profile/84735 * doc/gcov.texi: Document usage of profile files. * gcov-io.h: Document changes in the format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258360 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/doc/gcov.texi | 6 +++--- gcc/gcov-io.h | 8 ++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17ca051686e..2a7939745e0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-03-08 Martin Liska + + PR gcov-profile/84735 + * doc/gcov.texi: Document usage of profile files. + * gcov-io.h: Document changes in the format. + 2018-03-08 Alexandre Oliva PR debug/84404 diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index d4c7806bc23..59235876aaa 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -816,9 +816,9 @@ A separate @file{.gcda} file is created for each object file compiled with this option. It contains arc transition counts, value profile counts, and some summary information. -The full details of the file format is specified in @file{gcov-io.h}, -and functions provided in that header file should be used to access the -coverage files. +It is not recommended to access the coverage files directly. +Consumers should use the intermediate format that is provided +by @command{gcov} tool via @option{--intermediate-format} option. @node Cross-profiling @section Data File Relocation to Support Cross-Profiling diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 18937e35474..d6389c48908 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -48,7 +48,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see padding: | char:0 | char:0 char:0 | char:0 char:0 char:0 item: int32 | int64 | string - The basic format of the files is + The basic format of the notes file is + + file : int32:magic int32:version int32:stamp int32:support_unexecuted_blocks record* + + The basic format of the data file is file : int32:magic int32:version int32:stamp record* @@ -104,7 +108,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see function-graph: announce_function basic_blocks {arcs | lines}* announce_function: header int32:ident int32:lineno_checksum int32:cfg_checksum - string:name string:source int32:lineno + string:name string:source int32:start_lineno int32:start_column int32:end_lineno basic_block: header int32:flags* arcs: header int32:block_no arc* arc: int32:dest_block int32:flags -- 2.11.4.GIT