1. 13 Jan, 2014 33 commits
  2. 12 Jan, 2014 4 commits
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 1341f3e4
      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 updates from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      Improvements:
      
       * Support showing source code, asking for variables to be collected
         at probe time and other 'perf probe' operations that use DWARF information.
      
         This supports only binaries with debugging information at this time, detached
         debuginfo (aka debuginfo packages) support should come in later patches.
         (Masami Hiramatsu)
      
       * Add a perf.data file header window in the 'perf report' TUI, associated
         with the 'i' hotkey, providing a counterpart to the --header option in the
         stdio UI. (Namhyung Kim)
      
       * Guest related improvements to 'perf kvm', including allowing to
         specify a directory with guest specific /proc information. (Dongsheng Yang)
      
       * Print session information only if --stdio is given (Namhyung Kim)
      
      Developer stuff:
      
      Fixes:
      
       * Get rid of a duplicate va_end() in error reporting (Namhyung Kim)
      
       * If a hist entry doesn't have symbol information, compare it with its
         address. Affects upcoming new feature (--cumulate) (Namhyung Kim)
      
      Improvements:
      
       * Make libtraceevent install target quieter (Jiri Olsa)
      
       * Make tests/make output more compact (Jiri Olsa)
      
       * Ignore generated files in feature-checks (Chunwei Chen)
      
      New APIs:
      
       * Introduce pevent_filter_strerror() in libtraceevent, similar in
         purpose to libc's strerror() function. (Namhyung Kim)
      
      Refactorings:
      
       * Use perf_data_file methods to write output file in 'record' and
         'inject' (Jiri Olsa)
      
       * Use pr_*() functions where applicable in 'report' (Namhyumg Kim)
      
       * Add 'machine' 'addr_location' struct to have full picture (machine,
         thread, map, symbol, addr) for a (partially) resolved address, reducing
         function signatures (Arnaldo Carvalho de Melo)
      
       * Reduce code duplication in the histogram entry creation/insertion. (Arnaldo Carvalho de Melo)
      
       * Auto allocate annotation histogram data structures, (Arnaldo Carvalho de Melo)
      
       * No need to test against NULL before calling free, also set
         freed memory in struct pointers to NULL, to help fixing use after
         free bugs. (Arnaldo Carvalho de Melo>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1341f3e4
    • Yann Droneaud's avatar
      perf: Introduce a flag to enable close-on-exec in perf_event_open() · a21b0b35
      Yann Droneaud authored
      Unlike recent modern userspace API such as:
      
        epoll_create1 (EPOLL_CLOEXEC), eventfd (EFD_CLOEXEC),
        fanotify_init (FAN_CLOEXEC), inotify_init1 (IN_CLOEXEC),
        signalfd (SFD_CLOEXEC), timerfd_create (TFD_CLOEXEC),
        or the venerable general purpose open (O_CLOEXEC),
      
      perf_event_open() syscall lack a flag to atomically set FD_CLOEXEC
      (eg. close-on-exec) flag on file descriptor it returns to userspace.
      
      The present patch adds a PERF_FLAG_FD_CLOEXEC flag to allow
      perf_event_open() syscall to atomically set close-on-exec.
      
      Having this flag will enable userspace to remove the file descriptor
      from the list of file descriptors being inherited across exec,
      without the need to call fcntl(fd, F_SETFD, FD_CLOEXEC) and the
      associated race condition between the current thread and another
      thread calling fork(2) then execve(2).
      
      Links:
      
       - Secure File Descriptor Handling (Ulrich Drepper, 2008)
         http://udrepper.livejournal.com/20407.html
      
       - Excuse me son, but your code is leaking !!! (Dan Walsh, March 2012)
         http://danwalsh.livejournal.com/53603.html
      
       - Notes in DMA buffer sharing: leak and security hole
         http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/dma-buf-sharing.txt?id=v3.13-rc3#n428Signed-off-by: default avatarYann Droneaud <ydroneaud@opteya.com>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/8c03f54e1598b1727c19706f3af03f98685d9fe6.1388952061.git.ydroneaud@opteya.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a21b0b35
    • Stephane Eranian's avatar
      perf/x86/intel: Add Intel RAPL PP1 energy counter support · f228c5b8
      Stephane Eranian authored
      This patch adds support for the Intel RAPL energy counter
      PP1 (Power Plane 1).
      
      On client processors, it usually corresponds to the
      energy consumption of the builtin graphic card. That
      is why the sysfs event is called energy-gpu.
      
      New event:
       - name: power/energy-gpu/
       - code: event=0x4
       - unit: 2^-32 Joules
      
      On processors without graphics, this should count 0.
      The patch only enables this event on client processors.
      Reviewed-by: default avatarMaria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: ak@linux.intel.com
      Cc: acme@redhat.com
      Cc: jolsa@redhat.com
      Cc: zheng.z.yan@intel.com
      Cc: bp@alien8.de
      Cc: vincent.weaver@maine.edu
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1389176153-3128-3-git-send-email-eranian@google.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f228c5b8
    • Stephane Eranian's avatar
      perf/x86: Fix active_entry initialization · f3ae75de
      Stephane Eranian authored
      This patch fixes a problem with the initialization of the
      struct perf_event active_entry field. It is defined inside
      an anonymous union and was initialized in perf_event_alloc()
      using INIT_LIST_HEAD(). However at that time, we do not know
      whether the event is going to use active_entry or hlist_entry (SW).
      Or at last, we don't want to make that determination there.
      The problem is that hlist and list_head are not initialized
      the same way. One is okay with NULL (from kzmalloc), the other
      needs to pointers to point to self.
      
      This patch resolves this problem by dropping the union.
      This will avoid problems later on, if someone starts using
      active_entry or hlist_entry without verifying that they
      actually overlap. This also solves the initialization
      problem.
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: ak@linux.intel.com
      Cc: acme@redhat.com
      Cc: jolsa@redhat.com
      Cc: zheng.z.yan@intel.com
      Cc: bp@alien8.de
      Cc: vincent.weaver@maine.edu
      Cc: maria.n.dimakopoulou@gmail.com
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1389176153-3128-2-git-send-email-eranian@google.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f3ae75de
  3. 27 Dec, 2013 2 commits
  4. 26 Dec, 2013 1 commit