regressions: Remove ck_swlock_read_latchlock() from benchmarks

ck_pring
Jaidev Sridhar 11 years ago
parent 2950565037
commit 822a3e498e

@ -81,20 +81,6 @@ main(void)
e_b = rdtsc(); e_b = rdtsc();
printf(" LATCH: swlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); printf(" LATCH: swlock %15" PRIu64 "\n", (e_b - s_b) / STEPS);
for (i = 0; i < STEPS; i++) {
ck_swlock_read_latchlock(&swlock);
ck_swlock_read_unlock(&swlock);
}
s_b = rdtsc();
for (i = 0; i < STEPS; i++) {
ck_swlock_read_latchlock(&swlock);
ck_swlock_read_unlock(&swlock);
}
e_b = rdtsc();
printf(" READ_LATCHLOCK: swlock %15" PRIu64 "\n", (e_b - s_b) / STEPS);
return 0; return 0;
} }

@ -114,71 +114,6 @@ thread_lock(void *pun)
return NULL; return NULL;
} }
static void *
thread_latchlock(void *pun)
{
uint64_t s_b, e_b, a, i;
uint64_t *value = pun;
if (aff_iterate(&affinity) != 0) {
perror("ERROR: Could not affine thread");
exit(EXIT_FAILURE);
}
ck_pr_inc_int(&barrier);
while (ck_pr_load_int(&barrier) != threads)
ck_pr_stall();
for (i = 1, a = 0;; i++) {
s_b = rdtsc();
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
ck_swlock_read_latchlock(&rw.lock);
ck_swlock_read_unlock(&rw.lock);
e_b = rdtsc();
a += (e_b - s_b) >> 4;
if (ck_pr_load_uint(&flag) == 1)
break;
}
ck_pr_inc_int(&barrier);
while (ck_pr_load_int(&barrier) != threads * 2)
ck_pr_stall();
*value = (a / i);
return NULL;
}
static void static void
swlock_test(pthread_t *p, int d, uint64_t *latency, void *(*f)(void *), const char *label) swlock_test(pthread_t *p, int d, uint64_t *latency, void *(*f)(void *), const char *label)
{ {
@ -242,7 +177,6 @@ main(int argc, char *argv[])
d = atoi(argv[1]); d = atoi(argv[1]);
swlock_test(p, d, latency, thread_lock, "swlock"); swlock_test(p, d, latency, thread_lock, "swlock");
swlock_test(p, d, latency, thread_latchlock, "swlock_latchlock");
return 0; return 0;
} }

Loading…
Cancel
Save