aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-driver.c
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-10-08 21:51:41 +0000
committerRong Xu <xur@gcc.gnu.org>2014-10-08 21:51:41 +0000
commit9b84e7a8365e61211975aceec67d086aceee0c58 (patch)
treea5055f5dbc707735c59ee18b1ffc1a4a658b4ca5 /libgcc/libgcov-driver.c
parenta41bb2c947782287f983daac7807f0e0e4ef4b65 (diff)
downloadgcc-9b84e7a8365e61211975aceec67d086aceee0c58.zip
gcc-9b84e7a8365e61211975aceec67d086aceee0c58.tar.gz
gcc-9b84e7a8365e61211975aceec67d086aceee0c58.tar.bz2
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. From-SVN: r216015
Diffstat (limited to 'libgcc/libgcov-driver.c')
-rw-r--r--libgcc/libgcov-driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 754584d..2ff878f 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -274,7 +274,10 @@ static struct gcov_summary_buffer *sum_buffer;
It computes and returns CRC32 and stored summary in THIS_PRG.
Also determines the longest filename length of the info files. */
-static gcov_unsigned_t
+#if !IN_GCOV_TOOL
+static
+#endif
+gcov_unsigned_t
compute_summary (struct gcov_info *list, struct gcov_summary *this_prg,
size_t *max_length)
{