aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/bench/futex-hash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
index 8024cd5febd2..d9e5e80bb4d0 100644
--- a/tools/perf/bench/futex-hash.c
+++ b/tools/perf/bench/futex-hash.c
@@ -39,12 +39,15 @@ static unsigned int threads_starting;
39static struct stats throughput_stats; 39static struct stats throughput_stats;
40static pthread_cond_t thread_parent, thread_worker; 40static pthread_cond_t thread_parent, thread_worker;
41 41
42#define SMP_CACHE_BYTES 256
43#define __cacheline_aligned __attribute__ ((aligned (SMP_CACHE_BYTES)))
44
42struct worker { 45struct worker {
43 int tid; 46 int tid;
44 u_int32_t *futex; 47 u_int32_t *futex;
45 pthread_t thread; 48 pthread_t thread;
46 unsigned long ops; 49 unsigned long ops;
47}; 50} __cacheline_aligned;
48 51
49static const struct option options[] = { 52static const struct option options[] = {
50 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 53 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),