Skip to content
Snippets Groups Projects
  1. Feb 27, 2014
  2. Jan 23, 2014
  3. Jan 15, 2014
    • Mark Rutland's avatar
      perf: tools: Fix cross building · a8a5cd8b
      Mark Rutland authored
      
      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: default avatarMark 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.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a8a5cd8b
  4. Jan 13, 2014
  5. Dec 23, 2013
  6. Dec 10, 2013
  7. Dec 04, 2013
    • Jiri Olsa's avatar
      perf tools: Add build and install plugins targets · 3d7c0144
      Jiri Olsa authored
      
      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: default avatarJiri 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.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3d7c0144
    • Jiri Olsa's avatar
      perf tools: Remove stackprotector feature check · e6d7cee1
      Jiri Olsa authored
      
      We use -fstack-protector-all option to enable stack protecting for all
      available functions. There's no reason for enabling -Wstack-protector to
      get warning for unprotected functions.
      
      Removing stackprotector feature check which was used to enable the
      -Wstack-protector option.
      
      Signed-off-by: default avatarJiri 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-2-git-send-email-jolsa@redhat.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e6d7cee1
  8. Dec 02, 2013
  9. Nov 14, 2013
    • Ingo Molnar's avatar
      tools/perf/build: Fix feature-libunwind-debug-frame handling · e310718d
      Ingo Molnar authored
      
      Set feature-libunwind-debug-frame. We don't want it in
      CORE_FEATURE_TESTS because it's not the generic case, but we
      need to set it in the !feature-libunwind case.
      
      Also, because x86 distributions typically don't have
      dwarf_find_debug_frame() unwinding method:
      
        test-libunwind-debug-frame.c:(.text+0x31): undefined reference to `_Ux86_64_dwarf_find_debug_frame'
      
      Restrict this new API to ARM for the time being.
      
      With this patch test-all.c works again, so repeat perf builds
      are  fast again:
      
        comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
        [...]
      
             0,452899660 seconds time elapsed                                          ( +-  0,11% )
      
      While with before it was:
      
        comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
        [...]
      
             1,674001829 seconds time elapsed                                          ( +-  0,16% )
      
      [ Includes fix to config/feature-checks/Makefile from Will Deacon. ]
      
      Tested-by: default avatarWill Deacon <will.deacon@arm.com>
      Tested-by: default avatarJean Pihet <jean.pihet@linaro.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/n/tip-scsoctqzmou3rpkixCHezy9e@git.kernel.org
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e310718d
    • Ingo Molnar's avatar
      tools/perf/build: Fix timerfd feature check · bb4c5500
      Ingo Molnar authored
      'feature_timerfd' is checked all the time and calculated explicitly,
      in a serial fashion. Add it to CORE_FEATURE_TESTS which causes it to
      be built in parallel, using the newfangled parallel build autodetection
      code.
      
      This shaves 137 msecs off the perf build time on my system, which
      speeds up the common case cached build by 43%:
      
      Before:
      
        comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
        [...]
               0,453771441 seconds time elapsed                                          ( +-  0,09% )
      
      After:
      
        comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
        [...]
               0,316290185 seconds time elapsed                                          ( +-  0,24% )
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/n/tip-bb92CmexihopoSyqnkqepvsy@git.kernel.org
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      bb4c5500
  10. Nov 05, 2013
  11. Nov 04, 2013
  12. Oct 23, 2013
  13. Oct 14, 2013
    • Ingo Molnar's avatar
      tools/perf/build: Remove the volatile-register-var feature check · 01287e2c
      Ingo Molnar authored
      
      Namhyung Kim noticed that the volatile-register-var feature check
      is superfluous:
      
       > The gcc manpage says this warning is enabled by -Wall, and we add -Wall
       > to CFLAGS before doing feature checks.  So all gcc versions that support
       > -Wvolatile-register-var enables it by default without this check and
       > older gcc versions will always fail the feature check.
      
      Remove it - this will further speed up feature checks.
      
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      01287e2c
    • Ingo Molnar's avatar
      tools/perf/build: Simplify the libelf logic · 5f36978c
      Ingo Molnar authored
      
      Ulrich Drepper and Namhyung Kim reported that the libelf logic in
      config/Makefile is duplicated in part.
      
      Remove the duplication, and also remove the now unused FLAGS_LIBELF
      variable.
      
      Reported-by: default avatarUlrich Drepper <drepper@gmail.com>
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5f36978c
    • Ingo Molnar's avatar
      tools/perf/build: Pass through DEBUG parameter · fcf92585
      Ingo Molnar authored
      
      Arnaldo reported that 'make DEBUG=1' does not work anymore.
      
      The reason is that 'Makefile' only passes it through to
      'Makefile.perf' via the environment, but 'Makefile.perf'
      checks that it's a command line option:
      
          ifeq ("$(origin DEBUG)", "command line")
            PERF_DEBUG = $(DEBUG)
          endif
      
      So pass it through properly, and also clean up DEBUG parameter
      handling while at it and fix a couple of annoyances:
      
       - DEBUG=0 used to be interpreted as 'debugging on'. Turn it
         into 'debugging off' instead.
      
       - Same was the case for 'DEBUG=' - turn that into debug-off
         as well.
      
       - Pass in just a clean, sanitized 'DEBUG' value and get rid of
         the intermediate, unnecessary PERF_DEBUG variable.
      
      Reported-by: default avatarArnaldo 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>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fcf92585
    • Jiri Olsa's avatar
      perf tools: Separate lbfd check out of NO_DEMANGLE condition · 3e6a147d
      Jiri Olsa authored
      
      We fail build with NO_DEMANGLE with missing -lbfd externals error.
      The reason is that we now use bfd code in srcline object:
        perf tools: Implement addr2line directly using libbfd
      
      So we need to check/add -lbfd always now.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@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: Arnaldo Carvalho de Melo <acme@redhat.com>
      3e6a147d
  14. Oct 11, 2013
  15. Oct 09, 2013
Loading