#include <string.h>
#include <pthread.h>
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <sys/time.h>
#include "../util/stat.h"
#include <subcmd/parse-options.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>
Go to the source code of this file.
◆ bench_futex_hash()
int bench_futex_hash |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
◆ print_summary()
static void print_summary |
( |
void |
| ) |
|
|
static |
◆ toggle_done()
static void toggle_done |
( |
int sig |
__maybe_unused, |
|
|
siginfo_t *info |
__maybe_unused, |
|
|
void *uc |
__maybe_unused |
|
) |
| |
|
static |
◆ workerfn()
static void* workerfn |
( |
void * |
arg | ) |
|
|
static |
◆ bench_futex_hash_usage
const char* const bench_futex_hash_usage[] |
|
static |
Initial value:= {
"perf bench futex hash <options>",
NULL
}
Definition at line 60 of file futex-hash.c.
◆ done
◆ fshared
◆ futex_flag
◆ nfutexes
unsigned int nfutexes = 1024 |
|
static |
◆ nsecs
◆ nthreads
unsigned int nthreads = 0 |
|
static |
◆ options
Initial value:= {
OPT_UINTEGER(
't',
"threads", &
nthreads,
"Specify amount of threads"),
OPT_UINTEGER(
'r',
"runtime", &
nsecs,
"Specify runtime (in seconds)"),
OPT_UINTEGER(
'f',
"futexes", &
nfutexes,
"Specify amount of futexes per threads"),
OPT_BOOLEAN(
's',
"silent", &
silent,
"Silent mode: do not display data/details"),
OPT_BOOLEAN(
'S',
"shared", &
fshared,
"Use shared futexes instead of private ones"),
}
static unsigned int nfutexes
static unsigned int nthreads
static unsigned int nsecs
Definition at line 51 of file futex-hash.c.
◆ runtime
struct timeval start end runtime |
◆ silent
◆ thread_lock
pthread_mutex_t thread_lock |
|
static |
◆ thread_parent
pthread_cond_t thread_parent |
|
static |
◆ thread_worker
pthread_cond_t thread_worker |
|
static |
◆ threads_starting
unsigned int threads_starting |
|
static |
◆ throughput_stats
struct stats throughput_stats |
|
static |