diff options
author | xur <xur@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-08 21:51:41 +0000 |
---|---|---|
committer | xur <xur@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-08 21:51:41 +0000 |
commit | 26054e0bbc61f13035da35075ea18a25c18fd3bb (patch) | |
tree | a5055f5dbc707735c59ee18b1ffc1a4a658b4ca5 /gcc/doc | |
parent | 8bb8c293aacc7683c91fa0fe6600773b4672730b (diff) | |
download | gcc-26054e0bbc61f13035da35075ea18a25c18fd3bb.tar.gz |
Add overlap functionality to gcov-tool.
2014-10-08 Rong Xu <xur@google.com>
* gcc/gcov-tool.c (profile_overlap): New driver function
to compute profile overlap.
(print_overlap_usage_message): New.
(overlap_usage): New.
(do_overlap): New.
(print_usage): Add calls to overlap function.
(main): Ditto.
* libgcc/libgcov-util.c (read_gcda_file): Fix format.
(find_match_gcov_info): Ditto.
(calculate_2_entries): New.
(compute_one_gcov): Ditto.
(gcov_info_count_all_cold): Ditto.
(gcov_info_count_all_zero): Ditto.
(extract_file_basename): Ditto.
(get_file_basename): Ditto.
(set_flag): Ditto.
(matched_gcov_info): Ditto.
(calculate_overlap): Ditto.
(gcov_profile_overlap): Ditto.
* libgcc/libgcov-driver.c (compute_summary): Make
it avavilable for external calls.
* gcc/doc/gcov-tool.texi: Add documentation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216015 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/gcov-tool.texi | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/gcc/doc/gcov-tool.texi b/gcc/doc/gcov-tool.texi index ff8b9e22f4f..3a668728949 100644 --- a/gcc/doc/gcov-tool.texi +++ b/gcc/doc/gcov-tool.texi @@ -103,8 +103,7 @@ in these kind of counters. @section Invoking @command{gcov-tool} @smallexample -gcov-tool @r{[}@var{global-options}@r{]} SUB_COMMAND -@r{[}@var{sub_command-options}@r{]} @var{profile_dir} +gcov-tool @r{[}@var{global-options}@r{]} SUB_COMMAND @r{[}@var{sub_command-options}@r{]} @var{profile_dir} @end smallexample @command{gcov-tool} accepts the following options: @@ -123,6 +122,15 @@ gcov-tool rewrite [rewrite-options] @var{directory} [@option{-o}|@option{--output} @var{directory}] [@option{-s}|@option{--scale} @var{float_or_simple-frac_value}] [@option{-n}|@option{--normalize} @var{long_long_value}] + +gcov-tool overlap [overlap-options] @var{directory1} @var{directory2} + [@option{-v}|@option{--verbose}] + [@option{-h}|@option{--hotonly}] + [@option{-f}|@option{--function}] + [@option{-F}|@option{--fullname}] + [@option{-o}|@option{--object}] + [@option{-t}|@option{--hot_threshold}] @var{float} + @c man end @c man begin SEEALSO gpl(7), gfdl(7), fsf-funding(7), gcc(1), gcov(1) and the Info entry for @@ -182,8 +190,42 @@ or simple fraction value form, such 1, 2, 2/3, and 5/3. @itemx --normalize <long_long_value> Normalize the profile. The specified value is the max counter value in the new profile. +@end table + +@item overlap +Computer the overlap score between the two specified profile directories. +The overlap score is computed based on the arc profiles. It is defined as +the sum of min (p1_counter[i] / p1_sum_all, p2_counter[i] / p2_sum_all), +for all arc counter i, where p1_counter[i] and p2_counter[i] are two +matched counters and p1_sum_all and p2_sum_all are the sum of counter +values in profile 1 and profile 2, respectively. + +@table @gcctabopt +@item -v +@itemx --verbose +Set the verbose mode. + +@item -h +@itemx --hotonly +Only print info for hot objects/functions. +@item -f +@itemx --function +Print function level overlap score. + +@item -F +@itemx --fullname +Print full gcda filename. + +@item -o +@itemx --object +Print object level overlap score. + +@item -t @var{float} +@itemx --hot_threshold <float> +Set the threshold for hot counter value. @end table + @end table @c man end |