From 5f6a145800a9e67c638f3ee05e43bb12fafffb48 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Tue, 14 Sep 2010 22:17:47 +0200 Subject: s3/profiling: don't use CLOCK_PROCESS_CPUTIME_ID that clock is a CPU burnometer but we need a chronometer for profiling. --- source3/profile/profile.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'source3/profile') diff --git a/source3/profile/profile.c b/source3/profile/profile.c index 4a61753ea3..3e0df15f65 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -145,24 +145,6 @@ static void init_clock_gettime(void) have_profiling_clock = False; -#ifdef HAVE_CLOCK_PROCESS_CPUTIME_ID - /* CLOCK_PROCESS_CPUTIME_ID is sufficiently fast that the - * always profiling times is plausible. Unfortunately on Linux - * it is only accurate if we can guarantee we will not be scheduled - * scheduled onto a different CPU between samples. Until there is - * some way to set processor affinity, we can only use this on - * uniprocessors. - */ - if (!this_is_smp()) { - if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) { - DEBUG(10, ("Using CLOCK_PROCESS_CPUTIME_ID " - "for profile_clock\n")); - __profile_clock = CLOCK_PROCESS_CPUTIME_ID; - have_profiling_clock = True; - } - } -#endif - #ifdef HAVE_CLOCK_MONOTONIC if (!have_profiling_clock && clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { -- cgit