diff options
Diffstat (limited to 'gcc/gcov-dump.c')
-rw-r--r-- | gcc/gcov-dump.c | 81 |
1 files changed, 3 insertions, 78 deletions
diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index 3ff11a6..7762e4e 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -38,9 +38,6 @@ static void tag_arcs (const char *, unsigned, unsigned, unsigned); static void tag_lines (const char *, unsigned, unsigned, unsigned); static void tag_counters (const char *, unsigned, unsigned, unsigned); static void tag_summary (const char *, unsigned, unsigned, unsigned); -static void dump_working_sets (const char *filename ATTRIBUTE_UNUSED, - const gcov_summary *summary, - unsigned depth); extern int main (int, char **); typedef struct tag_format @@ -52,7 +49,6 @@ typedef struct tag_format static int flag_dump_contents = 0; static int flag_dump_positions = 0; -static int flag_dump_working_sets = 0; static const struct option options[] = { @@ -60,7 +56,6 @@ static const struct option options[] = { "version", no_argument, NULL, 'v' }, { "long", no_argument, NULL, 'l' }, { "positions", no_argument, NULL, 'o' }, - { "working-sets", no_argument, NULL, 'w' }, { 0, 0, 0, 0 } }; @@ -77,7 +72,6 @@ static const tag_format_t tag_table[] = {GCOV_TAG_ARCS, "ARCS", tag_arcs}, {GCOV_TAG_LINES, "LINES", tag_lines}, {GCOV_TAG_OBJECT_SUMMARY, "OBJECT_SUMMARY", tag_summary}, - {GCOV_TAG_PROGRAM_SUMMARY, "PROGRAM_SUMMARY", tag_summary}, {0, NULL, NULL} }; @@ -117,9 +111,6 @@ main (int argc ATTRIBUTE_UNUSED, char **argv) case 'p': flag_dump_positions = 1; break; - case 'w': - flag_dump_working_sets = 1; - break; default: fprintf (stderr, "unknown flag `%c'\n", opt); } @@ -139,7 +130,6 @@ print_usage (void) printf (" -l, --long Dump record contents too\n"); printf (" -p, --positions Dump record positions\n"); printf (" -v, --version Print version number\n"); - printf (" -w, --working-sets Dump working set computed from summary\n"); printf ("\nFor bug reporting instructions, please see:\n%s.\n", bug_report_url); } @@ -465,75 +455,10 @@ tag_counters (const char *filename ATTRIBUTE_UNUSED, static void tag_summary (const char *filename ATTRIBUTE_UNUSED, unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED, - unsigned depth) + unsigned depth ATTRIBUTE_UNUSED) { gcov_summary summary; - unsigned h_ix; - gcov_bucket_type *histo_bucket; - gcov_read_summary (&summary); - printf (" checksum=0x%08x", summary.checksum); - - printf ("\n"); - print_prefix (filename, depth, 0); - printf (VALUE_PADDING_PREFIX "counts=%u, runs=%u", - summary.num, summary.runs); - - printf (", sum_all=%" PRId64, - (int64_t)summary.sum_all); - printf (", run_max=%" PRId64, - (int64_t)summary.run_max); - printf (", sum_max=%" PRId64, - (int64_t)summary.sum_max); - printf ("\n"); - print_prefix (filename, depth, 0); - printf (VALUE_PADDING_PREFIX "counter histogram:"); - for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++) - { - histo_bucket = &summary.histogram[h_ix]; - if (!histo_bucket->num_counters) - continue; - printf ("\n"); - print_prefix (filename, depth, 0); - printf (VALUE_PADDING_PREFIX VALUE_PREFIX "num counts=%u, " - "min counter=%" PRId64 ", cum_counter=%" PRId64, - h_ix, histo_bucket->num_counters, - (int64_t)histo_bucket->min_value, - (int64_t)histo_bucket->cum_value); - } - if (flag_dump_working_sets) - dump_working_sets (filename, &summary, depth); -} - -static void -dump_working_sets (const char *filename ATTRIBUTE_UNUSED, - const gcov_summary *summary, - unsigned depth) -{ - gcov_working_set_t gcov_working_sets[NUM_GCOV_WORKING_SETS]; - unsigned ws_ix, pctinc, pct; - gcov_working_set_t *ws_info; - - compute_working_sets (summary, gcov_working_sets); - - printf ("\n"); - print_prefix (filename, depth, 0); - printf (VALUE_PADDING_PREFIX "counter working sets:"); - /* Multiply the percentage by 100 to avoid float. */ - pctinc = 100 * 100 / NUM_GCOV_WORKING_SETS; - for (ws_ix = 0, pct = pctinc; ws_ix < NUM_GCOV_WORKING_SETS; - ws_ix++, pct += pctinc) - { - if (ws_ix == NUM_GCOV_WORKING_SETS - 1) - pct = 9990; - ws_info = &gcov_working_sets[ws_ix]; - /* Print out the percentage using int arithmatic to avoid float. */ - printf ("\n"); - print_prefix (filename, depth + 1, 0); - printf (VALUE_PADDING_PREFIX "%u.%02u%%: num counts=%u, min counter=" - "%" PRId64, - pct / 100, pct - (pct / 100 * 100), - ws_info->num_counters, - (int64_t)ws_info->min_counter); - } + printf (" runs=%d, sum_max=%" PRId64, + summary.runs, summary.sum_max); } |