1. 02 Aug, 2012 2 commits
  2. 01 Aug, 2012 7 commits
  3. 30 Jul, 2012 14 commits
  4. 26 Jul, 2012 7 commits
  5. 25 Jul, 2012 10 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 045e7e60
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo:
      
       * libtraceevent build fixes from Namhyung Kim
      
       * Prevent overflow when calculating annotation buckets size, from Cody Schafer
      
       * Set breakpoint events sample period to 1, just like trace events, from Jovi Zhang
      
       * Fix strerror_r usage, from Kirill Shutemov
      
       * Fix duplicate function declaration problems with bison 2.6, from Kirill Shutemov
      
       * Add DSO caching facility (and perf test entry) to speed up binary file
         reading, will be used by the DWARF unwind code, from Jiri Olsa
      
       * Fix trace event storms by setting PERF_SAMPLE_PERIOD, from Frederic Weisbecker
      
       * perf kvm fixes from David Ahern
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      045e7e60
    • Cody Schafer's avatar
      perf annotate: Prevent overflow in size calculation · 8696329b
      Cody Schafer authored
      A large enough symbol size causes an overflow in the size parameter to
      the histogram allocation, leading to a segfault in
      symbol__inc_addr_samples later on when this histogram is accessed.
      
      In the case of being called via perf-report, this returns back and
      gracefully ignores the sample, eventually ignoring the chained return
      value of perf_session_deliver_event in flush_sample_queue.
      Signed-off-by: default avatarCody Schafer <cody@linux.vnet.ibm.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1342753525-4521-1-git-send-email-cody@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8696329b
    • Namhyung Kim's avatar
      tools lib traceevent: Ignore TRACEEVENT-CFLAGS file · 52f18a2f
      Namhyung Kim authored
      The TRACEEVENT-CFLAGS file is used to detect any change on compiler
      flags. Just ignore it.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1341559297-25725-3-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      52f18a2f
    • Namhyung Kim's avatar
      tools lib traceevent: Detect build environment changes · 52b5c0d4
      Namhyung Kim authored
      Cross compiling perf requires setting ARCH and CROSS_COMPILE variables,
      but libtraceevent couldn't detect the changes so it ends up believing no
      recompiling is required. Thus the linker failed like:
      
           LINK perf
       ../lib/traceevent//libtraceevent.a: member ../lib/traceevent//libtraceevent.a(event-parse.o) in archive is not an object
       collect2: ld returned 1 exit status
       make: *** [perf] Error 1
      
      This patch fixes this by adding TRACEEVENT-CFLAGS file like
      PERF-CFLAGS to track those changes.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1341559297-25725-2-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      52b5c0d4
    • Kirill A. Shutemov's avatar
      perf tools: Fix build error with bison 2.6 · 043d1a5c
      Kirill A. Shutemov authored
      Bison 2.6 started to generate parse_events_parse() declaration in header. In
      this case we have redundant redeclaration:
      
      util/parse-events.c:29:5: error: redundant redeclaration of ‘parse_events_parse’ [-Werror=redundant-decls]
      In file included from util/parse-events.c:14:0:
      util/parse-events-bison.h:99:5: note: previous declaration of ‘parse_events_parse’ was here
      cc1: all warnings being treated as errors
      
      Let's disable -Wredundant-decls for util/parse-events.c since it includes
      header we can't control.
      Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
      Cc: Ingo Molnar <mingo@redhat.com>
      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/20120723210407.GA25186@shutemov.nameSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      043d1a5c
    • Kirill A. Shutemov's avatar
      perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific · 4cc49d4d
      Kirill A. Shutemov authored
      Perf uses GNU-specific version of strerror_r(). The GNU-specific strerror_r()
      returns a pointer to a string containing the error message.  This may be either
      a pointer to a string that the function stores in buf, or a pointer to some
      (immutable) static string (in which case buf is unused).
      
      In glibc-2.16 GNU version was marked with attribute warn_unused_result.  It
      triggers few warnings in perf:
      
      util/target.c: In function ‘perf_target__strerror’:
      util/target.c:114:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
      ui/browsers/hists.c: In function ‘hist_browser__dump’:
      ui/browsers/hists.c:981:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
      
      They are bugs.
      
      Let's fix strerror_r() usage.
      Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
      Acked-by: default avatarUlrich Drepper <drepper@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/20120723210654.GA25248@shutemov.name
      [ committer note: s/assert/BUG_ON/g ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4cc49d4d
    • Jovi Zhang's avatar
      perf tools: Make the breakpoint events sample period default to 1 · 4a841d65
      Jovi Zhang authored
      There have one problem about hw_breakpoint perf event, as watched, the
      events reported to userspace is not correctly, sometime one trigger
      bp_event report several events, sometime bp_event cannot go through to
      user.
      
      The root cause is attr->freq is 1 passed to kernel defaultly in bp
      events, this make kernel calculate event period not as expect, make
      sample period to 1 will change attr->freq to 0, to fix this problem.
      
      This patch is similar with commit f92128 about tracepoint events:
          perf: Make the trace events sample period default to 1
      Signed-off-by: default avatarJovi Zhang <bookjovi@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/CACV3sbLF8taiCq_VYW-sgRJyupeMzg58C7ZXfMe3xZUiH_Mx6w@mail.gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4a841d65
    • Jiri Olsa's avatar
      perf test: Add dso data caching tests · f7add556
      Jiri Olsa authored
      Adding automated test for DSO data reading. Testing raw/cached reads
      from different file/cache locations.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1342959280-5361-18-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f7add556
    • Jiri Olsa's avatar
      perf symbols: Add dso data caching · 4dff624a
      Jiri Olsa authored
      Adding dso data caching so we don't need to open/read/close, each time
      we want dso data.
      
      The DSO data caching affects following functions:
        dso__data_read_offset
        dso__data_read_addr
      
      Each DSO read tries to find the data (based on offset) inside the cache.
      If it's not present it fills the cache from file, and returns the data.
      If it is present, data are returned with no file read.
      
      Each data read is cached by reading cache page sized/aligned amount of
      DSO data. The cache page size is hardcoded to 4096.  The cache is using
      RB tree with file offset as a sort key.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1342959280-5361-17-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4dff624a
    • Jiri Olsa's avatar
      perf symbols: Add interface to read DSO image data · 949d160b
      Jiri Olsa authored
      Adding following interface for DSO object to allow
      reading of DSO image data:
      
        dso__data_fd
          - opens DSO and returns file descriptor
            Binary types are used to locate/open DSO in following order:
              DSO_BINARY_TYPE__BUILD_ID_CACHE
              DSO_BINARY_TYPE__SYSTEM_PATH_DSO
            In other word we first try to open DSO build-id path,
            and if that fails we try to open DSO system path.
      
        dso__data_read_offset
          - reads DSO data from specified offset
      
        dso__data_read_addr
          - reads DSO data from specified address/map.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Ulrich Drepper <drepper@gmail.com>
      Link: http://lkml.kernel.org/r/1342959280-5361-11-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      949d160b