summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-04-07 21:29:34 +0000
committerjkim <jkim@FreeBSD.org>2011-04-07 21:29:34 +0000
commit4808c79fbecb248236d730dd83919073dff1d727 (patch)
tree9f407655af728613cb2901151c1a2e9e0ba9dd27
parentc71c4180a200f2b31902876626de9f1e92cd0c3a (diff)
downloadFreeBSD-src-4808c79fbecb248236d730dd83919073dff1d727.zip
FreeBSD-src-4808c79fbecb248236d730dd83919073dff1d727.tar.gz
Remove stale checks for RDTSC support. amd64 must have TSC support anyway.
-rw-r--r--sys/amd64/amd64/prof_machdep.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/amd64/amd64/prof_machdep.c b/sys/amd64/amd64/prof_machdep.c
index 23c566f..6ebc038 100644
--- a/sys/amd64/amd64/prof_machdep.c
+++ b/sys/amd64/amd64/prof_machdep.c
@@ -63,9 +63,7 @@ static u_int cputime_clock_pmc_conf = I586_PMC_GUPROF;
static int cputime_clock_pmc_init;
static struct gmonparam saved_gmp;
#endif
-#if defined(I586_CPU) || defined(I686_CPU)
static int cputime_prof_active;
-#endif
#endif /* GUPROF */
#ifdef __GNUCLIKE_ASM
@@ -200,14 +198,12 @@ cputime()
{
u_int count;
int delta;
-#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) && \
- defined(PERFMON) && defined(I586_PMC_GUPROF)
+#if defined(PERFMON) && defined(I586_PMC_GUPROF) && !defined(SMP)
u_quad_t event_count;
#endif
u_char high, low;
static u_int prev_count;
-#if defined(I586_CPU) || defined(I686_CPU)
if (cputime_clock == CPUTIME_CLOCK_TSC) {
/*
* Scale the TSC a little to make cputime()'s frequency
@@ -236,7 +232,6 @@ cputime()
return (delta);
}
#endif /* PERFMON && I586_PMC_GUPROF && !SMP */
-#endif /* I586_CPU || I686_CPU */
/*
* Read the current value of the 8254 timer counter 0.
@@ -318,13 +313,10 @@ startguprof(gp)
{
if (cputime_clock == CPUTIME_CLOCK_UNINITIALIZED) {
cputime_clock = CPUTIME_CLOCK_I8254;
-#if defined(I586_CPU) || defined(I686_CPU)
if (tsc_freq != 0 && mp_ncpus == 1)
cputime_clock = CPUTIME_CLOCK_TSC;
-#endif
}
gp->profrate = i8254_freq << CPUTIME_CLOCK_I8254_SHIFT;
-#if defined(I586_CPU) || defined(I686_CPU)
if (cputime_clock == CPUTIME_CLOCK_TSC) {
gp->profrate = tsc_freq >> 1;
cputime_prof_active = 1;
@@ -355,7 +347,6 @@ startguprof(gp)
}
}
#endif /* PERFMON && I586_PMC_GUPROF */
-#endif /* I586_CPU || I686_CPU */
cputime_bias = 0;
cputime();
}
@@ -371,13 +362,10 @@ stopguprof(gp)
cputime_clock_pmc_init = FALSE;
}
#endif
-#if defined(I586_CPU) || defined(I686_CPU)
if (cputime_clock == CPUTIME_CLOCK_TSC)
cputime_prof_active = 0;
-#endif
}
-#if defined(I586_CPU) || defined(I686_CPU)
/* If the cpu frequency changed while profiling, report a warning. */
static void
tsc_freq_changed(void *arg, const struct cf_level *level, int status)
@@ -395,6 +383,5 @@ tsc_freq_changed(void *arg, const struct cf_level *level, int status)
EVENTHANDLER_DEFINE(cpufreq_post_change, tsc_freq_changed, NULL,
EVENTHANDLER_PRI_ANY);
-#endif /* I586_CPU || I686_CPU */
#endif /* GUPROF */
OpenPOWER on IntegriCloud