1. 24 2月, 2014 8 次提交
    • J
      perf tools: Add libdw DWARF post unwind support · 5ea84154
      Jiri Olsa 提交于
      Adding libdw DWARF post unwind support, which is part of
      elfutils-devel/libdw-dev package from version 0.158.
      
      The new code is contained in unwin-libdw.c object, and implements
      unwind__get_entries unwind interface function.
      
      New Makefile variable NO_LIBDW_DWARF_UNWIND was added to control its
      compilation, and is marked as disabled now.  It's factored with the rest
      of the Makefile unwind build code in the next patch.
      
      Arch specific code was added for x86.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392825179-5228-5-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5ea84154
    • J
      perf tools: Add feature check for libdw dwarf unwind · 45757895
      Jiri Olsa 提交于
      Adding feature check test code for libdw dwarf unwind.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392825179-5228-4-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      45757895
    • A
      perf tools: Warn the user about how to enable libunwind support · 7a0447d6
      Arnaldo Carvalho de Melo 提交于
      When one has libunwind installed somewhere the perf tools build process
      doesn't expects it to be, this happens:
      
        [acme@ssdandy linux]$ make O=/tmp/build/perf -C tools/perf/ install-bin
        make: Entering directory `/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j8' parallel build
        config/Makefile:312: No libunwind found, disabling post unwind support.  Please install libunwind-dev[el] >= 1.1
      
        Auto-detecting system features:
        <SNIP>
        ...                     libunwind: [ OFF ]
      
      Change the message so that it tells how to use a non-standard libunwind
      install directory:
      
        config/Makefile:312: No libunwind found, disabling post unwind support.  Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
      
        [acme@ssdandy linux]$ make LIBUNWIND_DIR=/opt/libunwind-git/ O=/tmp/build/perf -C tools/perf/ install-bin
        make: Entering directory `/home/acme/git/linux/tools/perf'
          BUILD:   Doing 'make -j8' parallel build
      
        Auto-detecting system features:
        <SNIP>
        ...                     libunwind: [ on  ]
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-huoxnou7sw85lm58k3pi1xhw@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7a0447d6
    • J
      perf tools: Add variable display for VF make output · 8d79076a
      Jiri Olsa 提交于
      Adding dump of interesting build directories to the make VF=1 output.
      
        $ make VF=1
          BUILD:   Doing 'make -j4' parallel build
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libunwind: [ on  ]
        ...                     backtrace: [ on  ]
        ...                fortify-source: [ on  ]
        ...                  gtk2-infobar: [ on  ]
        ...             libelf-getphdrnum: [ on  ]
        ...                   libelf-mmap: [ on  ]
        ...             libpython-version: [ on  ]
        ...                       on-exit: [ on  ]
        ...            stackprotector-all: [ on  ]
        ...                       timerfd: [ on  ]
        ...         libunwind-debug-frame: [ OFF ]
        ...                        bionic: [ OFF ]
      
        ...                        prefix: /home/jolsa
        ...                        bindir: /home/jolsa/bin
        ...                        libdir: /home/jolsa/lib64
        ...                    sysconfdir: /home/jolsa/etc
      
      Adding functions to print variable/text in features display -
      feature_print_var/feature_print_text (feature_print_text is used in next
      patches).
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392825179-5228-3-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8d79076a
    • J
      perf tools: Factor features display code · 0695e57b
      Jiri Olsa 提交于
      Currently the we display all detected features/libraries by following
      rules:
      
       - if one of the features is missing
       - if it's build from clean tree
      
      This patch changes changes this behavior in several ways.
      
      - We no longer display all detected features, only detected libraries
        are displayed by default:
      
        $ make
          BUILD:   Doing 'make -j4' parallel build
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libunwind: [ on  ]
      
        The assumption is, that above libraries are the most interesting part
      of the detection, while we don't care much about detection of on-exit
      support.
      
      - If all above libraries are detected, the default is not shown on
        subsequent builds.
      
      - If one of the above libraries is missing, the detection output is
        forced.
      
      - The features status is stored in PERF-FEATURES file and the detection
        output is forced in case the there's difference between the file
        contents and currently detected features.
      
      - If you want to see all detected features, you can use VF=1 make
        variable, that forces the detected features output.
      
        $ make VF=1
          BUILD:   Doing 'make -j4' parallel build
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ on  ]
        ...                      libaudit: [ on  ]
        ...                        libbfd: [ on  ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ on  ]
        ...                       libperl: [ on  ]
        ...                     libpython: [ on  ]
        ...                      libslang: [ on  ]
        ...                     libunwind: [ on  ]
        ...                     backtrace: [ on  ]
        ...                fortify-source: [ on  ]
        ...                  gtk2-infobar: [ on  ]
        ...             libelf-getphdrnum: [ on  ]
        ...                   libelf-mmap: [ on  ]
        ...             libpython-version: [ on  ]
        ...                       on-exit: [ on  ]
        ...            stackprotector-all: [ on  ]
        ...                       timerfd: [ on  ]
        ...         libunwind-debug-frame: [ OFF ]
        ...                        bionic: [ OFF ]
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392825179-5228-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0695e57b
    • J
      perf tools: Fix bison OUTPUT directories dependency · da237ed0
      Jiri Olsa 提交于
      The bison and flex C objects don't have dependency for creating output
      directories.
      
      This could lead to build failure if the one of those objects is picked
      up by make to be build as the first one (reported by Arnaldo).
      
      Also following make fails:
        $ rm -rf /tmp/krava; mkdir /tmp/krava; make O=/tmp/krava util/pmu-bison.o
        BUILD:   Doing 'make -j4' parallel build
        [ SNIP ]
        BISON    /tmp/krava/util/pmu-bison.c
        FLAGS:   * new build flags or prefix
      bison: /tmp/krava/util/pmu-bison.output: cannot open: No such file or directory
      make[1]: *** [/tmp/krava/util/pmu-bison.c] Error 1
      make[1]: *** Waiting for unfinished jobs....
      make: *** [util/pmu-bison.o] Error 2
      
      Adding bison objects dependency for output directories (flex objects
      depends on bisons').
      
      This fixies the make_util_pmu_bison_o_O make test.
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392805300-14610-3-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      da237ed0
    • J
      perf tests: Add pmu-bison.o make test · 2a94f6c4
      Jiri Olsa 提交于
      Adding pmu-bison.o make test:
      
        $ make -f tests/make make_util_pmu_bison_o
        - make_util_pmu_bison_o: cd . && make -f Makefile DESTDIR=/tmp/tmp.0u99hQn8Ga util/pmu-bison.o
        $ make -f tests/make make_util_pmu_bison_o_O
        - make_util_pmu_bison_o_O: cd . && make -f Makefile O=/tmp/tmp.sWKDLGS71O DESTDIR=/tmp/tmp.htQNJAfJ0d util/pmu-bison.o
        make: *** [make_util_pmu_bison_o_O] Error 1
      
      The 'O=' version of the test is failing at the moment, due to the OUTPUT
      directory issue fixed in next patch.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392805300-14610-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2a94f6c4
    • J
      perf tests: Fix *.o make tests · 04b01a1d
      Jiri Olsa 提交于
      Enable and fix *.o object make tests. Following tests are now available:
      
        $ make -f tests/make make_perf_o_O
        - make_perf_o_O: cd . && make -f Makefile O=/tmp/tmp.iF5vI5emGy DESTDIR=/tmp/tmp.epDPFVhH0s perf.o
        $ make -f tests/make make_util_map_o_O
        - make_util_map_o_O: cd . && make -f Makefile O=/tmp/tmp.BWuMf55ygC DESTDIR=/tmp/tmp.QbGBRF95oP util/map.o
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1392805300-14610-1-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      04b01a1d
  2. 23 2月, 2014 1 次提交
    • I
      Merge tag 'perf-core-for-mingo' of... · 7e74efcf
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User Visible:
      
        * Allow setting preferred callchain method in .perfconfig (Jiri Olsa)
      
        * Show in what binaries/modules 'perf probe's are set (Masami Hiramatsu)
      
        * Support distro-style debuginfo for uprobe in 'perf probe' (Masami Hiramatsu)
      
      Developer stuff:
      
        * Move some hashing and fs related code from tools/perf/util/
          to tools/lib/ so that it can be used by more tools/ living
          utilities (Borislav Petkov)
      
        * Prepare DWARF unwinding code for using an elfutils alternative
          unwinding library (Jiri Olsa)
      
        * Fix DWARF unwind max_stack processing (Jiri Olsa)
      
        * Add dwarf unwind 'perf test' entry (Jiri Olsa)
      
        * 'perf probe' improvements including memory leak fixes,
          sharing the intlist class with other tools, uprobes/kprobes
          code sharing and use of ref_reloc_sym (Masami Hiramatsu)
      
        * Shorten sample symbol resolving by adding cpumode to
          struct addr_location (Arnaldo Carvalho de Melo)
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      7e74efcf
  3. 22 2月, 2014 9 次提交
  4. 18 2月, 2014 22 次提交