diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-03-30 16:53:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-04-28 20:46:50 +0200 |
commit | 210e32b60b9018e5db2d9741dc7aaa5d9b436999 (patch) | |
tree | 1ab37b8840ce2f34db3bbe36c9836da255e8dbac /gcc/doc | |
parent | ef9a53feae5701953da9161afef2aea0329ec8b2 (diff) | |
download | gcc-210e32b60b9018e5db2d9741dc7aaa5d9b436999.zip gcc-210e32b60b9018e5db2d9741dc7aaa5d9b436999.tar.gz gcc-210e32b60b9018e5db2d9741dc7aaa5d9b436999.tar.bz2 |
gcov-tool: Add merge-stream subcommand
gcc/
* doc/gcov-tool.texi: Document merge-stream subcommand.
* doc/invoke.texi (fprofile-info-section): Mention merge-stream
subcommand of gcov-tool.
* gcov-tool.cc (gcov_profile_merge_stream): Declare.
(print_merge_stream_usage_message): New.
(merge_stream_usage): Likewise.
(do_merge_stream): Likewise.
(print_usage): Call print_merge_stream_usage_message().
(main): Call do_merge_stream() to execute merge-stream subcommand.
libgcc/
* libgcov-util.c (consume_stream): New.
(get_target_profiles_for_merge): Likewise.
(gcov_profile_merge_stream): Likewise.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/gcov-tool.texi | 36 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 5 |
2 files changed, 41 insertions, 0 deletions
diff --git a/gcc/doc/gcov-tool.texi b/gcc/doc/gcov-tool.texi index d79dbc9..7715083 100644 --- a/gcc/doc/gcov-tool.texi +++ b/gcc/doc/gcov-tool.texi @@ -53,6 +53,10 @@ Current gcov-tool supports the following functionalities: merge two sets of profiles with weights. @item +read a stream of profiles with associated filenames and merge it with a set of +profiles with weights. + +@item read one set of profile and rewrite profile contents. One can scale or normalize the count values. @end itemize @@ -65,6 +69,12 @@ them. One can specify the weight to factor in the relative importance of each input. @item +Collect profiles from target systems without a filesystem (freestanding +environments). Merge the collected profiles with associated profiles +present on the host system. One can specify the weight to factor in the +relative importance of each input. + +@item Rewrite the profile after removing a subset of the gcda files, while maintaining the consistency of the summary and the histogram. @@ -117,6 +127,10 @@ gcov-tool merge [merge-options] @var{directory1} @var{directory2} [@option{-v}|@option{--verbose}] [@option{-w}|@option{--weight} @var{w1,w2}] +gcov-tool merge-stream [merge-stream-options] [@var{file}] + [@option{-v}|@option{--verbose}] + [@option{-w}|@option{--weight} @var{w1,w2}] + gcov-tool rewrite [rewrite-options] @var{directory} [@option{-n}|@option{--normalize} @var{long_long_value}] [@option{-o}|@option{--output} @var{directory}] @@ -169,6 +183,28 @@ Set the merge weights of the @var{directory1} and @var{directory2}, respectively. The default weights are 1 for both. @end table +@item merge-stream +Collect profiles with associated filenames from a @emph{gcfn} and @emph{gcda} +data stream. Read the stream from the file specified by @var{file} or from +@file{stdin}. Merge the profiles with associated profiles in the host +filesystem. Apply the optional weights while merging profiles. + +For the generation of a @emph{gcfn} and @emph{gcda} data stream on the target +system, please have a look at the @code{__gcov_filename_to_gcfn()} and +@code{__gcov_info_to_gcda()} functions declared in @code{#include <gcov.h>}. +@table @gcctabopt + +@item -v +@itemx --verbose +Set the verbose mode. + +@item -w @var{w1},@var{w2} +@itemx --weight @var{w1},@var{w2} +Set the merge weights of the profiles from the @emph{gcfn} and @emph{gcda} data +stream and the associated profiles in the host filesystem, respectively. The +default weights are 1 for both. +@end table + @item rewrite Read the specified profile directory and rewrite to a new directory. @table @gcctabopt diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7cff38b..3f4d6f2 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -15537,6 +15537,11 @@ main (void) @} @end smallexample +The @command{merge-stream} subcommand of @command{gcov-tool} may be used to +deserialize the data stream generated by the @code{__gcov_filename_to_gcfn} and +@code{__gcov_info_to_gcda} functions and merge the profile information into +@file{.gcda} files on the host filesystem. + @item -fprofile-note=@var{path} @opindex fprofile-note |