1. 04 Feb, 2010 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Remove perf_session usage in symbols layer · 9de89fe7
      Arnaldo Carvalho de Melo authored
      I noticed while writing the first test in 'perf regtest' that to
      just test the symbol handling routines one needs to create a
      perf session, that is a layer centered on a perf.data file,
      events, etc, so I untied these layers.
      
      This reduces the complexity for the users as the number of
      parameters to most of the symbols and session APIs now was
      reduced while not adding more state to all the map instances by
      only having data that is needed to split the kernel (kallsyms
      and ELF symtab sections) maps and do vmlinux relocation on the
      main kernel map.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1265223128-11786-1-git-send-email-acme@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9de89fe7
  2. 03 Feb, 2010 1 commit
    • Xiao Guangrong's avatar
      perf tools: Use O_LARGEFILE to open perf data file · b8f46c5a
      Xiao Guangrong authored
      Open perf data file with O_LARGEFILE flag since its size is
      easily larger that 2G.
      
      For example:
      
       # rm -rf perf.data
       # ./perf kmem record sleep 300
      
       [ perf record: Woken up 0 times to write data ]
       [ perf record: Captured and wrote 3142.147 MB perf.data
       (~137282513 samples) ]
      
       # ll -h perf.data
       -rw------- 1 root root 3.1G .....
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4B68F32A.9040203@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b8f46c5a
  3. 31 Jan, 2010 6 commits
    • Ingo Molnar's avatar
      perf lock: Clean up various details · 59f411b6
      Ingo Molnar authored
      Fix up a few small stylistic details:
      
       - use consistent vertical spacing/alignment
       - remove line80 artifacts
       - group some global variables better
       - remove dead code
      
      Plus rename 'prof' to 'report' to make it more in line with other
      tools, and remove the line/file keying as we really want to use
      IPs like the other tools do.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1264851813-8413-12-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      59f411b6
    • Hitoshi Mitake's avatar
      perf lock: Introduce new tool "perf lock", for analyzing lock statistics · 9b5e350c
      Hitoshi Mitake authored
      Adding new subcommand "perf lock" to perf.
      
      I have a lot of remaining ToDos, but for now perf lock can
      already provide minimal functionality for analyzing lock
      statistics.
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1264851813-8413-12-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9b5e350c
    • Hitoshi Mitake's avatar
      perf lock: Enhance information of lock trace events · c965be10
      Hitoshi Mitake authored
      Add wait time and lock identification details.
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1264851813-8413-11-git-send-email-mitake@dcl.info.waseda.ac.jp>
      [ removed the file/line bits as we can do that better via IPs ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c965be10
    • Hitoshi Mitake's avatar
      perf: Add util/include/linuxhash.h to include hash.h of kernel · 18e97e06
      Hitoshi Mitake authored
      linux/hash.h, hash header of kernel, is also useful for perf.
      
      util/include/linuxhash.h includes linux/hash.h, so we can use
      hash facilities (e.g. hash_long()) in perf now.
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1264851813-8413-3-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      18e97e06
    • Hitoshi Mitake's avatar
      perf tools: Add __data_loc support · 86d8d296
      Hitoshi Mitake authored
      This patch is required to test the next patch for perf lock.
      
      At 064739bc ,
      support for the modifier "__data_loc" of format is added.
      
      But, when I wanted to parse format of lock_acquired (or some
      event else), raw_field_ptr() did not returned correct pointer.
      
      So I modified raw_field_ptr() like this patch. Then
      raw_field_ptr() works well.
      Signed-off-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Steven Rostedt <srostedt@redhat.com>
      LKML-Reference: <1264851813-8413-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
      [ v3: fixed minor stylistic detail ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      86d8d296
    • Hitoshi Mitake's avatar
      Revert "perf record: Intercept all events" · a8e6f734
      Hitoshi Mitake authored
      This reverts commit f5a2c3dc.
      
      This patch is required for making "perf lock rec" work.
      The commit f5a2c3dc changes write_event() of builtin-record.c
      . And changed write_event() sometimes doesn't stop with perf
      lock rec.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      [ that commit also causes perf record to not be Ctrl-C-able,
        and it's concetually wrong to parse the data at record time
        (unconditionally - even when not needed), as we eventually
        want to be able to do zero-copy recording, at least for
        non-archive recordings.  ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a8e6f734
  4. 29 Jan, 2010 29 commits
  5. 28 Jan, 2010 2 commits
    • Anton Blanchard's avatar
      perf: Fix inconsistency between IP and callchain sampling · 339ce1a4
      Anton Blanchard authored
      When running perf across all cpus with backtracing (-a -g), sometimes we
      get samples without associated backtraces:
      
          23.44%         init  [kernel]                     [k] restore
          11.46%         init                       eeba0c  [k] 0x00000000eeba0c
           6.77%      swapper  [kernel]                     [k] .perf_ctx_adjust_freq
           5.73%         init  [kernel]                     [k] .__trace_hcall_entry
           4.69%         perf  libc-2.9.so                  [.] 0x0000000006bb8c
                             |
                             |--11.11%-- 0xfffa941bbbc
      
      It turns out the backtrace code has a check for the idle task and the IP
      sampling does not. This creates problems when profiling an interrupt
      heavy workload (in my case 10Gbit ethernet) since we get no backtraces
      for interrupts received while idle (ie most of the workload).
      
      Right now x86 and sh check that current is not NULL, which should never
      happen so remove that too.
      
      Idle task's exclusion must be performed from the core code, on top
      of perf_event_attr:exclude_idle.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      LKML-Reference: <20100118054707.GT12666@kryten>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      339ce1a4
    • Mahesh Salgaonkar's avatar
      hw_breakpoints: Release the bp slot if arch_validate_hwbkpt_settings() fails. · b23ff0e9
      Mahesh Salgaonkar authored
      On a given architecture, when hardware breakpoint registration fails
      due to un-supported access type (read/write/execute), we lose the bp
      slot since register_perf_hw_breakpoint() does not release the bp slot
      on failure.
      Hence, any subsequent hardware breakpoint registration starts failing
      with 'no space left on device' error.
      
      This patch introduces error handling in register_perf_hw_breakpoint()
      function and releases bp slot on error.
      Signed-off-by: default avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: K. Prasad <prasad@linux.vnet.ibm.com>
      Cc: Maneesh Soni <maneesh@in.ibm.com>
      LKML-Reference: <20100121125516.GA32521@in.ibm.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      b23ff0e9
  6. 27 Jan, 2010 1 commit