#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 <linux/time64.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_wake()
int bench_futex_wake |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
◆ block_threads()
static void block_threads |
( |
pthread_t * |
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 |
__maybe_unused | ) |
|
|
static |
◆ bench_futex_wake_usage
const char* const bench_futex_wake_usage[] |
|
static |
Initial value:= {
"perf bench futex wake <options>",
NULL
}
Definition at line 56 of file futex-wake.c.
◆ done
◆ fshared
◆ futex1
◆ futex_flag
◆ ncpus
◆ nthreads
unsigned int nthreads = 0 |
|
static |
◆ nwakes
◆ options
Initial value:= {
OPT_UINTEGER(
't',
"threads", &
nthreads,
"Specify amount of threads"),
OPT_UINTEGER(
'w',
"nwakes", &
nwakes,
"Specify amount of threads to wake at once"),
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 nwakes
static unsigned int nthreads
Definition at line 48 of file futex-wake.c.
◆ 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 |
◆ wakeup_stats
struct stats waketime_stats wakeup_stats |
|
static |
◆ worker