You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(205) |
Feb
(281) |
Mar
(428) |
Apr
(444) |
May
(137) |
Jun
(341) |
Jul
(509) |
Aug
(184) |
Sep
(51) |
Oct
(70) |
Nov
(52) |
Dec
(41) |
2004 |
Jan
(27) |
Feb
|
Mar
|
Apr
(99) |
May
(562) |
Jun
(36) |
Jul
(74) |
Aug
(61) |
Sep
(33) |
Oct
(76) |
Nov
(64) |
Dec
(71) |
2005 |
Jan
(19) |
Feb
(28) |
Mar
(726) |
Apr
(310) |
May
(325) |
Jun
(496) |
Jul
(192) |
Aug
(72) |
Sep
(41) |
Oct
(294) |
Nov
(79) |
Dec
(64) |
2006 |
Jan
(112) |
Feb
(267) |
Mar
(33) |
Apr
(16) |
May
(121) |
Jun
(77) |
Jul
(43) |
Aug
(281) |
Sep
(97) |
Oct
(19) |
Nov
(15) |
Dec
(50) |
2007 |
Jan
(2) |
Feb
(31) |
Mar
(21) |
Apr
(76) |
May
(36) |
Jun
(97) |
Jul
(93) |
Aug
(85) |
Sep
(77) |
Oct
(35) |
Nov
(106) |
Dec
(81) |
2008 |
Jan
(86) |
Feb
(139) |
Mar
(378) |
Apr
(127) |
May
(196) |
Jun
(108) |
Jul
(136) |
Aug
(137) |
Sep
(114) |
Oct
(229) |
Nov
(312) |
Dec
(180) |
2009 |
Jan
(747) |
Feb
(907) |
Mar
(371) |
Apr
(174) |
May
(192) |
Jun
(163) |
Jul
(744) |
Aug
(495) |
Sep
(85) |
Oct
(950) |
Nov
(311) |
Dec
(180) |
2010 |
Jan
(303) |
Feb
(33) |
Mar
(9) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(18) |
Aug
(37) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(3) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(17) |
Nov
(1) |
Dec
|
2013 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2016 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Peter O. <obe...@us...> - 2013-01-25 16:29:32
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22341 Modified Files: genhtml Log Message: genhtml: merge function data during demangling Merge function execution counts when multiple function names demangle to the same name. Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** genhtml 25 Jan 2013 11:46:28 -0000 1.72 --- genhtml 25 Jan 2013 16:29:30 -0000 1.73 *************** *** 707,710 **** --- 707,712 ---- # # Rename all function names in INFO according to CONV: OLD_NAME -> NEW_NAME. + # In case two functions demangle to the same name, assume that they are + # different object code implementations for the same source function. # *************** *** 720,728 **** my %newfuncdata; my %newsumfnccount; # funcdata: function name -> line number $funcdata = $data->{"func"}; ! foreach my $fn_name (keys(%{$funcdata})) { ! $newfuncdata{$conv->{$fn_name}} = $funcdata->{$fn_name}; } $data->{"func"} = \%newfuncdata; --- 722,743 ---- my %newfuncdata; my %newsumfnccount; + my $f_found; + my $f_hit; # funcdata: function name -> line number $funcdata = $data->{"func"}; ! foreach my $fn (keys(%{$funcdata})) { ! my $cn = $conv->{$fn}; ! ! # Abort if two functions on different lines map to the ! # same demangled name. ! if (defined($newfuncdata{$cn}) && ! $newfuncdata{$cn} != $funcdata->{$fn}) { ! die("ERROR: Demangled function name $fn ". ! " maps to different lines (". ! $newfuncdata{$cn}." vs ". ! $funcdata->{$fn}.")\n"); ! } ! $newfuncdata{$cn} = $funcdata->{$fn}; } $data->{"func"} = \%newfuncdata; *************** *** 731,774 **** # testfnccount: function name -> execution count $testfncdata = $data->{"testfnc"}; ! foreach my $test_name (keys(%{$testfncdata})) { ! my $testfnccount = $testfncdata->{$test_name}; my %newtestfnccount; ! foreach my $fn_name (keys(%{$testfnccount})) { ! $newtestfnccount{$conv->{$fn_name}} = ! $testfnccount->{$fn_name}; } ! $testfncdata->{$test_name} = \%newtestfnccount; } # sumfnccount: function name -> execution count $sumfnccount = $data->{"sumfnc"}; ! foreach my $fn_name (keys(%{$sumfnccount})) { ! $newsumfnccount{$conv->{$fn_name}} = ! $sumfnccount->{$fn_name}; } $data->{"sumfnc"} = \%newsumfnccount; - } - } - - # - # check_unique_conv(CONV) - # - # Check that there is no A in CONV: A -> B where C -> B. - # - - sub check_unique_conv($) - { - my ($conv) = @_; - my %rconv; ! foreach my $fn_name (keys(%{$conv})) { ! my $c = $conv->{$fn_name}; ! ! if (defined($rconv{$c})) { ! die("ERROR: non-unique c++filt output for ". ! "'$fn_name' and '$rconv{$c}!\n"); } ! $rconv{$c} = $fn_name; } } --- 746,785 ---- # testfnccount: function name -> execution count $testfncdata = $data->{"testfnc"}; ! foreach my $tn (keys(%{$testfncdata})) { ! my $testfnccount = $testfncdata->{$tn}; my %newtestfnccount; ! foreach my $fn (keys(%{$testfnccount})) { ! my $cn = $conv->{$fn}; ! ! # Add counts for different functions that map ! # to the same name. ! $newtestfnccount{$cn} += ! $testfnccount->{$fn}; } ! $testfncdata->{$tn} = \%newtestfnccount; } # sumfnccount: function name -> execution count $sumfnccount = $data->{"sumfnc"}; ! foreach my $fn (keys(%{$sumfnccount})) { ! my $cn = $conv->{$fn}; ! ! # Add counts for different functions that map ! # to the same name. ! $newsumfnccount{$cn} += $sumfnccount->{$fn}; } $data->{"sumfnc"} = \%newsumfnccount; ! # Update function found and hit counts since they may have ! # changed ! $f_found = 0; ! $f_hit = 0; ! foreach my $fn (keys(%newsumfnccount)) { ! $f_found++; ! $f_hit++ if ($newsumfnccount{$fn} > 0); } ! $data->{"f_found"} = $f_found; ! $data->{"f_hit"} = $f_hit; } } *************** *** 822,828 **** } - # Should not be necessary but could silently produce incorrect results - check_unique_conv(\%demangled); - info("Demangling $changed function names\n"); --- 833,836 ---- |
From: Peter O. <obe...@us...> - 2013-01-25 11:46:31
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1108 Modified Files: genhtml Log Message: genhtml: improve function table sorting In the function table view, the initial view should show the functions sorted by execution count because - unlike with file names - the function name is not a natural order for functions (the line number would be, but that is not available). Also sort functions with the same execution count alphabetically for a stable order. Base on a suggestion by pau...@ho.... Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** genhtml 23 Jan 2013 16:52:06 -0000 1.71 --- genhtml 25 Jan 2013 11:46:28 -0000 1.72 *************** *** 4434,4438 **** $view .= "<span style=\"font-size: 80%;\">"; if ($type == $HDR_SOURCE) { ! $view .= " (source / <a href=\"$base_name.func.$html_ext\">functions</a>)"; } elsif ($type == $HDR_FUNC) { $view .= " (<a href=\"$base_name.gcov.$html_ext\">source</a> / functions)"; --- 4434,4442 ---- $view .= "<span style=\"font-size: 80%;\">"; if ($type == $HDR_SOURCE) { ! if ($sort) { ! $view .= " (source / <a href=\"$base_name.func-sort-c.$html_ext\">functions</a>)"; ! } else { ! $view .= " (source / <a href=\"$base_name.func.$html_ext\">functions</a>)"; ! } } elsif ($type == $HDR_FUNC) { $view .= " (<a href=\"$base_name.gcov.$html_ext\">source</a> / functions)"; *************** *** 5297,5302 **** return sort(keys(%{$funcdata})); } ! return sort({$sumfncdata->{$b} <=> $sumfncdata->{$a}} ! keys(%{$sumfncdata})); } --- 5301,5308 ---- return sort(keys(%{$funcdata})); } ! return sort({ ! $sumfncdata->{$b} == $sumfncdata->{$a} ? ! $a cmp $b : $sumfncdata->{$a} <=> $sumfncdata->{$b} ! } keys(%{$sumfncdata})); } |
From: Peter O. <obe...@us...> - 2013-01-23 16:52:09
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23975 Modified Files: genhtml Log Message: genhtml: consolidate calls to c++filt When using --demanglecpp, call c++filt only once instead of per function. This approach can reduce the run-time for source files with a lot of overloaded functions significantly. Based on idea by ol...@su.... Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** genhtml 10 Oct 2012 08:36:16 -0000 1.70 --- genhtml 23 Jan 2013 16:52:06 -0000 1.71 *************** *** 66,70 **** use strict; ! use File::Basename; use Getopt::Long; use Digest::MD5 qw(md5_base64); --- 66,71 ---- use strict; ! use File::Basename; ! use File::Temp qw(tempfile); use Getopt::Long; use Digest::MD5 qw(md5_base64); *************** *** 673,676 **** --- 674,833 ---- } + sub get_fn_list($) + { + my ($info) = @_; + my %fns; + my @result; + + foreach my $filename (keys(%{$info})) { + my $data = $info->{$filename}; + my $funcdata = $data->{"func"}; + my $sumfnccount = $data->{"sumfnc"}; + + if (defined($funcdata)) { + foreach my $func_name (keys(%{$funcdata})) { + $fns{$func_name} = 1; + } + } + + if (defined($sumfnccount)) { + foreach my $func_name (keys(%{$sumfnccount})) { + $fns{$func_name} = 1; + } + } + } + + @result = keys(%fns); + + return \@result; + } + + # + # rename_functions(info, conv) + # + # Rename all function names in INFO according to CONV: OLD_NAME -> NEW_NAME. + # + + sub rename_functions($$) + { + my ($info, $conv) = @_; + + foreach my $filename (keys(%{$info})) { + my $data = $info->{$filename}; + my $funcdata; + my $testfncdata; + my $sumfnccount; + my %newfuncdata; + my %newsumfnccount; + + # funcdata: function name -> line number + $funcdata = $data->{"func"}; + foreach my $fn_name (keys(%{$funcdata})) { + $newfuncdata{$conv->{$fn_name}} = $funcdata->{$fn_name}; + } + $data->{"func"} = \%newfuncdata; + + # testfncdata: test name -> testfnccount + # testfnccount: function name -> execution count + $testfncdata = $data->{"testfnc"}; + foreach my $test_name (keys(%{$testfncdata})) { + my $testfnccount = $testfncdata->{$test_name}; + my %newtestfnccount; + + foreach my $fn_name (keys(%{$testfnccount})) { + $newtestfnccount{$conv->{$fn_name}} = + $testfnccount->{$fn_name}; + } + $testfncdata->{$test_name} = \%newtestfnccount; + } + + # sumfnccount: function name -> execution count + $sumfnccount = $data->{"sumfnc"}; + foreach my $fn_name (keys(%{$sumfnccount})) { + $newsumfnccount{$conv->{$fn_name}} = + $sumfnccount->{$fn_name}; + } + $data->{"sumfnc"} = \%newsumfnccount; + } + } + + # + # check_unique_conv(CONV) + # + # Check that there is no A in CONV: A -> B where C -> B. + # + + sub check_unique_conv($) + { + my ($conv) = @_; + my %rconv; + + foreach my $fn_name (keys(%{$conv})) { + my $c = $conv->{$fn_name}; + + if (defined($rconv{$c})) { + die("ERROR: non-unique c++filt output for ". + "'$fn_name' and '$rconv{$c}!\n"); + } + $rconv{$c} = $fn_name; + } + } + + # + # demangle_cpp(INFO) + # + # Demangle all function names found in INFO. + # + sub demangle_cpp($) + { + my ($info) = @_; + my $fn_list = get_fn_list($info); + my @fn_list_demangled; + my $tmpfile; + my $handle; + my %demangled; + my $changed; + + # Nothing to do + return if (!@$fn_list); + + # Write list to temp file + (undef, $tmpfile) = tempfile(); + die("ERROR: could not create temporary file") if (!defined($tmpfile)); + open($handle, ">", $tmpfile) or + die("ERROR: could not write to $tmpfile: $!\n"); + print($handle join("\n", @$fn_list)); + close($handle); + + # Run c++ filt on tempfile file and parse output, creating a hash + open($handle, "-|", "c++filt < $tmpfile") or + die("ERROR: could not run c++filt: $!\n"); + @fn_list_demangled = <$handle>; + close($handle); + unlink($tmpfile) or + warn("WARNING: could not remove temporary file $tmpfile: $!\n"); + + if (scalar(@fn_list_demangled) != scalar(@$fn_list)) { + die("ERROR: c++filt output not as expected (". + scalar(@fn_list_demangled)." vs ". + scalar(@$fn_list).") lines\n"); + } + + # Build old_name -> new_name + $changed = 0; + for (my $i = 0; $i < scalar(@$fn_list); $i++) { + chomp($fn_list_demangled[$i]); + $demangled{$fn_list->[$i]} = $fn_list_demangled[$i]; + $changed++ if ($fn_list->[$i] ne $fn_list_demangled[$i]); + } + + # Should not be necessary but could silently produce incorrect results + check_unique_conv(\%demangled); + + info("Demangling $changed function names\n"); + + # Change all occurrences of function names in INFO + rename_functions($info, \%demangled); + } # *************** *** 731,734 **** --- 888,894 ---- } + # Demangle C++ function names if requested + demangle_cpp(\%info_data) if ($demangle_cpp); + @dir_list = get_dir_list(keys(%info_data)); *************** *** 5195,5204 **** my $countstyle; ! # Demangle C++ function names if requested ! if ($demangle_cpp) { ! $name = `c++filt "$name"`; ! chomp($name); ! } ! # Escape any remaining special characters $name = escape_html($name); if ($startline < 1) { --- 5355,5359 ---- my $countstyle; ! # Escape special characters $name = escape_html($name); if ($startline < 1) { |
From: Peter O. <obe...@us...> - 2013-01-10 09:02:35
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25319 Modified Files: geninfo Log Message: geninfo: make empty data directories non-fatal Emit a warning when no data file is found in a data directory to allow processing of additional directories. Based on suggestion by ric...@ya.... Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** geninfo 13 Nov 2012 09:58:53 -0000 1.118 --- geninfo 10 Jan 2013 09:02:32 -0000 1.119 *************** *** 685,690 **** @file_list = `find "$directory" $maxdepth $follow -name \\*$ext -type f 2>/dev/null`; chomp(@file_list); ! @file_list or ! die("ERROR: no $ext files found in $directory!\n"); $prefix = get_common_prefix(1, @file_list); info("Found %d %s files in %s\n", $#file_list+1, $type, --- 685,693 ---- @file_list = `find "$directory" $maxdepth $follow -name \\*$ext -type f 2>/dev/null`; chomp(@file_list); ! if (!@file_list) { ! warn("WARNING: no $ext files found in $directory - ". ! "skipping!\n"); ! return; ! } $prefix = get_common_prefix(1, @file_list); info("Found %d %s files in %s\n", $#file_list+1, $type, |
From: Peter O. <obe...@us...> - 2012-11-13 09:58:55
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv25701 Modified Files: geninfo Log Message: geninfo: fix parsing of gcc 4.7 gcov format GCC 4.7 changes the gcov format for lines which can only be reached by exceptions to "=====" instead of "#####". This results in the following warning: geninfo: Argument "=====" isn't numeric in numeric gt (>) at geninfo line 1281. Fix this by handling "=====" correctly. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** geninfo 10 Oct 2012 08:36:16 -0000 1.117 --- geninfo 13 Nov 2012 09:58:53 -0000 1.118 *************** *** 1834,1838 **** } else { # Check for zero count ! if ($count eq "#####") { $count = 0; } --- 1834,1838 ---- } else { # Check for zero count ! if ($count =~ /^[#=]/) { $count = 0; } |
From: Peter O. <obe...@us...> - 2012-10-10 09:14:19
|
Update of /cvsroot/ltp/utils/analysis/lcov/rpm In directory vz-cvs-4.sog:/tmp/cvs-serv32288 Modified Files: lcov.spec Log Message: lcov.spec: back to CVS version Index: lcov.spec =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/rpm/lcov.spec,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lcov.spec 10 Oct 2012 09:12:42 -0000 1.19 --- lcov.spec 10 Oct 2012 09:14:17 -0000 1.20 *************** *** 1,6 **** Summary: A graphical GCOV front-end Name: lcov ! Version: 1.10 ! Release: 1 License: GPL Group: Development/Tools --- 1,6 ---- Summary: A graphical GCOV front-end Name: lcov ! Version: 1.11 ! Release: pre1 License: GPL Group: Development/Tools |
From: Peter O. <obe...@us...> - 2012-10-10 09:12:44
|
Update of /cvsroot/ltp/utils/analysis/lcov/rpm In directory vz-cvs-4.sog:/tmp/cvs-serv32215 Modified Files: lcov.spec Log Message: lcov.spec: fix Perl dependency Index: lcov.spec =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/rpm/lcov.spec,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** lcov.spec 10 Oct 2012 08:36:16 -0000 1.18 --- lcov.spec 10 Oct 2012 09:12:42 -0000 1.19 *************** *** 1,6 **** Summary: A graphical GCOV front-end Name: lcov ! Version: 1.11 ! Release: pre1 License: GPL Group: Development/Tools --- 1,6 ---- Summary: A graphical GCOV front-end Name: lcov ! Version: 1.10 ! Release: 1 License: GPL Group: Development/Tools *************** *** 9,13 **** BuildRoot: /var/tmp/%{name}-%{version}-root BuildArch: noarch ! Requires: perl >= 4:5.8.8 %description --- 9,13 ---- BuildRoot: /var/tmp/%{name}-%{version}-root BuildArch: noarch ! Requires: perl >= 5.8.8 %description |
From: Peter O. <obe...@us...> - 2012-10-10 08:36:18
|
Update of /cvsroot/ltp/utils/analysis/lcov In directory vz-cvs-4.sog:/tmp/cvs-serv26495 Modified Files: Makefile Log Message: lcov: update CVS version to 1.11-pre1 Index: Makefile =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/Makefile,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile 10 Oct 2012 08:20:20 -0000 1.20 --- Makefile 10 Oct 2012 08:36:16 -0000 1.21 *************** *** 12,17 **** # ! VERSION := 1.10 ! RELEASE := 1 CFG_DIR := $(PREFIX)/etc --- 12,17 ---- # ! VERSION := 1.11 ! RELEASE := pre1 CFG_DIR := $(PREFIX)/etc |
From: Peter O. <obe...@us...> - 2012-10-10 08:20:23
|
Update of /cvsroot/ltp/utils/analysis/lcov In directory vz-cvs-4.sog:/tmp/cvs-serv25714 Modified Files: Makefile README Log Message: lcov: finalizing release 1.10 Index: README =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/README,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** README 20 Aug 2010 13:14:50 -0000 1.12 --- README 10 Oct 2012 08:20:20 -0000 1.13 *************** *** 1,5 **** ------------------------------------------------- - README file for the LTP GCOV extension (LCOV) - ! - Last changes: 2010-08-06 - ------------------------------------------------- --- 1,5 ---- ------------------------------------------------- - README file for the LTP GCOV extension (LCOV) - ! - Last changes: 2012-10-10 - ------------------------------------------------- Index: Makefile =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/Makefile,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile 6 Aug 2010 11:25:12 -0000 1.19 --- Makefile 10 Oct 2012 08:20:20 -0000 1.20 *************** *** 13,17 **** VERSION := 1.10 ! RELEASE := pre1 CFG_DIR := $(PREFIX)/etc --- 13,17 ---- VERSION := 1.10 ! RELEASE := 1 CFG_DIR := $(PREFIX)/etc |
From: Peter O. <obe...@us...> - 2012-10-10 08:07:56
|
Update of /cvsroot/ltp/utils/analysis/lcov In directory vz-cvs-4.sog:/tmp/cvs-serv24090 Modified Files: CHANGES Log Message: CHANGES: update Index: CHANGES =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/CHANGES,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CHANGES 9 Oct 2012 13:58:22 -0000 1.26 --- CHANGES 10 Oct 2012 08:07:54 -0000 1.27 *************** *** 16,19 **** --- 16,20 ---- - Fixed handling of special characters in file and directory names - Fixed directory prefix calculation + - Fixed warning when source files are found in root directory geninfo: |
From: Peter O. <obe...@us...> - 2012-10-10 08:07:04
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv24026/bin Modified Files: genhtml Log Message: genhtml: handle source files in root directory gracefully Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** genhtml 8 Oct 2012 13:02:45 -0000 1.67 --- genhtml 10 Oct 2012 08:07:01 -0000 1.68 *************** *** 800,803 **** --- 800,806 ---- = process_dir($dir_name); + # Handle files in root directory gracefully + $dir_name = "root" if ($dir_name eq ""); + # Remove prefix if applicable if (!$no_prefix && $dir_prefix) *************** *** 954,957 **** --- 957,964 ---- } + # Handle files in root directory gracefully + $rel_dir = "root" if ($rel_dir eq ""); + $trunc_dir = "root" if ($trunc_dir eq ""); + $base_dir = get_relative_base_path($rel_dir); *************** *** 2197,2200 **** --- 2204,2210 ---- } + # Check if any prefix remains + return undef if (!%prefix); + # Calculate sum of lengths for all prefixes foreach $current (keys(%prefix)) |
From: Peter O. <obe...@us...> - 2012-10-09 13:58:24
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv1952/bin Modified Files: geninfo Log Message: geninfo: add automatic detection of base directory Add a heuristic to automatically determine the base directory when collecting coverage data. This heuristic should cover many, if not most cases of build systems moving files around during compilation (e.g. libtool, automake, etc.). The heuristic can be enabled or disabled using the configuration file directory 'geninfo_auto_base'. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** geninfo 8 Oct 2012 15:03:23 -0000 1.114 --- geninfo 9 Oct 2012 13:58:22 -0000 1.115 *************** *** 53,57 **** use File::Basename; use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir ! splitpath/; use Getopt::Long; use Digest::MD5 qw(md5_base64); --- 53,57 ---- use File::Basename; use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir ! splitpath catpath/; use Getopt::Long; use Digest::MD5 qw(md5_base64); *************** *** 178,194 **** sub read_bb_value(*;$); sub read_bb_string(*$); ! sub read_bb($$); sub read_bbg_word(*;$); sub read_bbg_value(*;$); sub read_bbg_string(*); ! sub read_bbg_lines_record(*$$$$$$); ! sub read_bbg($$); sub read_gcno_word(*;$$); sub read_gcno_value(*$;$$); sub read_gcno_string(*$); ! sub read_gcno_lines_record(*$$$$$$$); sub determine_gcno_split_crc($$$); ! sub read_gcno_function_record(*$$$$$); ! sub read_gcno($$); sub get_gcov_capabilities(); sub get_overall_line($$$$); --- 178,194 ---- sub read_bb_value(*;$); sub read_bb_string(*$); ! sub read_bb($); sub read_bbg_word(*;$); sub read_bbg_value(*;$); sub read_bbg_string(*); ! sub read_bbg_lines_record(*$$$$$); ! sub read_bbg($); sub read_gcno_word(*;$$); sub read_gcno_value(*$;$$); sub read_gcno_string(*$); ! sub read_gcno_lines_record(*$$$$$$); sub determine_gcno_split_crc($$$); ! sub read_gcno_function_record(*$$$$); ! sub read_gcno($); sub get_gcov_capabilities(); sub get_overall_line($$$$); *************** *** 249,252 **** --- 249,253 ---- our $func_coverage = 1; our $br_coverage = 0; + our $rc_auto_base = 1; our $cwd = `pwd`; *************** *** 300,303 **** --- 301,305 ---- "geninfo_compat" => \$opt_compat, "geninfo_adjust_src_path" => \$rc_adjust_src_path, + "geninfo_auto_base" => \$rc_auto_base, "lcov_function_coverage" => \$func_coverage, "lcov_branch_coverage" => \$br_coverage, *************** *** 936,951 **** if (is_compat($COMPAT_MODE_HAMMER)) { ! ($instr, $graph) = read_bbg($bb_filename, $base_dir); } else { ! ($instr, $graph) = read_bb($bb_filename, $base_dir); } } else { ! ($instr, $graph) = read_gcno($bb_filename, $base_dir); } # Set $object_dir to real location of object files. This may differ # from $da_dir if the graph file is just a link to the "real" object --- 938,960 ---- if (is_compat($COMPAT_MODE_HAMMER)) { ! ($instr, $graph) = read_bbg($bb_filename); } else { ! ($instr, $graph) = read_bb($bb_filename); } } else { ! ($instr, $graph) = read_gcno($bb_filename); } + # Try to find base directory automatically if requested by user + if ($rc_auto_base) { + $base_dir = find_base_from_graph($base_dir, $instr, $graph); + } + + ($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph); + # Set $object_dir to real location of object files. This may differ # from $da_dir if the graph file is just a link to the "real" object *************** *** 976,979 **** --- 985,989 ---- # Change to directory containing data files and apply GCOV + debug("chdir($base_dir)\n"); chdir($base_dir); *************** *** 2222,2237 **** if (is_compat($COMPAT_MODE_HAMMER)) { ! ($instr, $graph) = read_bbg($graph_filename, $base_dir); } else { ! ($instr, $graph) = read_bb($graph_filename, $base_dir); } } else { ! ($instr, $graph) = read_gcno($graph_filename, $base_dir); } if (!$no_markers) { # Apply exclusion marker data to graph file data --- 2232,2254 ---- if (is_compat($COMPAT_MODE_HAMMER)) { ! ($instr, $graph) = read_bbg($graph_filename); } else { ! ($instr, $graph) = read_bb($graph_filename); } } else { ! ($instr, $graph) = read_gcno($graph_filename); } + # Try to find base directory automatically if requested by user + if ($rc_auto_base) { + $base_dir = find_base_from_graph($base_dir, $instr, $graph); + } + + ($instr, $graph) = adjust_graph_filenames($base_dir, $instr, $graph); + if (!$no_markers) { # Apply exclusion marker data to graph file data *************** *** 2480,2501 **** # ! # adjust_graph_filenames(instr, graph) # ! # Apply geninfo_adjust_src_path setting to graph file data. # ! sub adjust_graph_filenames($$) { ! my ($instr, $graph) = @_; ! return ($instr, $graph) if (!defined($adjust_src_pattern)); foreach my $filename (keys(%{$instr})) { my $old_filename = $filename; ! next if ($filename !~ ! s/$adjust_src_pattern/$adjust_src_replace/g); ! $instr->{$filename} = delete($instr->{$old_filename}); } --- 2497,2604 ---- # ! # parent_dir(dir) # ! # Return parent directory for DIR. DIR must not contain relative path ! # components. # ! sub parent_dir($) { ! my ($dir) = @_; ! my ($v, $d, $f) = splitpath($dir, 1); ! my @dirs = splitdir($d); ! pop(@dirs); ! ! return catpath($v, catdir(@dirs), $f); ! } ! ! # ! # find_base_from_graph(base_dir, instr, graph) ! # ! # Try to determine the base directory of the graph file specified by INSTR ! # and GRAPH. The base directory is the base for all relative filenames in ! # the graph file. It is defined by the current working directory at time ! # of compiling the source file. ! # ! # This function implements a heuristic which relies on the following ! # assumptions: ! # - all files used for compilation are still present at their location ! # - the base directory is either BASE_DIR or one of its parent directories ! # - files by the same name are not present in multiple parent directories ! # ! ! sub find_base_from_graph($$$) ! { ! my ($base_dir, $instr, $graph) = @_; ! my $old_base; ! my $best_miss; ! my $best_base; ! my %rel_files; ! ! # Determine list of relative paths ! foreach my $filename (keys(%{$instr}), keys(%{$graph})) { ! next if (file_name_is_absolute($filename)); ! ! $rel_files{$filename} = 1; ! } ! ! # Early exit if there are no relative paths ! return $base_dir if (!%rel_files); ! ! do { ! my $miss = 0; ! ! foreach my $filename (keys(%rel_files)) { ! if (!-e solve_relative_path($base_dir, $filename)) { ! $miss++; ! } ! } ! ! debug("base_dir=$base_dir miss=$miss\n"); ! ! # Exit if we find an exact match with no misses ! return $base_dir if ($miss == 0); ! ! # No exact match, aim for the one with the least source file ! # misses ! if (!defined($best_base) || $miss < $best_miss) { ! $best_base = $base_dir; ! $best_miss = $miss; ! } ! ! # Repeat until there's no more parent directory ! $old_base = $base_dir; ! $base_dir = parent_dir($base_dir); ! } while ($old_base ne $base_dir); ! ! return $best_base; ! } ! ! # ! # adjust_graph_filenames(base_dir, instr, graph) ! # ! # Make relative paths in INSTR and GRAPH absolute and apply ! # geninfo_adjust_src_path setting to graph file data. ! # ! ! sub adjust_graph_filenames($$$) ! { ! my ($base_dir, $instr, $graph) = @_; foreach my $filename (keys(%{$instr})) { my $old_filename = $filename; ! # Convert to absolute canonical form ! $filename = solve_relative_path($base_dir, $filename); ! # Apply adjustment ! if (defined($adjust_src_pattern)) { ! $filename =~ s/$adjust_src_pattern/$adjust_src_replace/g; ! } ! ! if ($filename ne $old_filename) { ! $instr->{$filename} = delete($instr->{$old_filename}); ! } } *************** *** 2503,2510 **** my $old_filename = $filename; ! next if ($filename !~ ! s/$adjust_src_pattern/$adjust_src_replace/g); ! $graph->{$filename} = delete($graph->{$old_filename}); } --- 2606,2621 ---- my $old_filename = $filename; ! # Make absolute ! # Convert to absolute canonical form ! $filename = solve_relative_path($base_dir, $filename); ! # Apply adjustment ! if (defined($adjust_src_pattern)) { ! $filename =~ s/$adjust_src_pattern/$adjust_src_replace/g; ! } ! ! if ($filename ne $old_filename) { ! $graph->{$filename} = delete($graph->{$old_filename}); ! } } *************** *** 2741,2745 **** # ! # read_bb(filename, base_dir) # # Read the contents of the specified .bb file and return (instr, graph), where: --- 2852,2856 ---- # ! # read_bb(filename) # # Read the contents of the specified .bb file and return (instr, graph), where: *************** *** 2752,2763 **** # line_data : [ line1, line2, ... ] # ! # Relative filenames are converted to absolute form using base_dir as ! # base directory. See the gcov info pages of gcc 2.95 for a description of ! # the .bb file format. # ! sub read_bb($$) { ! my ($bb_filename, $base) = @_; my $minus_one = 0x80000001; my $minus_two = 0x80000002; --- 2863,2872 ---- # line_data : [ line1, line2, ... ] # ! # See the gcov info pages of gcc 2.95 for a description of the .bb file format. # ! sub read_bb($) { ! my ($bb_filename) = @_; my $minus_one = 0x80000001; my $minus_two = 0x80000002; *************** *** 2781,2788 **** $filename = read_bb_string(*HANDLE, $minus_one); goto incomplete if (!defined($filename)); - if ($filename ne "") { - $filename = solve_relative_path($base, - $filename); - } } elsif ($value == $minus_two) { # Function name --- 2890,2893 ---- *************** *** 2805,2809 **** graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: --- 2910,2914 ---- graph_cleanup($graph); ! return ($instr, $graph); open_error: *************** *** 2875,2879 **** # # read_bbg_lines_record(handle, bbg_filename, bb, fileorder, filename, ! # function, base) # # Read a bbg format lines record from handle and add the relevant data to --- 2980,2984 ---- # # read_bbg_lines_record(handle, bbg_filename, bb, fileorder, filename, ! # function) # # Read a bbg format lines record from handle and add the relevant data to *************** *** 2881,2888 **** # ! sub read_bbg_lines_record(*$$$$$$) { ! my ($handle, $bbg_filename, $bb, $fileorder, $filename, $function, ! $base) = @_; my $string; my $lineno; --- 2986,2992 ---- # ! sub read_bbg_lines_record(*$$$$$) { ! my ($handle, $bbg_filename, $bb, $fileorder, $filename, $function) = @_; my $string; my $lineno; *************** *** 2904,2908 **** return $filename; } ! $filename = solve_relative_path($base, $string); if (!exists($bb->{$function}->{$filename})) { $bb->{$function}->{$filename} = []; --- 3008,3012 ---- return $filename; } ! $filename = $string; if (!exists($bb->{$function}->{$filename})) { $bb->{$function}->{$filename} = []; *************** *** 2922,2926 **** # ! # read_bbg(filename, base_dir) # # Read the contents of the specified .bbg file and return the following mapping: --- 3026,3030 ---- # ! # read_bbg(filename) # # Read the contents of the specified .bbg file and return the following mapping: *************** *** 2929,2940 **** # line_data: [ line1, line2, ... ] # ! # Relative filenames are converted to absolute form using base_dir as ! # base directory. See the gcov-io.h file in the SLES 9 gcc 3.3.3 source code ! # for a description of the .bbg format. # ! sub read_bbg($$) { ! my ($bbg_filename, $base) = @_; my $file_magic = 0x67626267; my $tag_function = 0x01000000; --- 3033,3043 ---- # line_data: [ line1, line2, ... ] # ! # See the gcov-io.h file in the SLES 9 gcc 3.3.3 source code for a description ! # of the .bbg format. # ! sub read_bbg($) { ! my ($bbg_filename) = @_; my $file_magic = 0x67626267; my $tag_function = 0x01000000; *************** *** 2983,2987 **** $filename = read_bbg_lines_record(HANDLE, $bbg_filename, $bb, $fileorder, $filename, ! $function, $base); goto incomplete if (!defined($filename)); } else { --- 3086,3090 ---- $filename = read_bbg_lines_record(HANDLE, $bbg_filename, $bb, $fileorder, $filename, ! $function); goto incomplete if (!defined($filename)); } else { *************** *** 2995,2999 **** graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: --- 3098,3102 ---- graph_cleanup($graph); ! return ($instr, $graph); open_error: *************** *** 3074,3078 **** # # read_gcno_lines_record(handle, gcno_filename, bb, fileorder, filename, ! # function, base, big_endian) # # Read a gcno format lines record from handle and add the relevant data to --- 3177,3181 ---- # # read_gcno_lines_record(handle, gcno_filename, bb, fileorder, filename, ! # function, big_endian) # # Read a gcno format lines record from handle and add the relevant data to *************** *** 3080,3087 **** # ! sub read_gcno_lines_record(*$$$$$$$) { my ($handle, $gcno_filename, $bb, $fileorder, $filename, $function, ! $base, $big_endian) = @_; my $string; my $lineno; --- 3183,3190 ---- # ! sub read_gcno_lines_record(*$$$$$$) { my ($handle, $gcno_filename, $bb, $fileorder, $filename, $function, ! $big_endian) = @_; my $string; my $lineno; *************** *** 3103,3107 **** return $filename; } ! $filename = solve_relative_path($base, $string); if (!exists($bb->{$function}->{$filename})) { $bb->{$function}->{$filename} = []; --- 3206,3210 ---- return $filename; } ! $filename = $string; if (!exists($bb->{$function}->{$filename})) { $bb->{$function}->{$filename} = []; *************** *** 3167,3171 **** # ! # read_gcno_function_record(handle, graph, base, big_endian, rec_length) # # Read a gcno format function record from handle and add the relevant data --- 3270,3274 ---- # ! # read_gcno_function_record(handle, graph, big_endian, rec_length) # # Read a gcno format function record from handle and add the relevant data *************** *** 3173,3179 **** # ! sub read_gcno_function_record(*$$$$$) { ! my ($handle, $bb, $fileorder, $base, $big_endian, $rec_length) = @_; my $filename; my $function; --- 3276,3282 ---- # ! sub read_gcno_function_record(*$$$$) { ! my ($handle, $bb, $fileorder, $big_endian, $rec_length) = @_; my $filename; my $function; *************** *** 3200,3204 **** $filename = read_gcno_string($handle, $big_endian); return undef if (!defined($filename)); - $filename = solve_relative_path($base, $filename); # Read first line number $lineno = read_gcno_value($handle, $big_endian, "initial line number"); --- 3303,3306 ---- *************** *** 3212,3216 **** # ! # read_gcno(filename, base_dir) # # Read the contents of the specified .gcno file and return the following --- 3314,3318 ---- # ! # read_gcno(filename) # # Read the contents of the specified .gcno file and return the following *************** *** 3220,3231 **** # line_data: [ line1, line2, ... ] # ! # Relative filenames are converted to absolute form using base_dir as ! # base directory. See the gcov-io.h file in the gcc 3.3 source code ! # for a description of the .gcno format. # ! sub read_gcno($$) { ! my ($gcno_filename, $base) = @_; my $file_magic = 0x67636e6f; my $tag_function = 0x01000000; --- 3322,3332 ---- # line_data: [ line1, line2, ... ] # ! # See the gcov-io.h file in the gcc 3.3 source code for a description of ! # the .gcno format. # ! sub read_gcno($) { ! my ($gcno_filename) = @_; my $file_magic = 0x67636e6f; my $tag_function = 0x01000000; *************** *** 3278,3282 **** if ($tag == $tag_function) { ($filename, $function) = read_gcno_function_record( ! *HANDLE, $bb, $fileorder, $base, $big_endian, $length); goto incomplete if (!defined($function)); --- 3379,3383 ---- if ($tag == $tag_function) { ($filename, $function) = read_gcno_function_record( ! *HANDLE, $bb, $fileorder, $big_endian, $length); goto incomplete if (!defined($function)); *************** *** 3285,3289 **** $filename = read_gcno_lines_record(*HANDLE, $gcno_filename, $bb, $fileorder, ! $filename, $function, $base, $big_endian); goto incomplete if (!defined($filename)); --- 3386,3390 ---- $filename = read_gcno_lines_record(*HANDLE, $gcno_filename, $bb, $fileorder, ! $filename, $function, $big_endian); goto incomplete if (!defined($filename)); *************** *** 3306,3310 **** graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: --- 3407,3411 ---- graph_cleanup($graph); ! return ($instr, $graph); open_error: |
From: Peter O. <obe...@us...> - 2012-10-08 15:03:25
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv17728 Modified Files: geninfo Log Message: geninfo: fix missing line data after last commit Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** geninfo 8 Oct 2012 13:02:45 -0000 1.113 --- geninfo 8 Oct 2012 15:03:23 -0000 1.114 *************** *** 2681,2684 **** --- 2681,2685 ---- $fileorder->{$function} = $list; } + # # read_bb_word(handle[, description]) *************** *** 2904,2907 **** --- 2905,2911 ---- } $filename = solve_relative_path($base, $string); + if (!exists($bb->{$function}->{$filename})) { + $bb->{$function}->{$filename} = []; + } next; } *************** *** 3100,3104 **** } $filename = solve_relative_path($base, $string); ! $bb->{$function}->{$filename} = []; next; } --- 3104,3110 ---- } $filename = solve_relative_path($base, $string); ! if (!exists($bb->{$function}->{$filename})) { ! $bb->{$function}->{$filename} = []; ! } next; } |
From: Peter O. <obe...@us...> - 2012-10-08 13:02:48
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv7916/bin Modified Files: genhtml geninfo lcov Log Message: lcov: add missing help text for option --rc Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** geninfo 5 Oct 2012 15:53:09 -0000 1.112 --- geninfo 8 Oct 2012 13:02:45 -0000 1.113 *************** *** 584,587 **** --- 584,588 ---- --(no-)external Include (ignore) data for external files --config-file FILENAME Specify configuration file location + --rc SETTING=VALUE Override configuration file setting --compat MODE=on|off|auto Set compat MODE (libtool, hammer, split_crc) Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** genhtml 5 Oct 2012 15:53:09 -0000 1.66 --- genhtml 8 Oct 2012 13:02:45 -0000 1.67 *************** *** 577,580 **** --- 577,581 ---- -q, --quiet Do not print progress messages --config-file FILENAME Specify configuration file location + --rc SETTING=VALUE Override configuration file setting --ignore-errors ERRORS Continue after ERRORS (source) Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** lcov 5 Oct 2012 15:53:09 -0000 1.90 --- lcov 8 Oct 2012 13:02:45 -0000 1.91 *************** *** 534,537 **** --- 534,538 ---- --(no-)external Include (ignore) data for external files --config-file FILENAME Specify configuration file location + --rc SETTING=VALUE Override configuration file setting --compat MODE=on|off|auto Set compat MODE (libtool, hammer, split_crc) |
From: Peter O. <obe...@us...> - 2012-10-05 15:53:11
|
Update of /cvsroot/ltp/utils/analysis/lcov In directory vz-cvs-4.sog:/tmp/cvs-serv17443 Modified Files: CHANGES Log Message: lcov: updated CHANGES file and copyright years Index: CHANGES =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/CHANGES,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** CHANGES 5 Aug 2010 16:17:44 -0000 1.24 --- CHANGES 5 Oct 2012 15:53:09 -0000 1.25 *************** *** 1,2 **** --- 1,71 ---- + Version 1.10 + ============ + + All: + - Disabled branch coverage processing per default to improve processing + performance (can be re-enabled using a config file setting) + - Added option --rc to override config file settings from the command line + - Added option --config-file to override the config file location + - Fixed handling of '<' in filenames + + genhtml: + - Added option --ignore-errors to continue after errors + - Added man page note to further explain branch coverage output + - Fixed man page description of default coverage rates + - Fixed HTML page title for directory pages + - Fixed handling of special characters in file and directory names + - Fixed directory prefix calculation + + geninfo: + - Added options --external and --no-external to include/exclude external + source files such as standard libary headers + - Added option --compat to specify compatibility modes + - Added missing man page sections for --derive-func-data and --no-markers + - Added support for MinGW output on MSYS. From mar...@ss... + - Added support for gcc 4.7 .gcno file format. Based on patch by + ber...@re... + - Added auto-detection of gcc-4.7 function record format. Includes + suggestions by ga...@go... + - Fixed exclusion markers for --derive-func-data. Reported by be...@gm... + - Fixed processing of pre-3.3 gcov files. Reported by geo...@gm... + - Fixed handling of '<built-in>.gcov' files + - Fixed warning about unhandled .gcov files + - Improved --debug output + - Removed help text for obsolete parameter --function-coverage + + genpng: + - Fixed handling of empty source files. Reported by: syl...@de... + + lcov: + - Added options --external and --no-external to include/exclude external source + files such as standard libary headers + - Added option --summary to show summary coverage information + - Added option --compat to specify compatibility modes + - Fixed missing Perl version dependency in RPM spec file. Reported by + Martin Hopfeld <mar...@ss...> + - Fixed geninfo not recognizing Objective-C functions. Based on patch + by abr...@we... + - Fixed option --no-recursion not being passed to geninfo + - Fixed capitalization of the term 'Perl' + - Improved coverage rate calculation to only show 0%/100% when no/full coverage + is achieved. Based on suggestions by Pau...@lo... and + vi...@vi... + + lcovrc: + - Added description for geninfo_compat setting + - Added config file setting 'genhtml_charset' to specify HTML charset + - Added config file setting 'geninfo_external' to include/exclude external + source files such as standard libary headers + - Added config file setting 'geninfo_gcov_all_blocks' to modify lcov's use + of gcov's -a option + - Added config file setting 'geninfo_compat' to specify compatibility modes + - Added config file setting 'geninfo_adjust_src_path' to enabled source path + adjustments. Inspired by patch by amm...@gm... + - Added config file setting 'lcov_function_coverage' to enable/disable + function coverage processing + - Added config file setting 'lcov_branch_coverage' to enable/disable + branch coverage processing + + Version 1.9 =========== |
From: Peter O. <obe...@us...> - 2012-10-05 15:20:43
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv14031/bin Modified Files: geninfo Log Message: geninfo: fix warning about unhandled .gcov files gcov will sometimes create .gcov files that contain no instrumented line. When geninfo reads .gcno files it filters out such files, resulting in the following warning: geninfo: WARNING: cannot find an entry for #path#to#file.gcov in .gcno file, skipping file! Avoid this warning by not filtering out non-instrumented lines. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** geninfo 5 Oct 2012 12:00:57 -0000 1.110 --- geninfo 5 Oct 2012 15:20:41 -0000 1.111 *************** *** 2172,2181 **** # Store modified list ! if (scalar(@new_data) > 0) { ! $instr->{$filename} = \@new_data; ! } else { ! # All of this file was excluded ! delete($instr->{$filename}); ! } } --- 2172,2176 ---- # Store modified list ! $instr->{$filename} = \@new_data; } *************** *** 3104,3107 **** --- 3099,3103 ---- } $filename = solve_relative_path($base, $string); + $bb->{$function}->{$filename} = []; next; } |
From: Peter O. <obe...@us...> - 2012-10-05 15:10:01
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv13595/bin Modified Files: genhtml Log Message: genhtml: fix source path prefix calculation Fix the following problems of the algorithm used to identify an optimal source path prefix: - the last two path components (filename and first parent directory) are ignored when trying to identify the optimal prefix - if a path prefix matches a longer path prefix, the weight of the filenames associated with the latter is incorrectly attributed to the former Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** genhtml 5 Oct 2012 12:00:57 -0000 1.64 --- genhtml 5 Oct 2012 15:09:58 -0000 1.65 *************** *** 172,176 **** sub get_info_entry($); sub set_info_entry($$$$$$$$$;$$$$$$); ! sub get_prefix(@); sub shorten_prefix($); sub get_dir_list(@); --- 172,176 ---- sub get_info_entry($); sub set_info_entry($$$$$$$$$;$$$$$$); ! sub get_prefix($@); sub shorten_prefix($); sub get_dir_list(@); *************** *** 740,744 **** { # Get prefix common to most directories in list ! $dir_prefix = get_prefix(@dir_list); if ($dir_prefix) --- 740,744 ---- { # Get prefix common to most directories in list ! $dir_prefix = get_prefix(1, keys(%info_data)); if ($dir_prefix) *************** *** 2151,2164 **** # ! # get_prefix(filename_list) # # Search FILENAME_LIST for a directory prefix which is common to as many # list entries as possible, so that removing this prefix will minimize the ! # sum of the lengths of all resulting shortened filenames. # ! sub get_prefix(@) { ! my @filename_list = @_; # provided list of filenames my %prefix; # mapping: prefix -> sum of lengths my $current; # Temporary iteration variable --- 2151,2165 ---- # ! # get_prefix(min_dir, filename_list) # # Search FILENAME_LIST for a directory prefix which is common to as many # list entries as possible, so that removing this prefix will minimize the ! # sum of the lengths of all resulting shortened filenames while observing ! # that no filename has less than MIN_DIR parent directories. # ! sub get_prefix($@) { ! my ($min_dir, @filename_list) = @_; my %prefix; # mapping: prefix -> sum of lengths my $current; # Temporary iteration variable *************** *** 2169,2178 **** # Need explicit assignment to get a copy of $_ so that # shortening the contained prefix does not affect the list ! $current = shorten_prefix($_); while ($current = shorten_prefix($current)) { # Skip rest if the remaining prefix has already been # added to hash ! if ($prefix{$current}) { last; } # Initialize with 0 --- 2170,2181 ---- # Need explicit assignment to get a copy of $_ so that # shortening the contained prefix does not affect the list ! $current = $_; while ($current = shorten_prefix($current)) { + $current .= "/"; + # Skip rest if the remaining prefix has already been # added to hash ! if (exists($prefix{$current})) { last; } # Initialize with 0 *************** *** 2182,2185 **** --- 2185,2199 ---- } + # Remove all prefixes that would cause filenames to have less than + # the minimum number of parent directories + foreach my $filename (@filename_list) { + my $dir = dirname($filename); + + for (my $i = 0; $i < $min_dir; $i++) { + delete($prefix{$dir."/"}); + $dir = shorten_prefix($dir); + } + } + # Calculate sum of lengths for all prefixes foreach $current (keys(%prefix)) *************** *** 2210,2213 **** --- 2224,2229 ---- } + $current =~ s/\/$//; + return($current); } |
From: Peter O. <obe...@us...> - 2012-10-05 12:00:59
|
Update of /cvsroot/ltp/utils/analysis/lcov In directory vz-cvs-4.sog:/tmp/cvs-serv27977 Modified Files: lcovrc Log Message: lcov: set default for branch coverage data to disabled Collecting branch coverage data can significantly slow down coverage data collection and processing of data files. Assuming that most users are more interested in line/function coverage, change defaults to not collect/process branch coverage data. Users can still override this default using lcov_branch_coverage=1 in the lcovrc file or command line option --rc lcov_branch_coverage=1 Index: lcovrc =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/lcovrc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lcovrc 5 Oct 2012 08:23:06 -0000 1.19 --- lcovrc 5 Oct 2012 12:00:57 -0000 1.20 *************** *** 151,153 **** # Specify if branch coverage data should be collected and processed. ! lcov_branch_coverage = 1 --- 151,153 ---- # Specify if branch coverage data should be collected and processed. ! lcov_branch_coverage = 0 |
From: Peter O. <obe...@us...> - 2012-10-05 11:49:32
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv26619/bin Modified Files: geninfo Log Message: geninfo: fix problems with adjust_src_path option Fix the following problems with adjust_src_path: * specifying --compat libtool=on and geninfo_adjust_src_path unexpectedly sets --compat libtool=off * path components that are assembled from sub-directory names are not correctly adjusted Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** geninfo 5 Oct 2012 08:23:06 -0000 1.108 --- geninfo 5 Oct 2012 11:49:30 -0000 1.109 *************** *** 875,888 **** ($da_dir, $da_basename) = split_filename($da_filename); ! if (defined($adjust_src_pattern)) { ! # Apply transformation as specified by user ! $source_dir = $da_dir; ! $source_dir =~ s/$adjust_src_pattern/$adjust_src_replace/g; ! } elsif (is_compat($COMPAT_MODE_LIBTOOL) && ! $da_dir =~ m/(.*)\/\.libs$/) { # Avoid files from .libs dirs ! $source_dir = $1; ! } else { ! $source_dir = $da_dir; } --- 875,882 ---- ($da_dir, $da_basename) = split_filename($da_filename); ! $source_dir = $da_dir; ! if (is_compat($COMPAT_MODE_LIBTOOL)) { # Avoid files from .libs dirs ! $source_dir =~ s/\.libs$//; } *************** *** 1073,1076 **** --- 1067,1075 ---- $source = solve_relative_path($base_dir, $source); + if (defined($adjust_src_pattern)) { + # Apply transformation as specified by user + $source =~ s/$adjust_src_pattern/$adjust_src_replace/g; + } + # gcov will happily create output even if there's no source code # available - this interferes with checksum creation so we need *************** *** 2207,2220 **** ($graph_dir, $graph_basename) = split_filename($graph_filename); ! if (defined($adjust_src_pattern)) { ! # Apply transformation as specified by user ! $source_dir = $graph_dir; ! $source_dir =~ s/$adjust_src_pattern/$adjust_src_replace/g; ! } elsif (is_compat($COMPAT_MODE_LIBTOOL) && ! $graph_dir =~ m/(.*)\/\.libs$/) { # Avoid files from .libs dirs ! $source_dir = $1; ! } else { ! $source_dir = $graph_dir; } --- 2206,2213 ---- ($graph_dir, $graph_basename) = split_filename($graph_filename); ! $source_dir = $graph_dir; ! if (is_compat($COMPAT_MODE_LIBTOOL)) { # Avoid files from .libs dirs ! $source_dir =~ s/\.libs$//; } *************** *** 2491,2494 **** --- 2484,2520 ---- # + # adjust_graph_filenames(instr, graph) + # + # Apply geninfo_adjust_src_path setting to graph file data. + # + + sub adjust_graph_filenames($$) + { + my ($instr, $graph) = @_; + + return ($instr, $graph) if (!defined($adjust_src_pattern)); + + foreach my $filename (keys(%{$instr})) { + my $old_filename = $filename; + + next if ($filename !~ + s/$adjust_src_pattern/$adjust_src_replace/g); + + $instr->{$filename} = delete($instr->{$old_filename}); + } + + foreach my $filename (keys(%{$graph})) { + my $old_filename = $filename; + + next if ($filename !~ + s/$adjust_src_pattern/$adjust_src_replace/g); + + $graph->{$filename} = delete($graph->{$old_filename}); + } + + return ($instr, $graph); + } + + # # graph_cleanup(graph) # *************** *** 2782,2786 **** graph_cleanup($graph); ! return ($instr, $graph); open_error: --- 2808,2812 ---- graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: *************** *** 2969,2973 **** graph_cleanup($graph); ! return ($instr, $graph); open_error: --- 2995,2999 ---- graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: *************** *** 3277,3281 **** graph_cleanup($graph); ! return ($instr, $graph); open_error: --- 3303,3307 ---- graph_cleanup($graph); ! return adjust_graph_filenames($instr, $graph); open_error: |
From: Peter O. <obe...@us...> - 2012-10-05 08:23:08
|
Update of /cvsroot/ltp/utils/analysis/lcov/man In directory vz-cvs-4.sog:/tmp/cvs-serv4001/man Modified Files: lcovrc.5 Log Message: lcov: add setting to disable function and branch coverage Add two new configuration file settings: * lcov_function_coverage and * lcov_branch_coverage When set to zero, lcov will skip the corresponding coverage data type from being collected or processed, resulting in reduced memory and CPU time consumption and smaller data files. Index: lcovrc.5 =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/man/lcovrc.5,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** lcovrc.5 2 Oct 2012 14:29:57 -0000 1.21 --- lcovrc.5 5 Oct 2012 08:23:06 -0000 1.22 *************** *** 137,146 **** # Include function coverage data display .br ! genhtml_function_coverage = 1 .br # Include branch coverage data display .br ! genhtml_branch_coverage = 1 .br --- 137,146 ---- # Include function coverage data display .br ! #genhtml_function_coverage = 1 .br # Include branch coverage data display .br ! #genhtml_branch_coverage = 1 .br *************** *** 227,230 **** --- 227,243 ---- lcov_list_truncate_max = 20 + # Specify if function coverage data should be collected and + .br + # processed. + .br + lcov_function_coverage = 1 + .br + + # Specify if branch coverage data should be collected and + .br + # processed. + .br + lcov_branch_coverage = 1 + .br .PP *************** *** 733,736 **** --- 746,781 ---- .PP + .BR lcov_function_coverage " =" + .IR 0 | 1 + .IP + Specify whether lcov should handle function coverage data. + .br + + Setting this option to 0 can reduce memory and CPU time consumption + when lcov is collecting and processing coverage data, as well as + reduce the size of the resulting data files. Note that setting + .B genhtml_function_coverage + will override this option for HTML generation. + .br + + Default is 1. + .PP + + .BR lcov_branch_coverage " =" + .IR 0 | 1 + .IP + Specify whether lcov should handle branch coverage data. + .br + + Setting this option to 0 can reduce memory and CPU time consumption + when lcov is collecting and processing coverage data, as well as + reduce the size of the resulting data files. Note that setting + .B genhtml_branch_coverage + will override this option for HTML generation. + .br + + Default is 1. + .PP + .SH FILES |
From: Peter O. <obe...@us...> - 2012-10-02 14:29:59
|
Update of /cvsroot/ltp/utils/analysis/lcov/man In directory vz-cvs-4.sog:/tmp/cvs-serv29909/man Modified Files: lcovrc.5 Log Message: lcovrc: clarify meaning of geninfo_external in man page Index: lcovrc.5 =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/man/lcovrc.5,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** lcovrc.5 24 Jul 2012 15:41:38 -0000 1.20 --- lcovrc.5 2 Oct 2012 14:29:57 -0000 1.21 *************** *** 587,590 **** --- 587,591 ---- External source files are files which are not located in one of the directories + (including sub-directories) specified by the \-\-directory or \-\-base\-directory options of .BR lcov / geninfo . |
From: Peter O. <obe...@us...> - 2012-10-02 09:12:40
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv28557 Modified Files: geninfo Log Message: geninfo: fix processing of pre-3.3 gcov files When trying to collect coverage data for programs compiled with GCC versions prior to 3.3, geninfo skips each data file with the following warning: geninfo: WARNING: cannot find an entry for test.c.gcov in .bb file, skipping file! Fix this by deriving the source code filename from the gcov filename in case the gcov files do not follow the GCC 3.3 format. Reported-by: geo...@gm... Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** geninfo 24 Aug 2012 11:43:18 -0000 1.106 --- geninfo 2 Oct 2012 09:12:38 -0000 1.107 *************** *** 1058,1070 **** ($source, $object) = read_gcov_header($gcov_file); ! if (defined($source)) ! { ! $source = solve_relative_path($base_dir, $source); } # gcov will happily create output even if there's no source code # available - this interferes with checksum creation so we need # to pull the emergency brake here. ! if (defined($source) && ! -r $source && $checksum) { if ($ignore[$ERROR_SOURCE]) --- 1058,1074 ---- ($source, $object) = read_gcov_header($gcov_file); ! if (!defined($source)) { ! # Derive source file name from gcov file name if ! # header format could not be parsed ! $source = $gcov_file; ! $source =~ s/\.gcov$//; } + $source = solve_relative_path($base_dir, $source); + # gcov will happily create output even if there's no source code # available - this interferes with checksum creation so we need # to pull the emergency brake here. ! if (! -r $source && $checksum) { if ($ignore[$ERROR_SOURCE]) *************** *** 1077,1082 **** } ! @matches = match_filename(defined($source) ? $source : ! $gcov_file, keys(%{$instr})); # Skip files that are not mentioned in the graph file --- 1081,1085 ---- } ! @matches = match_filename($source, keys(%{$instr})); # Skip files that are not mentioned in the graph file |
From: Peter O. <obe...@us...> - 2012-08-24 11:43:21
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv1698 Modified Files: genhtml geninfo lcov Log Message: lcov: fix problems with --rc option Fix error "Invalid option linkage for \"rc=s%\"" when running lcov with an older version of the Getopt::Long module. Also pass --rc options through lcov to geninfo. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** geninfo 24 Jul 2012 15:41:38 -0000 1.105 --- geninfo 24 Aug 2012 11:43:18 -0000 1.106 *************** *** 244,248 **** our $opt_gcov_all_blocks = 1; our $opt_compat; ! our $opt_rc; our %compat_value; our $gcno_split_crc; --- 244,248 ---- our $opt_gcov_all_blocks = 1; our $opt_compat; ! our %opt_rc; our %compat_value; our $gcno_split_crc; *************** *** 270,274 **** Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); --- 270,274 ---- Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc); Getopt::Long::Configure("default"); *************** *** 285,289 **** } ! if ($config || $opt_rc) { # Copy configuration file and --rc values to variables --- 285,289 ---- } ! if ($config || %opt_rc) { # Copy configuration file and --rc values to variables *************** *** 352,356 **** "compat=s" => \$opt_compat, "config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc, )) { --- 352,356 ---- "compat=s" => \$opt_compat, "config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc, )) { *************** *** 2011,2016 **** foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; --- 2011,2016 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc{$_})) { ! ${$ref->{$_}} = $opt_rc{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** genhtml 19 Jul 2012 13:12:35 -0000 1.61 --- genhtml 24 Aug 2012 11:43:18 -0000 1.62 *************** *** 291,295 **** our @ignore; our $opt_config_file; # User-specified configuration file location ! our $opt_rc; our $charset = "UTF-8"; # Default charset for HTML pages our @fileview_sortlist; --- 291,295 ---- our @ignore; our $opt_config_file; # User-specified configuration file location ! our %opt_rc; our $charset = "UTF-8"; # Default charset for HTML pages our @fileview_sortlist; *************** *** 323,327 **** Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); --- 323,327 ---- Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc); Getopt::Long::Configure("default"); *************** *** 338,342 **** } ! if ($config || $opt_rc) { # Copy configuration file and --rc values to variables --- 338,342 ---- } ! if ($config || %opt_rc) { # Copy configuration file and --rc values to variables *************** *** 408,412 **** "ignore-errors=s" => \@opt_ignore_errors, "config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc, )) { --- 408,412 ---- "ignore-errors=s" => \@opt_ignore_errors, "config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc, )) { *************** *** 5586,5591 **** foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; --- 5586,5591 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc{$_})) { ! ${$ref->{$_}} = $opt_rc{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** lcov 19 Jul 2012 13:12:35 -0000 1.86 --- lcov 24 Aug 2012 11:43:18 -0000 1.87 *************** *** 192,196 **** our $opt_no_external; our $opt_config_file; ! our $opt_rc; our @opt_summary; our $opt_compat; --- 192,196 ---- our $opt_no_external; our $opt_config_file; ! our %opt_rc; our @opt_summary; our $opt_compat; *************** *** 224,228 **** Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); --- 224,228 ---- Getopt::Long::Configure("pass_through", "no_auto_abbrev"); GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc); Getopt::Long::Configure("default"); *************** *** 239,243 **** } ! if ($config || $opt_rc) { # Copy configuration file and --rc values to variables --- 239,243 ---- } ! if ($config || %opt_rc) { # Copy configuration file and --rc values to variables *************** *** 291,295 **** "compat=s" => \$opt_compat, "config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc, )) { --- 291,295 ---- "compat=s" => \$opt_compat, "config-file=s" => \$opt_config_file, ! "rc=s%" => \%opt_rc, )) { *************** *** 870,873 **** --- 870,879 ---- @param = (@param, "--compat", $opt_compat); } + if (%opt_rc) { + foreach my $key (keys(%opt_rc)) { + @param = (@param, "--rc", "$key=".$opt_rc{$key}); + } + } + system(@param) and exit($? >> 8); } *************** *** 4083,4088 **** foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; --- 4089,4094 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc{$_})) { ! ${$ref->{$_}} = $opt_rc{$_}; } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; |
From: Peter O. <obe...@us...> - 2012-07-24 15:41:40
|
Update of /cvsroot/ltp/utils/analysis/lcov/man In directory vz-cvs-4.sog:/tmp/cvs-serv9949/man Modified Files: lcovrc.5 Log Message: geninfo: implement rc option geninfo_adjust_src_path Provide a new lcovrc file option geninfo_adjust_src_path that users can use to change incorrect source paths. Inspired by patch by amm...@gm.... Index: lcovrc.5 =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/man/lcovrc.5,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lcovrc.5 18 Jul 2012 12:56:21 -0000 1.19 --- lcovrc.5 24 Jul 2012 15:41:38 -0000 1.20 *************** *** 189,192 **** --- 189,200 ---- .br + # Adjust path to source files by removing or changing path + .br + # components that match the specified pattern (Perl regular + .br + # expression format) + .br + #geninfo_adjust_src_path = /tmp/build => /usr/src + # Directory containing gcov kernel files .br *************** *** 611,614 **** --- 619,681 ---- .PP + .BR geninfo_adjust_src_path " =" + .IR pattern " => " replacement + .br + .BR geninfo_adjust_src_path " =" + .I pattern + .IP + Adjust source paths when capturing coverage data. + + Use this option in situations where geninfo cannot find the correct + path to source code files of a project. By providing a + .I pattern + in Perl regular expression format (see + .BR perlre (1)) + and an optional replacement string, you can instruct geninfo to + remove or change parts of the incorrect source path. + + .B Example: + .br + + 1. When geninfo reports that it cannot find source file + .br + + /path/to/src/.libs/file.c + .br + + while the file is actually located in + .br + + /path/to/src/file.c + .br + + use the following parameter: + .br + + geninfo_adjust_src_path = /.libs + + This will remove all "/.libs" strings from the path. + + 2. When geninfo reports that it cannot find source file + .br + + /tmp/build/file.c + .br + + while the file is actually located in + .br + + /usr/src/file.c + .br + + use the following parameter: + .br + + geninfo_adjust_src_path = /tmp/build => /usr/src + .br + + This will change all "/tmp/build" strings in the path to "/usr/src". + .PP + .BR lcov_gcov_dir " =" .I path_to_kernel_coverage_data |
From: Peter O. <obe...@us...> - 2012-07-19 13:12:38
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory vz-cvs-4.sog:/tmp/cvs-serv17527/bin Modified Files: genhtml geninfo lcov Log Message: lcov: implement command line option --rc Users can now use command line option --rc to override configuration file directives. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** geninfo 18 Jul 2012 12:56:21 -0000 1.103 --- geninfo 19 Jul 2012 13:12:35 -0000 1.104 *************** *** 241,244 **** --- 241,245 ---- our $opt_gcov_all_blocks = 1; our $opt_compat; + our $opt_rc; our %compat_value; our $gcno_split_crc; *************** *** 265,269 **** # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file:s" => \$opt_config_file); Getopt::Long::Configure("default"); --- 266,271 ---- # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); *************** *** 280,286 **** } ! if ($config) { ! # Copy configuration file values to variables apply_config({ "geninfo_gcov_tool" => \$gcov_tool, --- 282,288 ---- } ! if ($config || $opt_rc) { ! # Copy configuration file and --rc values to variables apply_config({ "geninfo_gcov_tool" => \$gcov_tool, *************** *** 324,327 **** --- 326,331 ---- "no-external" => \$opt_no_external, "compat=s" => \$opt_compat, + "config-file=s" => \$opt_config_file, + "rc=s%" => \$opt_rc, )) { *************** *** 1967,1972 **** # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hash CONFIG contains a value for ! # keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # --- 1971,1976 ---- # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hashes CONFIG or OPT_RC contain a value ! # for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # *************** *** 1977,1982 **** foreach (keys(%{$ref})) { ! if (defined($config->{$_})) ! { ${$ref->{$_}} = $config->{$_}; } --- 1981,1987 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; ! } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; } Index: genhtml =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/genhtml,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** genhtml 18 Jul 2012 10:40:12 -0000 1.60 --- genhtml 19 Jul 2012 13:12:35 -0000 1.61 *************** *** 291,294 **** --- 291,295 ---- our @ignore; our $opt_config_file; # User-specified configuration file location + our $opt_rc; our $charset = "UTF-8"; # Default charset for HTML pages our @fileview_sortlist; *************** *** 321,325 **** # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file:s" => \$opt_config_file); Getopt::Long::Configure("default"); --- 322,327 ---- # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); *************** *** 336,342 **** } ! if ($config) { ! # Copy configuration file values to variables apply_config({ "genhtml_css_file" => \$css_filename, --- 338,344 ---- } ! if ($config || $opt_rc) { ! # Copy configuration file and --rc values to variables apply_config({ "genhtml_css_file" => \$css_filename, *************** *** 405,408 **** --- 407,412 ---- "demangle-cpp" => \$demangle_cpp, "ignore-errors=s" => \@opt_ignore_errors, + "config-file=s" => \$opt_config_file, + "rc=s%" => \$opt_rc, )) { *************** *** 5572,5577 **** # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hash CONFIG contains a value for ! # keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # --- 5576,5581 ---- # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hashes CONFIG or OPT_RC contain a value ! # for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # *************** *** 5582,5587 **** foreach (keys(%{$ref})) { ! if (defined($config->{$_})) ! { ${$ref->{$_}} = $config->{$_}; } --- 5586,5592 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; ! } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; } Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** lcov 18 Jul 2012 10:40:12 -0000 1.85 --- lcov 19 Jul 2012 13:12:35 -0000 1.86 *************** *** 192,195 **** --- 192,196 ---- our $opt_no_external; our $opt_config_file; + our $opt_rc; our @opt_summary; our $opt_compat; *************** *** 222,226 **** # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file:s" => \$opt_config_file); Getopt::Long::Configure("default"); --- 223,228 ---- # Check command line for a configuration file name Getopt::Long::Configure("pass_through", "no_auto_abbrev"); ! GetOptions("config-file=s" => \$opt_config_file, ! "rc=s%" => \$opt_rc); Getopt::Long::Configure("default"); *************** *** 237,243 **** } ! if ($config) { ! # Copy configuration file values to variables apply_config({ "lcov_gcov_dir" => \$gcov_dir, --- 239,245 ---- } ! if ($config || $opt_rc) { ! # Copy configuration file and --rc values to variables apply_config({ "lcov_gcov_dir" => \$gcov_dir, *************** *** 288,291 **** --- 290,295 ---- "summary=s" => \@opt_summary, "compat=s" => \$opt_compat, + "config-file=s" => \$opt_config_file, + "rc=s%" => \$opt_rc, )) { *************** *** 4069,4074 **** # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hash CONFIG contains a value for ! # keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # --- 4073,4078 ---- # # where KEY_STRING is a keyword and VAR_REF is a reference to an associated ! # variable. If the global configuration hashes CONFIG or OPT_RC contain a value ! # for keyword KEY_STRING, VAR_REF will be assigned the value for that keyword. # *************** *** 4079,4084 **** foreach (keys(%{$ref})) { ! if (defined($config->{$_})) ! { ${$ref->{$_}} = $config->{$_}; } --- 4083,4089 ---- foreach (keys(%{$ref})) { ! if (defined($opt_rc->{$_})) { ! ${$ref->{$_}} = $opt_rc->{$_}; ! } elsif (defined($config->{$_})) { ${$ref->{$_}} = $config->{$_}; } |