From 09b5ddd71e1daa21c8e186207f7f3d1a4e3b11ed Mon Sep 17 00:00:00 2001 From: Yommy Date: Tue, 16 Mar 2010 21:42:14 +0000 Subject: added --enable-rdtsc configure option to enhance timer performance, especially in virtualized environments; default disabled - credits to sirius_black git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14265 54d463be-8e91-2dee-dedb-b68131a5f0ec --- configure.in | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index c881f5610..4892ee141 100644 --- a/configure.in +++ b/configure.in @@ -74,6 +74,30 @@ AC_ARG_ENABLE( [enable_debug="no"] ) +# +# RDTSC as Tick Source +# +AC_ARG_ENABLE( + [rdtsc], + AC_HELP_STRING( + [--enable-rdtsc], + [ + Uses rdtsc as timing source (disabled by default) + Enable it when you've timing issues. + + (For example: in conjunction with XEN or Other Virtualization mechanisms) + + Note: + Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving options. + (On the most modern Dedicated Servers cpufreq is preconfigured, see your distribution's manual + how to disable it) + ] + ), + [ + enable_rdtsc=1 + ], + [enable_rdtsc=0] +) # # Profiler @@ -383,6 +407,19 @@ case $enable_debug in esac +# +# RDTSC +# +case $enable_rdtsc in + 0) + #default value + ;; + 1) + CFLAGS="$CFLAGS -DENABLE_RDTSC" + ;; +esac + + # # Profiler # -- cgit v1.2.3-60-g2f50