[Bug gcov-profile/94928] New: Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-02 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

Bug ID: 94928
   Summary: Doc comments in gcov-io.h do not show cwd and unexec
blocks in the Notes file format
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: myron.walker at gmail dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The documentation of the notes file format below do not show the cwd or
unexec_blocks data items.

note: unit function-graph*
unit: header int32:checksum string:source
function-graph: announce_function basic_blocks {arcs | lines}*
announce_function: header int32:ident
int32:lineno_checksum int32:cfg_checksum
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
lines: header int32:block_no line*
   int32:0 string:NULL
line:  int32:line_no | int32:0 string:filename


When you look at the gcov.c file, you can see that at the beginning of the
notes file right after the stamp, there is an item for cwd and unexec blocks.

  bbg_stamp = gcov_read_unsigned();
  bbg_cwd = xstrdup(gcov_read_string()); <<<<< Not documented
  bbg_supports_has_unexecuted_blocks = gcov_read_unsigned();   <<<<<< Not
documented


There also is a missing int32:artificial that should be between the function
name and function source file.

  function_name = xstrdup(gcov_read_string());
  unsigned artificial = gcov_read_unsigned();  <<<< Not documented
  unsigned src_idx = find_source(gcov_read_string());

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #2 from Myron Walker  ---
I am parsinv both gcno and gcda files.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #4 from Myron Walker  ---
A python tool that can do distributed code coverage analysis.  Gcda files from
cluster nodes from a web interface, gcno from a web interface or file share in
a build archive, and source directly from github.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #6 from Myron Walker  ---
I use the gcno file to build a the graph, pull counters from the gcda files and
then solve the graph for the missing counts.  I am merging the data from
multiple gcda sources.  Multiple nodes running the same software.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #9 from Myron Walker  ---
How you I process data files from multiple sources and multiple runs with gcov.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #11 from Myron Walker  ---
Ok.  I'll look into it

On Wed, May 6, 2020, 7:25 AM marxin at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928
>
> --- Comment #10 from Martin Liška  ---
> (In reply to Myron Walker from comment #9)
> > How you I process data files from multiple sources and multiple runs with
> > gcov.
>
> $ man gcov-tool
>
> $ gcov-tool merge [merge-options] directory1 directory2
>
> So you basically take 2 folders of 2 runs and merge them into a destination
> one.
> The folders are traversed for .gcda files and corresponding files are
> merged.
> Having N runs, you need to run log2(N) merge operations.
>
> --
> You are receiving this mail because:
> You reported the bug.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-06 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #12 from Myron Walker  ---
What would be helpful then is if gcno, gcda and source files could all have
separate root file system prefixes.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-07 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #14 from Myron Walker  ---
There are three types of files used to create a code coverage report.  Notes,
Data, and Source.  It is likely that each type of file might have its own
prefix GCOV_SRC_PREFIX, GCOV_NOTES_PREFIX and GCOC_DATA_PREFIX

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-07 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #16 from Myron Walker  ---
Just seems easier if the tool offers a choice.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-11 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #20 from Myron Walker  ---
So I will probably continue working on the python script or package that can do
much of the enhanced processing.  One of the benefits of the python is I can
process the code coverage data outside of a build environment altogether.

[Bug gcov-profile/94928] Doc comments in gcov-io.h do not show cwd and unexec blocks in the Notes file format

2020-05-11 Thread myron.walker at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94928

--- Comment #22 from Myron Walker  ---
It does the same things a gcov and lcov  combined but in python.  It also does
merging of data but in a different way than gcov-tool.  I might need to change
that.  Another part of it is to allow access to different types of resource
location hinting.  so a gcov prefix for a source code might be a github url and
token.  A gcno file hint might be a web url or sub or nfs share.  Like wise the
data file hints might be http, smb or nfs prefixes.

https://github.com/myronww/pycover

Still a work in progress though.

[Bug gcov-profile/53406] New: Unit Record not present in header files or in GCOV output

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

 Bug #: 53406
   Summary: Unit Record not present in header files or in GCOV
output
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: myron.wal...@gmail.com


The GCOV file format detailed in the gcov-io.h header file describe unit record
in the .gcno files like so:

   unit: header int32:checksum string:source

and in the .gcda files like so:

   unit: header int32:checksum

When I use the code coverage tools on Ubuntu 11.10 that uses GCC 4.6.1.  The
.gcno and .gcda files that are produced do not contain this record.

Also when you look at the TAG definitions in the header file there isn't a tag
declared for this record type.  see below:

/* The record tags.  Values [1..3f] are for tags which may be in either
   file.  Values [41..9f] for those in the note file and [a1..ff] for
   the data file.  The tag value zero is used as an explicit end of
   file marker -- it is not required to be present.  */

#define GCOV_TAG_FUNCTION ((gcov_unsigned_t)0x0100)
#define GCOV_TAG_FUNCTION_LENGTH (2)
#define GCOV_TAG_BLOCKS ((gcov_unsigned_t)0x0141)
#define GCOV_TAG_BLOCKS_LENGTH(NUM) (NUM)
#define GCOV_TAG_BLOCKS_NUM(LENGTH) (LENGTH)
#define GCOV_TAG_ARCS ((gcov_unsigned_t)0x0143)
#define GCOV_TAG_ARCS_LENGTH(NUM)  (1 + (NUM) * 2)
#define GCOV_TAG_ARCS_NUM(LENGTH)  (((LENGTH) - 1) / 2)
#define GCOV_TAG_LINES ((gcov_unsigned_t)0x0145)
#define GCOV_TAG_COUNTER_BASE  ((gcov_unsigned_t)0x01a1)
#define GCOV_TAG_COUNTER_LENGTH(NUM) ((NUM) * 2)
#define GCOV_TAG_COUNTER_NUM(LENGTH) ((LENGTH) / 2)
#define GCOV_TAG_OBJECT_SUMMARY  ((gcov_unsigned_t)0xa100)
#define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa300)
#define GCOV_TAG_SUMMARY_LENGTH  \
(1 + GCOV_COUNTERS_SUMMABLE * (2 + 3 * 2))


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

--- Comment #1 from Myron Walker  2012-05-18 
17:53:18 UTC ---
Created attachment 27438
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27438
Sample GCDA file


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

--- Comment #2 from Myron Walker  2012-05-18 
17:54:12 UTC ---
Created attachment 27439
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27439
Sample GCNO file


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

--- Comment #3 from Myron Walker  2012-05-18 
17:54:49 UTC ---
Added example GCDA and GCNO files


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

Myron Walker  changed:

   What|Removed |Added

Version|4.6.1   |4.2.0

--- Comment #4 from Myron Walker  2012-05-18 
18:01:42 UTC ---
The GCDA and GCNO files were produced by GCC version 4.2 but the issues with
the header files, like the missing tag, are present in later versions.


[Bug gcov-profile/53414] New: gcov does not generate 'Lines' record for final block of functions

2012-05-18 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53414

 Bug #: 53414
   Summary: gcov does not generate 'Lines' record for final block
of functions
Classification: Unclassified
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: gcov-profile
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: myron.wal...@gmail.com


GCC does not add a Lines record for the final line of code in functions with a
return with if statements having multiple branches.  Examples

This code has a lines marking the end of the function:

01: int global_value = 0;
02:
03: void graph_simplebranch(int taken)
04: {
05: if(taken > 0)
06: {
07: global_value = global_value + 1;
08: }
09: }

This code does not get a lines record generated for the block that is the end
of the function.

01: int global_value = 0;
02: 
03: void graph_multiplebranches(int pathSelect)
04: {
05: if(pathSelect == 0)
06: {
07: global_value = global_value + 1;
08: }
09: else if(pathSelect == 1)
10: {
11: global_value = global_value + 2;
12: }
13: else
14: {
15: global_value = global_value + 3;
16: }
17: 
18: return;
19: }


[Bug gcov-profile/53406] Unit Record not present in header files or in GCOV output

2012-05-22 Thread myron.walker at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53406

--- Comment #6 from Myron Walker  2012-05-22 
21:57:02 UTC ---
Not according to the docs in the comments.

note: unit function-graph*
unit: header int32:checksum string:source
function-graph: announce_function basic_blocks {arcs | lines}*
announce_function: header int32:ident int32:checksum
string:name string:source int32:lineno
basic_block: header int32:flags*
arcs: header int32:block_no arc*
arc:  int32:dest_block int32:flags
lines: header int32:block_no line*
   int32:0 string:NULL
line:  int32:line_no | int32:0 string:filename