From ca99ed191f42ccf1cb5a85e962ea1f5f35127d14 Mon Sep 17 00:00:00 2001 From: hiramatu Date: Mon, 24 Sep 2007 19:35:48 +0000 Subject: 2007-09-24 Masami Hiramatsu PR 3916 * buildrun.cxx (compile_pass): Add new autoconf options for checking time related APIs. * time.c (stp_time_t): Rename cpufreq to freq. (__stp_get_freq): Rename from __stp_estimate_cpufreq. Use tsc_khz or cpu_khz if it is available. Use itc_freq on ia64. (__stp_ktime_get_real_ts): New function to get current kernel time. (__stp_time_timer_callback): Call __stp_ktime_get_real_ts to get base time. (__stp_init_time): Ditto. (__stp_constant_freq): New function to check the processor has constant frequency timestamp counter. (_stp_kill_time): Don't use the cpufreq notifier if the processor has constant frequency timestamp counter. (_stp_init_time): Ditto. * autoconf-ktime-get-real.c : New file. * autoconf-constant-tsc.c: Ditto. * autoconf-tsc-khz.c: Ditto. --- runtime/autoconf-tsc-khz.c | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 runtime/autoconf-tsc-khz.c (limited to 'runtime/autoconf-tsc-khz.c') diff --git a/runtime/autoconf-tsc-khz.c b/runtime/autoconf-tsc-khz.c new file mode 100644 index 00000000..d6424251 --- /dev/null +++ b/runtime/autoconf-tsc-khz.c @@ -0,0 +1,3 @@ +#include + +unsigned int tsc = tsc_khz; -- cgit