[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] [ ltp-Feature Requests-3553772 ] lcov: source files matching during *.info files creation
From:       SourceForge.net <noreply () sourceforge ! net>
Date:       2012-09-03 10:11:26
Message-ID: E1T8TfL-0001bB-7K () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Feature Requests item #3553772, was opened at 2012-08-02 14:01
Message generated for change (Comment added) made by oberpapr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=353382&aid=3553772&group_id=3382

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tools
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Robert Luberda (robld)
Assigned to: Nobody/Anonymous (nobody)
Summary: lcov: source files matching during *.info files creation

Initial Comment:
Hi

 geninfo iterates in the following loop over all files generated by gcov:
 foreach $gcov_file (sort(@gcov_list))
        {
                my $i;
                my $num;

                ($source, $object) = read_gcov_header($gcov_file);
                if (defined($source))
                {
                        $source = solve_relative_path($base_dir, $source);

It would be nice if geninfo would have an option to ignore $source that does not \
                match certain file name pattern, i.e. if the next line would be \
                something like
                        next unless matches_requested_filename_patterns($source)

This obvoiusly work similar quite to  --extract option of lcov, but I belive it would \
result in a big performance improvement, as gcov tends to generate lots of useless \
(from our point of view) files containg coverage data for system or external library \
headers. Then geninfo reads all the files, and wastes time and processor cycles to \
generate huge info file, most of which will be removed by lcov --extract. For a big \
C++ project the whole process of generating unit test coverage data takes several \
hours. I hope using the proposed approach will reduce the time significantly.  The \
simillar thing can be done for reading gcno files for gathering initial coverage \
data.

I can try to create a patch, if you are interested in.

Thanks a lot,
robert



----------------------------------------------------------------------

Comment By: Peter Oberparleiter (oberpapr)
Date: 2012-09-03 03:11

Message:
Please give option --no-external a try. This option was introduced with the
new (as of yet unreleased) version of lcov that can be found in the lcov
CVS. It instructs lcov to ignore data for files which are not part of the
main source directory.

----------------------------------------------------------------------

Comment By: Robert Luberda (robld)
Date: 2012-08-03 01:03

Message:
I've just discovered that  new --source-prefix and --relative-only options
has been introduced in gcov 4.7 (see
http://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov). This
would suffer my needs, unfortunatelly I  don't think we can migrate to gcc
4.7 in predictable future at work :( 
So my suggestion is: add those to options to lcov and geninfo. Then pass
them to gcov if gcov supports them or simulate theirs behaviour in geninfo
otherwise. Would it make sense to you?

Regards,
robert


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=353382&aid=3553772&group_id=3382

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic