• Jin Yao's avatar
    perf tools: Add 'perf -vv' as an alias to 'perf version --build-options' · 3aa94b10
    Jin Yao authored
    We keep having bug reports that when users build perf on their own, but
    they don't install some needed libraries such as libelf,
    libbfd/libibery.
    
    The perf can build, but it is missing important functionality.
    
    This patch provides a new option '-vv' for perf which will print the
    compiled-in status of libraries.
    
    The 'perf -vv' is mapped to 'perf version --build-options'.
    
    For example:
    
    $ ./perf -vv
    
    perf version 4.13.rc5.g6727c5
                     dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
        dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                     glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                      gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
                  libaudit: [ OFF ]  # HAVE_LIBAUDIT_SUPPORT
                    libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                    libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
                   libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
    numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
                   libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
                 libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
                  libslang: [ on  ]  # HAVE_SLANG_SUPPORT
                 libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
                 libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
        libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                      zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                      lzma: [ on  ]  # HAVE_LZMA_SUPPORT
                 get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                       bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
    
    v3:
    
    One bug is found in v2. It didn't process the option like '-vabc'
    correctly. Fix this bug.
    
    v2:
    
    Use a global variable version_verbose to record the number of 'v'.
    Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jin Yao <yao.jin@intel.com>
    Cc: Kan Liang <kan.liang@intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1522402036-22915-6-git-send-email-yao.jin@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    3aa94b10
perf.h 2.15 KB