(unknown charset) pls review: remove dtrace_gethrtime_init_sync

From: (unknown charset) Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 07 May 2011 12:42:48 +0300
I couldn't think of any purpose for the code under CHECK_SYNC.
So I'd like to just drop it.

    dtrace_gethrtime_init: remove some useless code

diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
index a44334a..f59fad3 100644
--- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
_at__at_ -359,26 +359,6 _at__at_ static uint32_t	nsec_scale;
 #define SCALE_SHIFT	28

 static void
-dtrace_gethrtime_init_sync(void *arg)
-{
-#ifdef CHECK_SYNC
-	/*
-	 * Delay this function from returning on one
-	 * of the CPUs to check that the synchronisation
-	 * works.
-	 */
-	uintptr_t cpu = (uintptr_t) arg;
-
-	if (cpu == curcpu) {
-		int i;
-		for (i = 0; i < 1000000000; i++)
-			tgt_cpu_tsc = rdtsc();
-		tgt_cpu_tsc = 0;
-	}
-#endif
-}
-
-static void
 dtrace_gethrtime_init_cpu(void *arg)
 {
 	uintptr_t cpu = (uintptr_t) arg;
_at__at_ -434,7 +414,7 _at__at_ dtrace_gethrtime_init(void *arg)
 		pc = pcpu_find(i);
 		map = PCPU_GET(cpumask) | pc->pc_cpumask;

-		smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
+		smp_rendezvous_cpus(map, NULL,
 		    dtrace_gethrtime_init_cpu,
 		    smp_no_rendevous_barrier, (void *)(uintptr_t) i);

diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c
b/sys/cddl/dev/dtrace/i386/dtrace_subr.c
index 2ef21f8..d4177a4 100644
--- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c
_at__at_ -359,26 +359,6 _at__at_ static uint32_t	nsec_scale;
 #define SCALE_SHIFT	28

 static void
-dtrace_gethrtime_init_sync(void *arg)
-{
-#ifdef CHECK_SYNC
-	/*
-	 * Delay this function from returning on one
-	 * of the CPUs to check that the synchronisation
-	 * works.
-	 */
-	uintptr_t cpu = (uintptr_t) arg;
-
-	if (cpu == curcpu) {
-		int i;
-		for (i = 0; i < 1000000000; i++)
-			tgt_cpu_tsc = rdtsc();
-		tgt_cpu_tsc = 0;
-	}
-#endif
-}
-
-static void
 dtrace_gethrtime_init_cpu(void *arg)
 {
 	uintptr_t cpu = (uintptr_t) arg;
_at__at_ -434,7 +414,7 _at__at_ dtrace_gethrtime_init(void *arg)
 		pc = pcpu_find(i);
 		map = PCPU_GET(cpumask) | pc->pc_cpumask;

-		smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
+		smp_rendezvous_cpus(map, NULL,
 		    dtrace_gethrtime_init_cpu,
 		    smp_no_rendevous_barrier, (void *)(uintptr_t) i);


-- 
Andriy Gapon
Received on Sat May 07 2011 - 07:42:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC