#include "perf.h"
#include "util/util.h"
#include <subcmd/parse-options.h>
#include "builtin.h"
#include "bench/bench.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
Go to the source code of this file.
|
typedef int(* | bench_fn_t) (int argc, const char **argv) |
|
◆ for_each_bench
◆ for_each_collection
#define for_each_collection |
( |
|
coll | ) |
for (coll = collections; coll->name; coll++) |
◆ bench_fn_t
typedef int(* bench_fn_t) (int argc, const char **argv) |
◆ bench_str2int()
static int bench_str2int |
( |
const char * |
str | ) |
|
|
static |
◆ cmd_bench()
int cmd_bench |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
◆ dump_benchmarks()
static void dump_benchmarks |
( |
struct collection * |
coll | ) |
|
|
static |
◆ print_usage()
static void print_usage |
( |
void |
| ) |
|
|
static |
◆ run_all_collections()
static void run_all_collections |
( |
void |
| ) |
|
|
static |
◆ run_bench()
static int run_bench |
( |
const char * |
coll_name, |
|
|
const char * |
bench_name, |
|
|
bench_fn_t |
fn, |
|
|
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
|
static |
◆ run_collection()
static void run_collection |
( |
struct collection * |
coll | ) |
|
|
static |
◆ bench_format
◆ bench_format_str
const char* bench_format_str |
|
static |
◆ bench_options
const struct option bench_options[] |
|
static |
Initial value:= {
OPT_STRING(
'f',
"format", &
bench_format_str,
"default|simple",
"Specify the output formatting style"),
OPT_UINTEGER(
'r',
"repeat", &
bench_repeat,
"Specify amount of times to repeat the run"),
}
static const char * bench_format_str
unsigned int bench_repeat
Definition at line 113 of file builtin-bench.c.
◆ bench_repeat
unsigned int bench_repeat = 10 |
◆ bench_usage
const char* const bench_usage[] |
|
static |
Initial value:= {
"perf bench [<common options>] <collection> <benchmark> [<options>]",
NULL
}
Definition at line 119 of file builtin-bench.c.
◆ collections
Initial value:= {
{ "all", "All benchmarks", NULL },
{ NULL, NULL, NULL }
}
static struct bench futex_benchmarks[]
static struct bench mem_benchmarks[]
static struct bench sched_benchmarks[]
Definition at line 76 of file builtin-bench.c.
◆ futex_benchmarks
struct bench futex_benchmarks[] |
|
static |
Initial value:= {
{ "all", "Run all futex benchmarks", NULL },
{ NULL, NULL, NULL }
}
int bench_futex_wake_parallel(int argc, const char **argv)
int bench_futex_hash(int argc, const char **argv)
int bench_futex_lock_pi(int argc, const char **argv)
int bench_futex_requeue(int argc, const char **argv)
int bench_futex_wake(int argc, const char **argv)
Definition at line 59 of file builtin-bench.c.
◆ mem_benchmarks
struct bench mem_benchmarks[] |
|
static |
Initial value:= {
{ "all", "Run all memory access benchmarks", NULL },
{ NULL, NULL, NULL }
}
int bench_mem_memcpy(int argc, const char **argv)
int bench_mem_memset(int argc, const char **argv)
Definition at line 52 of file builtin-bench.c.
◆ sched_benchmarks
struct bench sched_benchmarks[] |
|
static |
Initial value:= {
{ "all", "Run all scheduler benchmarks", NULL },
{ NULL, NULL, NULL }
}
int bench_sched_pipe(int argc, const char **argv)
int bench_sched_messaging(int argc, const char **argv)
Definition at line 45 of file builtin-bench.c.