gprof: remove use of PTR
* basic_blocks.c: Replace uses of PTR with void * throughout. * cg_arcs.c: Likewise. * cg_print.c: Likewise. * hist.c: Likewise. * source.h: Likewise. * symtab.c: Likewise.
This commit is contained in:
parent
2ec4ffc1c6
commit
e3154ef69c
@ -33,10 +33,10 @@
|
||||
#include "symtab.h"
|
||||
#include "sym_ids.h"
|
||||
|
||||
static int cmp_bb (const PTR, const PTR);
|
||||
static int cmp_ncalls (const PTR, const PTR);
|
||||
static int cmp_bb (const void *, const void *);
|
||||
static int cmp_ncalls (const void *, const void *);
|
||||
static void fskip_string (FILE *);
|
||||
static void annotate_with_count (char *, unsigned int, int, PTR);
|
||||
static void annotate_with_count (char *, unsigned int, int, void *);
|
||||
|
||||
/* Default option values: */
|
||||
bool bb_annotate_all_lines = false;
|
||||
@ -53,7 +53,7 @@ static long num_lines_executed;
|
||||
number, and address (in that order). */
|
||||
|
||||
static int
|
||||
cmp_bb (const PTR lp, const PTR rp)
|
||||
cmp_bb (const void *lp, const void *rp)
|
||||
{
|
||||
int r;
|
||||
const Sym *left = *(const Sym **) lp;
|
||||
@ -82,7 +82,7 @@ cmp_bb (const PTR lp, const PTR rp)
|
||||
/* Helper for sorting. Order basic blocks in decreasing number of
|
||||
calls, ties are broken in increasing order of line numbers. */
|
||||
static int
|
||||
cmp_ncalls (const PTR lp, const PTR rp)
|
||||
cmp_ncalls (const void *lp, const void *rp)
|
||||
{
|
||||
const Sym *left = *(const Sym **) lp;
|
||||
const Sym *right = *(const Sym **) rp;
|
||||
@ -317,7 +317,7 @@ print_exec_counts (void)
|
||||
that starts the basic-block. */
|
||||
|
||||
static void
|
||||
annotate_with_count (char *buf, unsigned int width, int line_num, PTR arg)
|
||||
annotate_with_count (char *buf, unsigned int width, int line_num, void *arg)
|
||||
{
|
||||
Source_File *sf = (Source_File *) arg;
|
||||
Sym *b;
|
||||
|
@ -38,13 +38,13 @@
|
||||
#include "utils.h"
|
||||
#include "sym_ids.h"
|
||||
|
||||
static int cmp_topo (const PTR, const PTR);
|
||||
static int cmp_topo (const void *, const void *);
|
||||
static void propagate_time (Sym *);
|
||||
static void cycle_time (void);
|
||||
static void cycle_link (void);
|
||||
static void inherit_flags (Sym *);
|
||||
static void propagate_flags (Sym **);
|
||||
static int cmp_total (const PTR, const PTR);
|
||||
static int cmp_total (const void *, const void *);
|
||||
|
||||
Sym *cycle_header;
|
||||
unsigned int num_cycles;
|
||||
@ -151,7 +151,7 @@ arc_add (Sym *parent, Sym *child, unsigned long count)
|
||||
|
||||
|
||||
static int
|
||||
cmp_topo (const PTR lp, const PTR rp)
|
||||
cmp_topo (const void *lp, const void *rp)
|
||||
{
|
||||
const Sym *left = *(const Sym **) lp;
|
||||
const Sym *right = *(const Sym **) rp;
|
||||
@ -535,7 +535,7 @@ propagate_flags (Sym **symbols)
|
||||
* first. All else being equal, compare by names.
|
||||
*/
|
||||
static int
|
||||
cmp_total (const PTR lp, const PTR rp)
|
||||
cmp_total (const void *lp, const void *rp)
|
||||
{
|
||||
const Sym *left = *(const Sym **) lp;
|
||||
const Sym *right = *(const Sym **) rp;
|
||||
|
@ -47,9 +47,9 @@ static void print_parents (Sym *);
|
||||
static void sort_children (Sym *);
|
||||
static void print_children (Sym *);
|
||||
static void print_line (Sym *);
|
||||
static int cmp_name (const PTR, const PTR);
|
||||
static int cmp_arc_count (const PTR, const PTR);
|
||||
static int cmp_fun_nuses (const PTR, const PTR);
|
||||
static int cmp_name (const void *, const void *);
|
||||
static int cmp_arc_count (const void *, const void *);
|
||||
static int cmp_fun_nuses (const void *, const void *);
|
||||
static void order_and_dump_functions_by_arcs
|
||||
(Arc **, unsigned long, int, Arc **, unsigned long *);
|
||||
|
||||
@ -551,7 +551,7 @@ cg_print (Sym ** timesortsym)
|
||||
|
||||
|
||||
static int
|
||||
cmp_name (const PTR left, const PTR right)
|
||||
cmp_name (const void *left, const void *right)
|
||||
{
|
||||
const Sym **npp1 = (const Sym **) left;
|
||||
const Sym **npp2 = (const Sym **) right;
|
||||
@ -675,7 +675,7 @@ cg_print_index (void)
|
||||
We want to sort in descending order. */
|
||||
|
||||
static int
|
||||
cmp_arc_count (const PTR left, const PTR right)
|
||||
cmp_arc_count (const void *left, const void *right)
|
||||
{
|
||||
const Arc **npp1 = (const Arc **) left;
|
||||
const Arc **npp2 = (const Arc **) right;
|
||||
@ -692,7 +692,7 @@ cmp_arc_count (const PTR left, const PTR right)
|
||||
We want to sort in descending order. */
|
||||
|
||||
static int
|
||||
cmp_fun_nuses (const PTR left, const PTR right)
|
||||
cmp_fun_nuses (const void *left, const void *right)
|
||||
{
|
||||
const Sym **npp1 = (const Sym **) left;
|
||||
const Sym **npp2 = (const Sym **) right;
|
||||
|
@ -39,7 +39,7 @@
|
||||
static void scale_and_align_entries (void);
|
||||
static void print_header (int);
|
||||
static void print_line (Sym *, double);
|
||||
static int cmp_time (const PTR, const PTR);
|
||||
static int cmp_time (const void *, const void *);
|
||||
|
||||
/* Declarations of automatically generated functions to output blurbs. */
|
||||
extern void flat_blurb (FILE * fp);
|
||||
@ -535,7 +535,7 @@ print_line (Sym *sym, double scale)
|
||||
lexicographic order of the function names. */
|
||||
|
||||
static int
|
||||
cmp_time (const PTR lp, const PTR rp)
|
||||
cmp_time (const void *lp, const void *rp)
|
||||
{
|
||||
const Sym *left = *(const Sym **) lp;
|
||||
const Sym *right = *(const Sym **) rp;
|
||||
|
@ -58,6 +58,6 @@ extern Source_File *source_file_lookup_name (const char *);
|
||||
is not stdout, it should be closed when done with it. */
|
||||
extern FILE *annotate_source
|
||||
(Source_File *sf, unsigned int max_width,
|
||||
void (*annote) (char *, unsigned int, int, PTR arg),
|
||||
PTR arg);
|
||||
void (*annote) (char *, unsigned int, int, void *),
|
||||
void *arg);
|
||||
#endif /* source_h */
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "cg_arcs.h"
|
||||
#include "corefile.h"
|
||||
|
||||
static int cmp_addr (const PTR, const PTR);
|
||||
static int cmp_addr (const void *, const void *);
|
||||
|
||||
Sym_Table symtab;
|
||||
|
||||
@ -58,7 +58,7 @@ sym_init (Sym *sym)
|
||||
the global symbol survives. */
|
||||
|
||||
static int
|
||||
cmp_addr (const PTR lp, const PTR rp)
|
||||
cmp_addr (const void *lp, const void *rp)
|
||||
{
|
||||
const Sym *left = (const Sym *) lp;
|
||||
const Sym *right = (const Sym *) rp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user