5 #include <linux/compiler.h> 6 #include <tools/config.h> 9 #include <subcmd/parse-options.h> 21 "display the build options"),
25 "perf version [<options>]",
33 if (!strcmp(status,
"OFF"))
44 printf(
"%22s: ", name);
46 printf(
" # %s\n", macro);
49 #define STATUS(__d, __m) \ 51 if (IS_BUILTIN(__d)) \ 52 status_print(#__m, #__d, "on"); \ 54 status_print(#__m, #__d, "OFF"); \ 59 STATUS(HAVE_DWARF_SUPPORT, dwarf);
60 STATUS(HAVE_DWARF_GETLOCATIONS_SUPPORT, dwarf_getlocations);
61 STATUS(HAVE_GLIBC_SUPPORT, glibc);
62 STATUS(HAVE_GTK2_SUPPORT, gtk2);
63 #ifndef HAVE_SYSCALL_TABLE_SUPPORT 64 STATUS(HAVE_LIBAUDIT_SUPPORT, libaudit);
66 STATUS(HAVE_SYSCALL_TABLE_SUPPORT, syscall_table);
67 STATUS(HAVE_LIBBFD_SUPPORT, libbfd);
68 STATUS(HAVE_LIBELF_SUPPORT, libelf);
69 STATUS(HAVE_LIBNUMA_SUPPORT, libnuma);
70 STATUS(HAVE_LIBNUMA_SUPPORT, numa_num_possible_cpus);
71 STATUS(HAVE_LIBPERL_SUPPORT, libperl);
72 STATUS(HAVE_LIBPYTHON_SUPPORT, libpython);
73 STATUS(HAVE_SLANG_SUPPORT, libslang);
74 STATUS(HAVE_LIBCRYPTO_SUPPORT, libcrypto);
75 STATUS(HAVE_LIBUNWIND_SUPPORT, libunwind);
76 STATUS(HAVE_DWARF_SUPPORT, libdw-dwarf-unwind);
77 STATUS(HAVE_ZLIB_SUPPORT, zlib);
78 STATUS(HAVE_LZMA_SUPPORT, lzma);
80 STATUS(HAVE_LIBBPF_SUPPORT, bpf);
86 PARSE_OPT_STOP_AT_NON_OPTION);
int color_fprintf(FILE *fp, const char *color, const char *fmt,...)
const char perf_version_string[]
static void on_off_print(const char *status)
static struct option version_options[]
static void status_print(const char *name, const char *macro, const char *status)
int cmd_version(int argc, const char **argv)
static void library_status(void)
static const char *const version_usage[]