aboutsummaryrefslogtreecommitdiff
path: root/gprof/cg_arcs.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-02-01 08:24:16 +0000
committerAlan Modra <amodra@gmail.com>2002-02-01 08:24:16 +0000
commit1355568ab48a9dcfd079493f7deb5e1c5e88015b (patch)
tree9b1cc576a383708096f9c89c5800bd25f6126768 /gprof/cg_arcs.c
parent48fa4a5def1116273c2c2a236939e96eb9b6231a (diff)
downloadgdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.zip
gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.gz
gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.bz2
* alpha.c (alpha_find_call): Warning fixes.
* mips.c (mips_find_call): Likewise. * sparc.c (sparc_find_call): Likewise. * basic_blocks.c: Warning fixes. Eliminate DEFUN. * call_graph.c: Likewise. * cg_arcs.c: Likewise. * cg_dfn.cp: Likewise. * gprof.c: Likewise. * gprof.h: Likewise. * hist.c: Likewise. * search_list.c: Likewise. * source.c: Likewise. * source.h: Likewise. * sym_ids.c: Likewise. * symtab.c: Likewise. * symtab.h: Likewise. * utils.c: Likewise. * cg_print.c: Likewise. (struct function_map, symbol_map, symbol_map_count): Move declaration to.. * corefile: ..here. * corefile.c: Warning fixes. Eliminate DEFUN. (struct function_map): Remove declaration. * gmon_io.c: Warning fixes. Eliminate DEFUN. (gmon_io_read_64): Make static. (gmon_io_write_64): Likewise. (gmon_read_raw_arc): Likewise. (gmon_write_raw_arc): Likewise. (gmon_io_write_8): Don't pass char, pass int param. * gmon_io.h (gmon_io_write_8): Likewise. and a few copyright dates that should have been done previously.
Diffstat (limited to 'gprof/cg_arcs.c')
-rw-r--r--gprof/cg_arcs.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/gprof/cg_arcs.c b/gprof/cg_arcs.c
index 8ebaa7f..f663954 100644
--- a/gprof/cg_arcs.c
+++ b/gprof/cg_arcs.c
@@ -28,6 +28,14 @@
#include "utils.h"
#include "sym_ids.h"
+static int cmp_topo PARAMS ((const PTR, const PTR));
+static void propagate_time PARAMS ((Sym *));
+static void cycle_time PARAMS ((void));
+static void cycle_link PARAMS ((void));
+static void inherit_flags PARAMS ((Sym *));
+static void propagate_flags PARAMS ((Sym **));
+static int cmp_total PARAMS ((const PTR, const PTR));
+
Sym *cycle_header;
unsigned int num_cycles;
Arc **arcs;
@@ -38,7 +46,9 @@ unsigned int numarcs;
* range covered by CHILD.
*/
Arc *
-DEFUN (arc_lookup, (parent, child), Sym * parent AND Sym * child)
+arc_lookup (parent, child)
+ Sym *parent;
+ Sym *child;
{
Arc *arc;
@@ -67,8 +77,10 @@ DEFUN (arc_lookup, (parent, child), Sym * parent AND Sym * child)
* Add (or just increment) an arc:
*/
void
-DEFUN (arc_add, (parent, child, count),
- Sym * parent AND Sym * child AND unsigned long count)
+arc_add (parent, child, count)
+ Sym *parent;
+ Sym *child;
+ unsigned long count;
{
static unsigned int maxarcs = 0;
Arc *arc, **newarcs;
@@ -134,7 +146,9 @@ DEFUN (arc_add, (parent, child, count),
static int
-DEFUN (cmp_topo, (lp, rp), const PTR lp AND const PTR rp)
+cmp_topo (lp, rp)
+ const PTR lp;
+ const PTR rp;
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
@@ -144,7 +158,8 @@ DEFUN (cmp_topo, (lp, rp), const PTR lp AND const PTR rp)
static void
-DEFUN (propagate_time, (parent), Sym * parent)
+propagate_time (parent)
+ Sym *parent;
{
Arc *arc;
Sym *child;
@@ -228,7 +243,7 @@ DEFUN (propagate_time, (parent), Sym * parent)
* its members.
*/
static void
-DEFUN_VOID (cycle_time)
+cycle_time ()
{
Sym *member, *cyc;
@@ -252,7 +267,7 @@ DEFUN_VOID (cycle_time)
static void
-DEFUN_VOID (cycle_link)
+cycle_link ()
{
Sym *sym, *cyc, *member;
Arc *arc;
@@ -340,7 +355,8 @@ DEFUN_VOID (cycle_link)
* fractions from parents.
*/
static void
-DEFUN (inherit_flags, (child), Sym * child)
+inherit_flags (child)
+ Sym *child;
{
Sym *head, *parent, *member;
Arc *arc;
@@ -418,7 +434,8 @@ DEFUN (inherit_flags, (child), Sym * child)
* and while we're here, sum time for functions.
*/
static void
-DEFUN (propagate_flags, (symbols), Sym ** symbols)
+propagate_flags (symbols)
+ Sym **symbols;
{
int index;
Sym *old_head, *child;
@@ -518,7 +535,9 @@ DEFUN (propagate_flags, (symbols), Sym ** symbols)
* first. All else being equal, compare by names.
*/
static int
-DEFUN (cmp_total, (lp, rp), const PTR lp AND const PTR rp)
+cmp_total (lp, rp)
+ const PTR lp;
+ const PTR rp;
{
const Sym *left = *(const Sym **) lp;
const Sym *right = *(const Sym **) rp;
@@ -575,7 +594,7 @@ DEFUN (cmp_total, (lp, rp), const PTR lp AND const PTR rp)
* time bottom up and flags top down.
*/
Sym **
-DEFUN_VOID (cg_assemble)
+cg_assemble ()
{
Sym *parent, **time_sorted_syms, **top_sorted_syms;
unsigned int index;