/* cg_print.c - Print routines for displaying call graphs.
- Copyright 2000, 2001, 2002, 2004, 2007, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2000-2019 Free Software Foundation, Inc.
This file is part of GNU Binutils.
\f
#include "gprof.h"
#include "libiberty.h"
+#include "filenames.h"
#include "search_list.h"
#include "source.h"
#include "symtab.h"
static void
-print_header ()
+print_header (void)
{
if (first_output)
first_output = FALSE;
printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s %-8.8s\n",
"", "", "", "", _("called"), _("total"), _("parents"));
printf ("%-6.6s %5.5s %7.7s %11.11s %7.7s+%-7.7s %-8.8s\t%5.5s\n",
- _("index"), _("%time"), _("self"), _("descendants"),
- _("called"), _("self"), _("name"), _("index"));
+ _("index"),
+ /* xgettext:no-c-format */
+ _("%time"),
+ _("self"), _("descendants"), _("called"), _("self"),
+ _("name"), _("index"));
printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s %-8.8s\n",
"", "", "", "", _("called"), _("total"), _("children"));
printf ("\n");
void
-cg_print_index ()
+cg_print_index (void)
{
unsigned int sym_index;
unsigned int nnames, todo, i, j;
tmp_arcs_count += arcs[arc_index]->count;
/* Count how many times each parent and child are used up
- to our threshhold of arcs (90%). */
+ to our threshold of arcs (90%). */
if ((double)tmp_arcs_count / (double)total_arcs > 0.90)
break;
#define MOST 0.99
static void
-order_and_dump_functions_by_arcs (the_arcs, arc_count, all,
- unplaced_arcs, unplaced_arc_count)
- Arc **the_arcs;
- unsigned long arc_count;
- int all;
- Arc **unplaced_arcs;
- unsigned long *unplaced_arc_count;
+order_and_dump_functions_by_arcs (Arc **the_arcs, unsigned long arc_count,
+ int all, Arc **unplaced_arcs,
+ unsigned long *unplaced_arc_count)
{
#ifdef __GNUC__
unsigned long long tmp_arcs, total_arcs;
static int
cmp_symbol_map (const void * l, const void * r)
{
- return strcmp (((struct function_map *) l)->file_name,
- ((struct function_map *) r)->file_name);
+ return filename_cmp (((struct function_map *) l)->file_name,
+ ((struct function_map *) r)->file_name);
}
/* Print a suggested .o ordering for files on a link line based
/* Don't bother searching if this symbol
is the same as the previous one. */
- if (last && !strcmp (last, symbol_map[sym_index].file_name))
+ if (last && !filename_cmp (last, symbol_map[sym_index].file_name))
continue;
for (index2 = 0; index2 < symtab.len; index2++)
if (! symtab.base[index2].mapped)
continue;
- if (!strcmp (symtab.base[index2].name, symbol_map[sym_index].file_name))
+ if (!filename_cmp (symtab.base[index2].name,
+ symbol_map[sym_index].file_name))
break;
}