1. 24 2月, 2014 4 次提交
    • J
      perf tools: Setup default dwarf post unwinder · 0a4f2b6a
      Jiri Olsa 提交于
      Factor NO_LIBDW_DWARF_UNWIND makefile variable and code that selects
      default DWARf post unwinder based on detected features (libdw and
      libunwind support)
      
      If both are detected the libunwind is selected as default.  Simple
      'make' will try to add:
      
        - libunwind unwinder if present
        - libdw unwinder if present
        - disable dwarf unwind if non of libunwind and libdw
          libraries are present
      
      If one of the DWARF unwind libraries is detected, message is displayed
      which one (libunwind/libdw) is compiled in.
      
      Examples:
        - compile in libdw unwinder if present:
      
          $ make NO_LIBUNWIND=1
      
        - compile in libdw (with libdw installation directory) unwinder if present:
      
          $ make LIBDW_DIR=/opt/elfutils/ NO_LIBUNWIND=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  ]
          ...            libdw-dwarf-unwind: [ on  ]
          ...     DWARF post unwind library: libdw
      
        - disable post dwarf unwind completely:
      
          $ make NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=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  ]
          ...            libdw-dwarf-unwind: [ on  ]
          ...     DWARF post unwind library: libunwind
      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-6-git-send-email-jolsa@redhat.com
      [ Add suggestion about setting LIBDW_DIR when not finding libdw ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0a4f2b6a
    • 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: 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
  2. 18 2月, 2014 6 次提交
  3. 16 1月, 2014 1 次提交
    • M
      perf: tools: Fix cross building · a8a5cd8b
      Mark Rutland 提交于
      Currently the feature-checks Makefile does not inherit $(CC), and calls
      cc rather than $(CROSS_COMPILE)gcc. Thus the feature checks invoke the
      native toolchain rather than the cross toolchain, and can identify
      features as available when they are not. This can break the build.
      
      Additionally the native pkg-config is always called as opposed to
      $(CROSS_COMPILE)pkg-config, so the wrong flags and paths may be passed
      to the cross compiler.
      
      This patch passes CROSS_COMPILE down to the feature-checks Makefile, and
      forces its use. Additionally pkg-config is replaced with
      $(CROSS_COMPILE)pkg-config via a new $(PKG_CONFIG) variable. This patch
      has been build tested on x86_64 and arm.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: http://lkml.kernel.org/r/1389782648-4417-4-git-send-email-mark.rutland@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a8a5cd8b
  4. 13 1月, 2014 2 次提交
  5. 26 12月, 2013 1 次提交
  6. 17 12月, 2013 1 次提交
    • B
      tools/: Convert to new topic libraries · 553873e1
      Borislav Petkov 提交于
      Move debugfs.* to api/fs/. We have a common tools/lib/api/ place where
      the Makefile lives and then we place the headers in subdirs.
      
      For example, all the fs-related stuff goes to tools/lib/api/fs/ from
      which we get libapikfs.a (acme got almost the naming he wanted :-)) and
      we link it into the tools which need it - in this case perf and
      tools/vm/page-types.
      
      acme:
      
      "Looking at the implementation, I think some tools can even link
      directly to the .o files, avoiding the .a file altogether.
      
      But that is just an optimization/finer granularity tools/lib/
      cherrypicking that toolers can make use of."
      
      Fixup documentation cleaning target while at it.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <rric@kernel.org>
      Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386605664-24041-2-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      553873e1
  7. 13 12月, 2013 1 次提交
  8. 05 12月, 2013 3 次提交
    • J
      tools/perf/build: Fix install dependency · 78979079
      Jiri Olsa 提交于
      The traceevents-plugins install targets needs a proper dependency,
      otherwise it might be executed prematurely and in parallel to an
      actual build.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/n/tip-rvlbzena4ovzgqiPm6teBofz@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      78979079
    • J
      perf tools: Add trace-event object · 29f5ffd3
      Jiri Olsa 提交于
      Add trace-event object to keep together 'struct pevent' object with its
      loaded plugins with following interface:
      
      int trace_event__init(struct trace_event *t);
      
        - Initalizes 'struct pevent' object and loads plugins for it
      
      void trace_event__cleanup(struct trace_event *t);
      
        - Cleanups both 'struct pevent' and plugins
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-10-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      29f5ffd3
    • J
      perf tools: Add build and install plugins targets · 3d7c0144
      Jiri Olsa 提交于
      Adding 'plugins' target along with the libtraceevent.a, so plugins are
      built together with traceevent library.
      
      Adding 'install-traceevent-plugins' Makefile install target, instructing
      perf to install plugins into:
      
        $(HOME)/.traceevent/plugins
          - If installed localy under $HOME
      
        $(DESTDIR)/$(prefix)/$(libdir)/traceevent/plugins
          - If installed globally
      
      Examples:
        $ make install
        ...
        $ find ~/.traceevent/plugins/
        /home/jolsa/.traceevent/plugins/
        /home/jolsa/.traceevent/plugins/plugin_mac80211.so
        /home/jolsa/.traceevent/plugins/plugin_kvm.so
        /home/jolsa/.traceevent/plugins/plugin_scsi.so
        /home/jolsa/.traceevent/plugins/plugin_sched_switch.so
        /home/jolsa/.traceevent/plugins/plugin_xen.so
        /home/jolsa/.traceevent/plugins/plugin_cfg80211.so
        /home/jolsa/.traceevent/plugins/plugin_function.so
        /home/jolsa/.traceevent/plugins/plugin_kmem.so
        /home/jolsa/.traceevent/plugins/plugin_hrtimer.so
        /home/jolsa/.traceevent/plugins/plugin_jbd2.so
      
        $ sudo make install DESTDIR=/opt/perf/
        ...
        $ find /opt/perf/lib64/traceevent/plugins/
        /opt/perf/lib64/traceevent/plugins/
        /opt/perf/lib64/traceevent/plugins/plugin_kvm.so
        /opt/perf/lib64/traceevent/plugins/plugin_scsi.so
        /opt/perf/lib64/traceevent/plugins/plugin_mac80211.so
        /opt/perf/lib64/traceevent/plugins/plugin_hrtimer.so
        /opt/perf/lib64/traceevent/plugins/plugin_kmem.so
        /opt/perf/lib64/traceevent/plugins/plugin_jbd2.so
        /opt/perf/lib64/traceevent/plugins/plugin_sched_switch.so
        /opt/perf/lib64/traceevent/plugins/plugin_function.so
        /opt/perf/lib64/traceevent/plugins/plugin_cfg80211.so
        /opt/perf/lib64/traceevent/plugins/plugin_xen.so
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-8-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3d7c0144
  9. 28 11月, 2013 1 次提交
  10. 06 11月, 2013 1 次提交
  11. 04 11月, 2013 3 次提交
  12. 24 10月, 2013 1 次提交
  13. 22 10月, 2013 1 次提交
  14. 11 10月, 2013 5 次提交
    • I
      perf tools: Implement summary output for 'make install' · 8a5411e9
      Ingo Molnar 提交于
      'make install' used to show all the install lines, which is way too
      verbose to be really informative to the user.
      
      Implement summary output instead:
      
        comet:~/tip/tools/perf> make install
          BUILD:   Doing 'make -j12' parallel build
          SUBDIR   Documentation
          INSTALL  Documentation-man
          INSTALL  binaries
          INSTALL  libexec
          INSTALL  perf-archive
          INSTALL  perl-scripts
          INSTALL  python-scripts
          INSTALL  bash_completion-script
          INSTALL  tests
      
      'make install V=1' will still show the old, detailed output.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Link: http://lkml.kernel.org/r/1381312169-17354-5-git-send-email-mingo@kernel.org
      [ Fixed conflict with libperf-gtk patches in acme/perf/core, cope with 'trace' alias ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8a5411e9
    • I
      tools: Harmonize the various build messages in perf, lib-traceevent, lib-lk · 65fb0992
      Ingo Molnar 提交于
      The various build lines from libtraceevent and perf mix up during a
      parallel build and produce unaligned output like:
      
          CC builtin-buildid-list.o
          CC builtin-buildid-cache.o
          CC builtin-list.o
        CC FPIC            trace-seq.o
          CC builtin-record.o
        CC FPIC            parse-filter.o
          CC builtin-report.o
          CC builtin-stat.o
        CC FPIC            parse-utils.o
        CC FPIC            kbuffer-parse.o
          CC builtin-timechart.o
          CC builtin-top.o
          CC builtin-script.o
        BUILD STATIC LIB   libtraceevent.a
          CC builtin-probe.o
          CC builtin-kmem.o
          CC builtin-lock.o
      
      To solve this, harmonize all the build message alignments to be similar
      to the kernel's kbuild output: prefixed by two spaces and 11-char wide.
      
      After the patch the output looks pretty tidy, even if output lines get
      mixed up:
      
        CC      builtin-annotate.o
        FLAGS:  * new build flags or cross compiler
        CC      builtin-bench.o
        AR      liblk.a
        CC      bench/sched-messaging.o
        CC FPIC event-parse.o
        CC      bench/sched-pipe.o
        CC FPIC trace-seq.o
        CC      bench/mem-memcpy.o
        CC      bench/mem-memset.o
        CC FPIC parse-filter.o
        CC      builtin-diff.o
        CC      builtin-evlist.o
        CC      builtin-help.o
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1381312169-17354-3-git-send-email-mingo@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      65fb0992
    • I
      perf tools: Implement summary output for 'make clean' · 8ec19c0e
      Ingo Molnar 提交于
      'make clean' used to show all the rm lines, which isn't really
      informative in any way and spams the console.
      
      Implement summary output:
      
        comet:~/tip/tools/perf> make clean
         CLEAN libtraceevent
         CLEAN liblk
         CLEAN config
         CLEAN core-objs
         CLEAN core-progs
         CLEAN core-gen
         CLEAN Documentation
         CLEAN python
      
      'make clean V=1' will still show the old, detailed output.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1381312169-17354-2-git-send-email-mingo@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8ec19c0e
    • I
      perf tools: Fix redirection printouts · cee972c0
      Ingo Molnar 提交于
      Fix the duplicate util/util printout Arnaldo reported:
      
             $ make V=1 O=/tmp/build/perf -C tools/perf/ util/srcline.o
         ...
             # Redirected target util/srcline.o =>     /tmp/build/perf/util/util/srcline.o
      Reported-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20131010054256.GA23716@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cee972c0
    • A
      perf trace: Add 'trace' alias to 'perf trace' · b52bc234
      Arnaldo Carvalho de Melo 提交于
      Make 'perf trace' more accessible by aliasing it to just 'trace':
      
        [root@zoo linux]# trace --duration 15 -a -e futex sleep 1
         110.092 (16.188 ms): libvirtd/1166 futex(uaddr: 0x185b344, op: WAIT|PRIV, val: 174293                    ) = 0
         110.101 (15.903 ms): libvirtd/1171 futex(uaddr: 0x185b3dc, op: WAIT|PRIV, val: 139265                    ) = 0
         111.594 (15.776 ms): libvirtd/1165 futex(uaddr: 0x185b344, op: WAIT|PRIV, val: 174295                    ) = 0
         111.610 (15.969 ms): libvirtd/1169 futex(uaddr: 0x185b3dc, op: WAIT|PRIV, val: 139267                    ) = 0
         113.556 (16.216 ms): libvirtd/1168 futex(uaddr: 0x185b3dc, op: WAIT|PRIV, val: 139269                    ) = 0
         291.265 (199.508 ms): chromium-brows/15830 futex(uaddr: 0x7fff2986bcb4, op: WAIT_BITSET|PRIV|CLKRT, val: 1, utime: 0x7fff2986bab0, val3: 4294967295) = -1 ETIMEDOUT Connection timed out
           360.354 (69.053 ms): chromium-brows/15830 futex(uaddr: 0x7fff2986bcb4, op: WAIT_BITSET|PRIV|CLKRT, val: 1, utime: 0x7fff2986bab0, val3: 4294967295) = -1 ETIMEDOUT Connection timed out
        [root@zoo linux]#
      
      I.e. looking for futex calls that take at least 15ms, system wide, during a one
      second window. Now to get callchains into 'trace' to figure out what are those
      locks :-)
      Requested-by: NIngo Molnar <mingo@kernel.org>
      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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-ch4smqz8b5fmgrte7c5e4fuw@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b52bc234
  15. 10 10月, 2013 2 次提交
  16. 09 10月, 2013 5 次提交
    • I
      tools/perf/build: Fix O=/some/dir perf.o type of targets · 1f7c645a
      Ingo Molnar 提交于
      If someone specifies a single target, mixed with O=, the following way:
      
          hubble:~/tip/tools/perf> make O=/tmp/perf util/stat.o
          BUILD: Doing 'make -j8' parallel build
          gcc  -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k [...]
      
      The build might even fail, if a target depends on other targets:
      
          hubble:~/tip/tools/perf> make O=/tmp/perf perf.o
          ...
          perf.c: In function ‘handle_options’:
          perf.c:155:21: error: ‘PERF_HTML_PATH’ undeclared (first use in this function)
      
      The correct way to invoke such targets is:
      
          hubble:~/tip/tools/perf> make O=/tmp/perf /tmp/perf/perf.o
          BUILD: Doing 'make -j8' parallel build
          GEN /tmp/perf/common-cmds.h
          CC /tmp/perf/perf.o
      
      But that's unnecessary typing and it's also easy to mistakenly build into the
      source directory.
      
      To fix this remove the generic suffix rules and add redirection to $(OUTPUT)
      for the most popular .o targets.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-mk0oiukmhgSbrll6chrPkkqr@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      1f7c645a
    • I
      tools/perf/build: Flip Makefile.parallel and Makefile.perf · bd69cc28
      Ingo Molnar 提交于
      To make it more apparent that there is not change in functionality we introduced
      Makefile.parallel separately and now flip it with the main Makefile, which
      moves into Makefile.perf.
      
      The renames are:
      
         Makefile.parallel => Makefile
         Makefile          => Makefile.perf
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-igRfuw9ugbnnpixLd6wpptzl@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      bd69cc28
    • I
      tools/perf/build: Invoke feature-checks 'clean' target from the main Makefile · de0f03fb
      Ingo Molnar 提交于
      config/Makefile is not included for the 'clean' target, so invoke the
      config/feature-checks/Makefile 'clean' target from Makefile.perf.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-sh2cGvmsjbrazarlqre7pVwt@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      de0f03fb
    • I
      tools/perf/build: Speed up the final link · c9404c66
      Ingo Molnar 提交于
      libtraceevent.a and liblk.a rules have always-missed dependencies,
      which causes python.so to be relinked at every build attempt - even
      if none of the affected code changes.
      
      This slows down re-builds unnecessarily, by adding more than a second
      to the build time:
      
        comet:~/tip/tools/perf> time make
      
        ...
      
          SUBDIR /fast/mingo/tip/tools/lib/lk/
          make[1]: `liblk.a' is up to date.
          SUBDIR /fast/mingo/tip/tools/lib/traceevent/
          LINK perf
          GEN python/perf.so
      
        real    0m1.701s
        user    0m1.338s
        sys     0m0.301s
      
      Add the (trivial) dependencies to not force a re-link.
      
      This speeds up an empty re-build enormously:
      
        comet:~/tip/tools/perf> time make
      
        ...
      
        real    0m0.207s
        user    0m0.134s
        sys     0m0.028s
      
      [ This adds some coupling between the build dependencies of
        libtraceevent and liblk - but until those stay relatively
        simple this should not be an issue. ]
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-wvmlrurufuk6mo1ovtNigguT@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c9404c66
    • I
      tools/perf/build: Speed up git-version test on re-make · c72e3f04
      Ingo Molnar 提交于
      util/PERF-VERSION-GEN is currently executed on every build attempt,
      and this script can take a lot of time on trees that are at a
      significant git-distance from Linus's tree:
      
        $ time util/PERF-VERSION-GEN
      
        real    0m4.343s
        user    0m4.176s
        sys     0m0.140s
      
      It also takes a lot of time if the Git repository is network attached, etc.,
      because the commands it uses:
      
              TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null )
      
      has to count commits from the nearest tag and thus has to access (and
      decompress) every git commit blob on the relevant version path.
      
      Even on Linus's tree it takes 0.28 seconds on a fast box to count all the
      commits and get the git version string:
      
        $ time util/PERF-VERSION-GEN
      
        real    0m0.279s
        user    0m0.247s
        sys     0m0.025s
      
      But the version string only has to be regenerated if the git repository's
      head commit changes. So add a dependency of ../../.git/HEAD and touch
      the file every time it's regenerated, so that Make's build rules can
      pick it up and cache the result:
      
        make: `PERF-VERSION-FILE' is up to date.
      
        real    0m0.184s
        user    0m0.117s
        sys     0m0.026s
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-wvmlrurufuk6mo1ovtNigguT@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c72e3f04
  17. 05 10月, 2013 1 次提交
  18. 06 9月, 2013 1 次提交