diff options
author | obrien <obrien@FreeBSD.org> | 1999-08-26 09:30:50 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-08-26 09:30:50 +0000 |
commit | 0bedf4fb30066e5e1d4342a1d3914dae7d37cba7 (patch) | |
tree | 68d8110b41afd0ebbf39167b1a4918eea667a7c5 /contrib/gcc/gmon.c | |
parent | d4db5fb866b7ad5216abd5047774a3973b9901a9 (diff) | |
download | FreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.zip FreeBSD-src-0bedf4fb30066e5e1d4342a1d3914dae7d37cba7.tar.gz |
Virgin import of gcc from EGCS 1.1.2
Diffstat (limited to 'contrib/gcc/gmon.c')
-rw-r--r-- | contrib/gcc/gmon.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/contrib/gcc/gmon.c b/contrib/gcc/gmon.c index bda7d96..04fc13a 100644 --- a/contrib/gcc/gmon.c +++ b/contrib/gcc/gmon.c @@ -84,10 +84,10 @@ monstartup(lowpc, highpc) * so the rest of the scaling (here and in gprof) stays in ints. */ lowpc = (char *) - ROUNDDOWN((unsigned)lowpc, HISTFRACTION*sizeof(HISTCOUNTER)); + ROUNDDOWN((unsigned) lowpc, HISTFRACTION*sizeof(HISTCOUNTER)); s_lowpc = lowpc; highpc = (char *) - ROUNDUP((unsigned)highpc, HISTFRACTION*sizeof(HISTCOUNTER)); + ROUNDUP((unsigned) highpc, HISTFRACTION*sizeof(HISTCOUNTER)); s_highpc = highpc; s_textsize = highpc - lowpc; monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr); @@ -220,12 +220,12 @@ mcount() * for example: signal catchers get called from the stack, * not from text space. too bad. */ - frompcindex = (unsigned short *)((long)frompcindex - (long)s_lowpc); - if ((unsigned long)frompcindex > s_textsize) { + frompcindex = (unsigned short *) ((long) frompcindex - (long) s_lowpc); + if ((unsigned long) frompcindex > s_textsize) { goto done; } frompcindex = - &froms[((long)frompcindex) / (HASHFRACTION * sizeof(*froms))]; + &froms[((long) frompcindex) / (HASHFRACTION * sizeof(*froms))]; toindex = *frompcindex; if (toindex == 0) { /* @@ -308,11 +308,10 @@ overflow: goto out; } -/* - * Control profiling - * profiling is what mcount checks to see if - * all the data structures are ready. - */ +/* Control profiling; + profiling is what mcount checks to see if + all the data structures are ready. */ + moncontrol(mode) int mode; { @@ -323,7 +322,7 @@ moncontrol(mode) profiling = 0; } else { /* stop */ - profil((char *)0, 0, 0, 0); + profil((char *) 0, 0, 0, 0); profiling = 3; } } |