1. 25 Sep, 2014 3 commits
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Monitor POLLERR and POLLHUP events too · 8179672c
      Arnaldo Carvalho de Melo authored
      We want to know when the fd went away, like when a monitored thread
      exits.
      
      If we do not monitor such events, then the tools will wait forever on
      events from a vanished thread, like when running:
      
       $ sleep 5s &
       $ perf record -p `pidof sleep`
      
      This builds upon the kernel patch by Jiri Olsa that actually makes a
      poll on those file descriptors to return POLLHUP.
      
      It is also needed to change the tools to use
      perf_evlist__filter_pollfd() to check if there are remainings fds to
      monitor or if all are gone, in which case they will exit the
      poll/mmap/read loop.
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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-a4fslwspov0bs69nj825hqpq@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8179672c
    • Arnaldo Carvalho de Melo's avatar
      perf tests: Add test for perf_evlist__filter_pollfd() · 54dbfae3
      Arnaldo Carvalho de Melo authored
      That will use a synthetic evlist with just what is touched by this new
      method to check that it works as expected.
      
      Output in verbose mode:
      
        $ perf test -v pollfd
        33: Filter fds with revents mask in a pollfd array         :
        --- start ---
        filtering all but pollfd[2]:
        before:   5 [ 5, 4, 3, 2, 1 ]
         after:   1 [ 3 ]
        filtering all but (pollfd[0], pollfd[3]):
        before:   5 [ 5, 4, 3, 2, 1 ]
         after:   2 [ 5, 2 ]
        test child finished with 0
        ---- end ----
        Filter fds with revents mask in a pollfd array: Ok
        $
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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-x7c8liszdvc3ocmanf2cet8p@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      54dbfae3
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Introduce perf_evlist__filter_pollfd method · 1ddec7f0
      Arnaldo Carvalho de Melo authored
      To remove all entries in evlist->pollfd[] that have revents matching at
      least one of the bits in the specified mask.
      
      It'll adjust evlist->nr_fds to the number of unfiltered fds and will
      return this value, as a convenience and to avoid requiring direct access
      to internal state of perf_evlist objects.
      
      This will be used after polling the evlist fds so that we remove fds
      that were closed by the kernel.
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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-y2sca7z3wicvvy40a50lozwm@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1ddec7f0
  2. 24 Sep, 2014 13 commits
  3. 19 Sep, 2014 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 4f7cf3a9
      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 improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
        o Add +field argument support for --sort option (Jiri Olsa)
      
        o Do not access kallsyms when analyzing user binaries with 'probe' (Masami Hiramatsu)
      
        o Ignore stripped vmlinux and fallback to kallsyms (Anton Blanchard)
      
        o Add path to Ubuntu kernel debuginfo file (Anton Blanchard)
      
        o Disable kernel symbol demangling by default (Avi Kivity)
      
      Infrastructure changes:
      
        o More intel PT prep work, from Adrian Hunter, including:
      
          - Let a user specify a PMU event without any config terms
          - Add perf-with-kcore script
          - Let default config be defined for a PMU
          - Add perf_pmu__scan_file()
      
        o "perf kvm stat report" improvements by Alexander Yarygin:
          o  Save pid string in opts.target.pid
          o  Enable the target.system_wide flag
          o  Unify the title bar output
      
        o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
      
        o Allow to specify lib compile variable for spec usage (Jiri Olsa)
      
        o Fix build on ARM (Stephane Eranian)
      
        o Fix build on powerpc when DWARF support is disabled (Anton Blanchard)
      
        o Don't include sys/poll.h directly (Arnaldo Carvalho de Melo)
      
        o Use ring buffer consume method to look like other tools (Arnaldo Carvalho de Melo)
      
        o Allow to specify lib compile variable for spec usage (Jiri Olsa)
      
        o Fix GNU-only grep usage in Makefile (John Spencer)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4f7cf3a9
  4. 17 Sep, 2014 20 commits
  5. 16 Sep, 2014 1 commit
  6. 09 Sep, 2014 2 commits