diff options
author | bde <bde@FreeBSD.org> | 1998-12-14 18:21:34 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-12-14 18:21:34 +0000 |
commit | 8079dde37894d2447d8857ab621bb5da4dafd666 (patch) | |
tree | 47a74c7d9bff397a27b412613f1d691540013160 | |
parent | 4b628fa86de9e1f3e478283a0118b2209ccc5885 (diff) | |
download | FreeBSD-src-8079dde37894d2447d8857ab621bb5da4dafd666.zip FreeBSD-src-8079dde37894d2447d8857ab621bb5da4dafd666.tar.gz |
Ifdefed the declarations of conditionally used variables.
-rw-r--r-- | sys/amd64/amd64/prof_machdep.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/prof_machdep.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/amd64/amd64/prof_machdep.c b/sys/amd64/amd64/prof_machdep.c index f2849ad..60167ea 100644 --- a/sys/amd64/amd64/prof_machdep.c +++ b/sys/amd64/amd64/prof_machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: prof_machdep.c,v 1.9 1998/04/15 17:45:43 bde Exp $ + * $Id: prof_machdep.c,v 1.10 1998/04/19 15:41:06 bde Exp $ */ #ifdef GUPROF @@ -171,7 +171,8 @@ cputime() { u_int count; int delta; -#ifdef I586_PMC_GUPROF +#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) && \ + defined(PERFMON) && defined(I586_PMC_GUPROF) u_quad_t event_count; #endif u_char high, low; @@ -229,9 +230,11 @@ static int sysctl_machdep_cputime_clock SYSCTL_HANDLER_ARGS { int clock; - int event; int error; +#if defined(PERFMON) && defined(I586_PMC_GUPROF) + int event; struct pmc pmc; +#endif clock = cputime_clock; #if defined(PERFMON) && defined(I586_PMC_GUPROF) diff --git a/sys/i386/isa/prof_machdep.c b/sys/i386/isa/prof_machdep.c index f2849ad..60167ea 100644 --- a/sys/i386/isa/prof_machdep.c +++ b/sys/i386/isa/prof_machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: prof_machdep.c,v 1.9 1998/04/15 17:45:43 bde Exp $ + * $Id: prof_machdep.c,v 1.10 1998/04/19 15:41:06 bde Exp $ */ #ifdef GUPROF @@ -171,7 +171,8 @@ cputime() { u_int count; int delta; -#ifdef I586_PMC_GUPROF +#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) && \ + defined(PERFMON) && defined(I586_PMC_GUPROF) u_quad_t event_count; #endif u_char high, low; @@ -229,9 +230,11 @@ static int sysctl_machdep_cputime_clock SYSCTL_HANDLER_ARGS { int clock; - int event; int error; +#if defined(PERFMON) && defined(I586_PMC_GUPROF) + int event; struct pmc pmc; +#endif clock = cputime_clock; #if defined(PERFMON) && defined(I586_PMC_GUPROF) |