summaryrefslogtreecommitdiff
path: root/source3/profile
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-09-14 22:17:47 +0200
committerBjörn Jacke <bj@sernet.de>2010-09-14 22:17:47 +0200
commit5f6a145800a9e67c638f3ee05e43bb12fafffb48 (patch)
tree8d2ee202be2ad2ba56bc5a1903063e896a294baa /source3/profile
parent9c00fb4aa68ac7b044e954906e5ed20e039373a3 (diff)
downloadsamba-5f6a145800a9e67c638f3ee05e43bb12fafffb48.tar.gz
samba-5f6a145800a9e67c638f3ee05e43bb12fafffb48.tar.bz2
samba-5f6a145800a9e67c638f3ee05e43bb12fafffb48.zip
s3/profiling: don't use CLOCK_PROCESS_CPUTIME_ID
that clock is a CPU burnometer but we need a chronometer for profiling.
Diffstat (limited to 'source3/profile')
-rw-r--r--source3/profile/profile.c18
1 files changed, 0 insertions, 18 deletions
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) {