Created
July 2, 2013 05:19
-
-
Save awreece/5906934 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/bench_cuckoo.cc b/src/bench_cuckoo.cc | |
index cac4f27..64014f0 100644 | |
--- a/src/bench_cuckoo.cc | |
+++ b/src/bench_cuckoo.cc | |
@@ -70,7 +70,9 @@ void* exec_thread(void* p) { | |
tp->hits = 0; | |
tp->gets = 0; | |
tp->puts = 0; | |
+#ifdef __linux__ | |
tp->cpu = sched_getcpu(); | |
+#endif | |
size_t w = nq / nt; | |
size_t* q = tp->queries + w * tp->tid; | |
diff --git a/src/bench_cuckoo_rw.cc b/src/bench_cuckoo_rw.cc | |
index 42be96f..ea17296 100644 | |
--- a/src/bench_cuckoo_rw.cc | |
+++ b/src/bench_cuckoo_rw.cc | |
@@ -74,7 +74,9 @@ void* exec_thread(void* p) { | |
tp->time = 0; | |
tp->gets = 0; | |
tp->puts = 0; | |
+#ifdef __linux__ | |
tp->cpu = sched_getcpu(); | |
+#endif | |
size_t numkeys_inserted = (1 << power) * bucketsize * tp->load_start; | |
size_t numkeys_read = numkeys_inserted / nt; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment