#include <string.h>
#include <pthread.h>
#include <signal.h>
#include "../util/stat.h"
#include <subcmd/parse-options.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <errno.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>
#include <stdlib.h>
#include <sys/time.h>
Go to the source code of this file.
◆ bench_futex_lock_pi()
int bench_futex_lock_pi |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
◆ create_threads()
static void create_threads |
( |
struct worker * |
w, |
|
|
pthread_attr_t |
thread_attr, |
|
|
struct cpu_map * |
cpu |
|
) |
| |
|
static |
◆ 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_lock_pi_usage
const char* const bench_futex_lock_pi_usage[] |
|
static |
Initial value:= {
"perf bench futex lock-pi <options>",
NULL
}
Definition at line 53 of file futex-lock-pi.c.
◆ done
◆ fshared
◆ futex_flag
◆ global_futex
u_int32_t global_futex = 0 |
|
static |
◆ multi
◆ 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_BOOLEAN(
'M',
"multi", &
multi,
"Use multiple futexes"),
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 nthreads
static unsigned int nsecs
Definition at line 44 of file futex-lock-pi.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 |
◆ worker