summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util.c17
-rw-r--r--source3/profile/profile.c18
3 files changed, 0 insertions, 36 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 73fe868d84..f089c696f0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1230,7 +1230,6 @@ char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid);
char *procid_str_static(const struct server_id *pid);
bool procid_valid(const struct server_id *pid);
bool procid_is_local(const struct server_id *pid);
-int this_is_smp(void);
bool trans_oob(uint32_t bufsize, uint32_t offset, uint32_t length);
bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 315f3897d6..3303894e0e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2737,23 +2737,6 @@ bool procid_is_local(const struct server_id *pid)
#endif
}
-int this_is_smp(void)
-{
-#if defined(HAVE_SYSCONF)
-
-#if defined(SYSCONF_SC_NPROC_ONLN)
- return (sysconf(_SC_NPROC_ONLN) > 1) ? 1 : 0;
-#elif defined(SYSCONF_SC_NPROCESSORS_ONLN)
- return (sysconf(_SC_NPROCESSORS_ONLN) > 1) ? 1 : 0;
-#else
- return 0;
-#endif
-
-#else
- return 0;
-#endif
-}
-
/****************************************************************
Check if offset/length fit into bufsize. Should probably be
merged with is_offset_safe, but this would require a rewrite
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) {