aboutsummaryrefslogtreecommitdiff
path: root/gprof/cg_arcs.c
diff options
context:
space:
mode:
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;