summaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-19 18:19:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-19 18:19:39 +0000
commite56043cd2c207982e812ce6fcecb7353dea58363 (patch)
tree01a6f37ad5a9ae6b18bdc20f052b04e19b4255c0 /gcc/gcov.c
parent2e02a1a4548f2ee1ea519c88e68b20621ad16fcc (diff)
downloadgcc-e56043cd2c207982e812ce6fcecb7353dea58363.tar.gz
2010-09-19 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 164348, with some improvements in gcc/melt-runtime.[ch] 2010-09-19 Basile Starynkevitch <basile@starynkevitch.net> [[merged with trunk rev.164348, so improved MELT runtime!]] * gcc/melt-runtime.h: improved comments. (melt_debug_garbcoll, melt_debuggc_eprintf): Moved from melt-runtime.c. (melt_obmag_string): New declaration. (struct meltobject_st, struct meltclosure_st, struct meltroutine_st, struct meltmixbigint_st, struct meltstring_st): using GTY variable_size and @@MELTGTY@@ comment. (melt_mark_special): added debug print. * gcc/melt-runtime.c: Improved comments. Include bversion.h, realmpfr.h, gimple-pretty-print.h. (ggc_force_collect) Declared external. (melt_forward_counter): Added. (melt_obmag_string): New function. (melt_alptr_1, melt_alptr_2, melt_break_alptr_1_at) (melt_break_alptr_2_at, melt_break_alptr_1,melt_break_alptr_1) (melt_allocate_young_gc_zone, melt_free_young_gc_zone): New. (delete_special, meltgc_make_special): Improved debug printf and use melt_break_alptr_1... (ggc_alloc_*) macros defined for backport to GCC 4.5 (melt_forwarded_copy): Don't clear the new destination zone in old GGC heap. (meltgc_add_out_raw_len): Use ggc_alloc_atomic. (meltgc_raw_new_mappointers, meltgc_raw_put_mappointers) (meltgc_raw_remove_mappointers): Corrected length argument to ggc_alloc_cleared_vec_entrypointermelt_st. (melt_really_initialize): Call melt_allocate_young_gc_zone. (melt_initialize): Set flag_plugin_added. (melt_val2passflag): TODO_verify_loops only in GCC 4.5 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@164424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 1c1403d927d..20d5fdf61e6 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -297,6 +297,11 @@ static int flag_unconditional = 0;
static int flag_gcov_file = 1;
+/* Output progress indication if this is true. This is off by default
+ and can be turned on by the -d option. */
+
+static int flag_display_progress = 0;
+
/* For included files, make the gcov output file name include the name
of the input source file. For example, if x.h is included in a.c,
then the output file name is a.c##x.h.gcov instead of x.h.gcov. */
@@ -355,6 +360,7 @@ int
main (int argc, char **argv)
{
int argno;
+ int first_arg;
/* Unlock the stdio streams. */
unlock_std_streams ();
@@ -371,8 +377,15 @@ main (int argc, char **argv)
if (argc - argno > 1)
multiple_files = 1;
+ first_arg = argno;
+
for (; argno != argc; argno++)
- process_file (argv[argno]);
+ {
+ if (flag_display_progress)
+ printf("Processing file %d out of %d\n",
+ argno - first_arg + 1, argc - first_arg);
+ process_file (argv[argno]);
+ }
generate_results (multiple_files ? NULL : argv[argc - 1]);
@@ -415,6 +428,7 @@ print_usage (int error_p)
fnotice (file, " -o, --object-directory DIR|FILE Search for object files in DIR or called FILE\n");
fnotice (file, " -p, --preserve-paths Preserve all pathname components\n");
fnotice (file, " -u, --unconditional-branches Show unconditional branch counts too\n");
+ fnotice (file, " -d, --display-progress Display progress information\n");
fnotice (file, "\nFor bug reporting instructions, please see:\n%s.\n",
bug_report_url);
exit (status);
@@ -449,6 +463,7 @@ static const struct option options[] =
{ "object-directory", required_argument, NULL, 'o' },
{ "object-file", required_argument, NULL, 'o' },
{ "unconditional-branches", no_argument, NULL, 'u' },
+ { "display-progress", no_argument, NULL, 'd' },
{ 0, 0, 0, 0 }
};
@@ -459,7 +474,7 @@ process_args (int argc, char **argv)
{
int opt;
- while ((opt = getopt_long (argc, argv, "abcfhlno:puv", options, NULL)) != -1)
+ while ((opt = getopt_long (argc, argv, "abcdfhlno:puv", options, NULL)) != -1)
{
switch (opt)
{
@@ -493,6 +508,9 @@ process_args (int argc, char **argv)
case 'u':
flag_unconditional = 1;
break;
+ case 'd':
+ flag_display_progress = 1;
+ break;
case 'v':
print_version ();
/* print_version will exit. */