summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof/arcs.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2002-05-30 21:18:01 +0000
committerwollman <wollman@FreeBSD.org>2002-05-30 21:18:01 +0000
commit0e6b4b2400baba8b4439c902fff94d37adae6210 (patch)
tree9e2e70fd8cf989c08e7d8841fd105a5977aa308f /usr.bin/gprof/arcs.c
parent1116ad074f220f063066380619dac288603d89d0 (diff)
downloadFreeBSD-src-0e6b4b2400baba8b4439c902fff94d37adae6210.zip
FreeBSD-src-0e6b4b2400baba8b4439c902fff94d37adae6210.tar.gz
Fix preprocessor directive syntax (text after #endif).
The style of this program is still atrocious (not fixed).
Diffstat (limited to 'usr.bin/gprof/arcs.c')
-rw-r--r--usr.bin/gprof/arcs.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/gprof/arcs.c b/usr.bin/gprof/arcs.c
index 3cd0452..3905563 100644
--- a/usr.bin/gprof/arcs.c
+++ b/usr.bin/gprof/arcs.c
@@ -47,7 +47,7 @@ int visited;
int viable;
int newcycle;
int oldcycle;
-#endif DEBUG
+#endif /* DEBUG */
/*
* add (or just increment) an arc
@@ -64,7 +64,7 @@ addarc( parentp , childp , count )
printf( "[addarc] %ld arcs from %s to %s\n" ,
count , parentp -> name , childp -> name );
}
-# endif DEBUG
+# endif /* DEBUG */
arcp = arclookup( parentp , childp );
if ( arcp != 0 ) {
/*
@@ -75,7 +75,7 @@ addarc( parentp , childp , count )
printf( "[tally] hit %ld += %ld\n" ,
arcp -> arc_count , count );
}
-# endif DEBUG
+# endif /* DEBUG */
arcp -> arc_count += count;
return;
}
@@ -175,7 +175,7 @@ doarcs()
if ( debug & BREAKCYCLE ) {
printf("[doarcs] pass %ld, cycle(s) %d\n" , pass , ncycle );
}
-# endif DEBUG
+# endif /* DEBUG */
if ( pass == 1 ) {
printf( "\n\n%s %s\n%s %d:\n" ,
"The following arcs were deleted" ,
@@ -219,7 +219,7 @@ doarcs()
printf( "\n" );
}
}
-# endif DEBUG
+# endif /* DEBUG */
/*
* starting from the topological top,
* propagate print flags to children.
@@ -349,7 +349,7 @@ timepropagate( parentp )
printname( parentp );
printf( "\n[dotime] share %f\n" , share );
}
-# endif DEBUG
+# endif /* DEBUG */
}
}
@@ -417,7 +417,7 @@ cyclelink()
printname( nlp );
printf( " is the head of cycle %d\n" , cycle );
}
-# endif DEBUG
+# endif /* DEBUG */
/*
* link members to cycle header
*/
@@ -492,7 +492,7 @@ cycleanalyze()
printf( "[cycleanalyze] starting cycle %d of %d, size %d\n" ,
cycleno , ncycle , size );
}
-# endif DEBUG
+# endif /* DEBUG */
for ( nlp = cyclenl[ cycleno ] . cnext ; nlp ; nlp = nlp -> cnext ) {
stkp = &cyclestack[0];
nlp -> flags |= CYCLEHEAD;
@@ -520,7 +520,7 @@ cycleanalyze()
printf("%s visited %d, viable %d, newcycle %d, oldcycle %d\n",
"[doarcs]" , visited , viable , newcycle , oldcycle);
}
-# endif DEBUG
+# endif /* DEBUG */
return( done );
}
@@ -535,14 +535,14 @@ descend( node , stkstart , stkp )
for ( arcp = node -> children ; arcp ; arcp = arcp -> arc_childlist ) {
# ifdef DEBUG
visited++;
-# endif DEBUG
+# endif /* DEBUG */
if ( arcp -> arc_childp -> cycleno != node -> cycleno
|| ( arcp -> arc_childp -> flags & VISITED )
|| ( arcp -> arc_flags & DEADARC ) )
continue;
# ifdef DEBUG
viable++;
-# endif DEBUG
+# endif /* DEBUG */
*stkp = arcp;
if ( arcp -> arc_childp -> flags & CYCLEHEAD ) {
if ( addcycle( stkstart , stkp ) == FALSE )
@@ -593,7 +593,7 @@ addcycle( stkstart , stkend )
if ( arcpp == endlist ) {
# ifdef DEBUG
oldcycle++;
-# endif DEBUG
+# endif /* DEBUG */
return( TRUE );
}
}
@@ -625,7 +625,7 @@ addcycle( stkstart , stkend )
if ( debug & SUBCYCLELIST ) {
printsubcycle( clp );
}
-# endif DEBUG
+# endif /* DEBUG */
cyclecnt++;
if ( cyclecnt >= CYCLEMAX )
return( FALSE );
@@ -648,7 +648,7 @@ compresslist()
int maxnoparentcnt;
# ifdef DEBUG
const char *type;
-# endif DEBUG
+# endif /* DEBUG */
maxexitcnt = 0;
maxwithparentcnt = 0;
@@ -693,7 +693,7 @@ compresslist()
maxarcp = maxexitarcp;
# ifdef DEBUG
type = "exit";
-# endif DEBUG
+# endif /* DEBUG */
} else if ( maxwithparentcnt > 0 ) {
/*
* second choice is edge leading to node with at least one
@@ -702,7 +702,7 @@ compresslist()
maxarcp = maxwithparentarcp;
# ifdef DEBUG
type = "internal";
-# endif DEBUG
+# endif /* DEBUG */
} else {
/*
* last choice is edge leading to node with only this arc as
@@ -711,7 +711,7 @@ compresslist()
maxarcp = maxnoparentarcp;
# ifdef DEBUG
type = "orphan";
-# endif DEBUG
+# endif /* DEBUG */
}
maxarcp -> arc_flags |= DEADARC;
maxarcp -> arc_childp -> parentcnt -= 1;
@@ -723,7 +723,7 @@ compresslist()
maxarcp -> arc_count , maxarcp -> arc_childp -> name ,
maxarcp -> arc_cyclecnt );
}
-# endif DEBUG
+# endif /* DEBUG */
printf( "\t%s to %s with %ld calls\n" , maxarcp -> arc_parentp -> name ,
maxarcp -> arc_childp -> name , maxarcp -> arc_count );
prev = &cyclehead;
@@ -760,7 +760,7 @@ printsubcycle( clp )
printf( "\t(%ld) -> %s\n" , (*arcpp) -> arc_count ,
(*arcpp) -> arc_childp -> name ) ;
}
-#endif DEBUG
+#endif /* DEBUG */
cycletime()
{
@@ -818,7 +818,7 @@ doflags()
printf( " inherits printflag %d and propfraction %f\n" ,
childp -> printflag , childp -> propfraction );
}
-# endif DEBUG
+# endif /* DEBUG */
if ( ! childp -> printflag ) {
/*
* printflag is off
@@ -874,7 +874,7 @@ doflags()
printf( "time %f propself %f printtime %f\n" ,
childp -> time , childp -> propself , printtime );
}
-# endif DEBUG
+# endif /* DEBUG */
}
}
OpenPOWER on IntegriCloud