19 static struct option set_opts[] = {
20 { .name =
"perf-bias", .has_arg = optional_argument, .flag =
NULL, .val =
'b'},
21 { .name =
"sched-mc", .has_arg = optional_argument, .flag =
NULL, .val =
'm'},
22 { .name =
"sched-smt", .has_arg = optional_argument, .flag =
NULL, .val =
's'},
26 static void print_wrong_arg_exit(
void)
28 printf(
_(
"invalid or unknown argument\n"));
35 extern int optind, opterr, optopt;
48 setlocale(LC_ALL,
"");
52 while ((ret = getopt_long(argc, argv,
"msb", set_opts,
NULL)) != -1) {
56 print_wrong_arg_exit();
61 print_wrong_arg_exit();
66 print_wrong_arg_exit();
70 print_wrong_arg_exit();
83 printf(
_(
"System's multi core scheduler setting: "));
92 printf(
_(
"System's thread sibling scheduler setting: "));
107 printf(
_(
"Intel's performance bias setting needs root privileges\n"));
109 printf(
_(
"System does not support Intel's performance"
123 printf(
_(
"analyzing CPU %d:\n"), cpu);
126 ret = msr_intel_get_perf_bias(cpu);
128 printf(
_(
"Could not read perf-bias value\n"));
131 printf(
_(
"perf-bias: %d\n"), ret);