1. 02 Apr, 2010 11 commits
    • Robert Richter's avatar
      perf, x86: Undo some some *_counter* -> *_event* renames · 948b1bb8
      Robert Richter authored
      The big rename:
      
       cdd6c482 perf: Do the big rename: Performance Counters -> Performance Events
      
      accidentally renamed some members of stucts that were named after
      registers in the spec. To avoid confusion this patch reverts some
      changes. The related specs are MSR descriptions in AMD's BKDGs and the
      ARCHITECTURAL PERFORMANCE MONITORING section in the Intel 64 and IA-32
      Architectures Software Developer's Manuals.
      
      This patch does:
      
       $ sed -i -e 's:num_events:num_counters:g' \
         arch/x86/include/asm/perf_event.h \
         arch/x86/kernel/cpu/perf_event_amd.c \
         arch/x86/kernel/cpu/perf_event.c \
         arch/x86/kernel/cpu/perf_event_intel.c \
         arch/x86/kernel/cpu/perf_event_p6.c \
         arch/x86/kernel/cpu/perf_event_p4.c \
         arch/x86/oprofile/op_model_ppro.c
      
       $ sed -i -e 's:event_bits:cntval_bits:g' -e 's:event_mask:cntval_mask:g' \
         arch/x86/kernel/cpu/perf_event_amd.c \
         arch/x86/kernel/cpu/perf_event.c \
         arch/x86/kernel/cpu/perf_event_intel.c \
         arch/x86/kernel/cpu/perf_event_p6.c \
         arch/x86/kernel/cpu/perf_event_p4.c
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1269880612-25800-2-git-send-email-robert.richter@amd.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      948b1bb8
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' into perf/core · ec5e61aa
      Ingo Molnar authored
      Conflicts:
      	arch/x86/kernel/cpu/perf_event.c
      
      Merge reason: Resolve the conflict, pick up fixes
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ec5e61aa
    • Masami Hiramatsu's avatar
      perf probe: Fix to close dwarf when failing to analyze it · 75ec5a24
      Masami Hiramatsu authored
      Fix to close libdw routine when failing to analyze it in
      find_perf_probe_point().
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      75ec5a24
    • Masami Hiramatsu's avatar
      perf probe: Correct error message for non-structure type · 12e5a7ae
      Masami Hiramatsu authored
      perf probe outputs incorrect error message when it is called with
      non-existent field on a non-data structure local variable.
      
      <Before>
       # perf probe vfs_read 'count.hoge'
        Fatal: Structure on a register is not supported yet.
       # perf probe vfs_read 'count->hoge'
        Fatal: Semantic error: hoge must be referred by '.'
      
      This corrects the messsage.
      
      <After>
       # perf probe vfs_read 'count.hoge'
        Fatal: count is not a data structure.
       # perf probe vfs_read 'count->hoge'
        Fatal: count is not a data structure.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165052.23551.75866.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      12e5a7ae
    • Masami Hiramatsu's avatar
      perf probe: Fix not to return non-matched file · c9e38582
      Masami Hiramatsu authored
      Fix cu_find_realpath() not to return the last file path
      if that is not matched to input pattern.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165045.23551.47780.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c9e38582
    • Masami Hiramatsu's avatar
      perf probe: Fix --line syntax help and document · 085ea739
      Masami Hiramatsu authored
      Just fix typos. --line option accepts ':START-END' syntax,
      not ':START:END'.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165038.23551.62590.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      085ea739
    • Mike Galbraith's avatar
      perf: Fix 'perf sched record' deadlock · 8bb39f9a
      Mike Galbraith authored
      perf sched record can deadlock a box should the holder of
      handle->data->lock take an interrupt, and then attempt to
      acquire an rq lock held by a CPU trying to acquire the
      same lock. Disable interrupts.
      
         CPU0                            CPU1
         sched event with rq->lock held
                                         grab handle->data->lock
         spin on handle->data->lock
                                         interrupt
                                         try to grab rq->lock
      Reported-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Tested-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1269598293.6174.8.camel@marge.simson.net>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8bb39f9a
    • Torok Edwin's avatar
      perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels · 257ef9d2
      Torok Edwin authored
      When profiling a 32-bit process on a 64-bit kernel, callgraph tracing
      stopped after the first function, because it has seen a garbage memory
      address (tried to interpret the frame pointer, and return address as a
      64-bit pointer).
      
      Fix this by using a struct stack_frame with 32-bit pointers when the
      TIF_IA32 flag is set.
      
      Note that TIF_IA32 flag must be used, and not is_compat_task(), because
      the latter is only set when the 32-bit process is executing a syscall,
      which may not always be the case (when tracing page fault events for
      example).
      Signed-off-by: default avatarTörök Edwin <edwintorok@gmail.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: x86@kernel.org
      Cc: linux-kernel@vger.kernel.org
      LKML-Reference: <1268820436-13145-1-git-send-email-edwintorok@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      257ef9d2
    • Peter Zijlstra's avatar
      perf, x86: Fix AMD hotplug & constraint initialization · b38b24ea
      Peter Zijlstra authored
      Commit 3f6da390 ("perf: Rework and fix the arch CPU-hotplug hooks") moved
      the amd northbridge allocation from CPUS_ONLINE to CPUS_PREPARE_UP
      however amd_nb_id() doesn't work yet on prepare so it would simply bail
      basically reverting to a state where we do not properly track node wide
      constraints - causing weird perf results.
      
      Fix up the AMD NorthBridge initialization code by allocating from
      CPU_UP_PREPARE and installing it from CPU_STARTING once we have the
      proper nb_id. It also properly deals with the allocation failing.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      [ robustify using amd_has_nb() ]
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      LKML-Reference: <1269353485.5109.48.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b38b24ea
    • Peter Zijlstra's avatar
      x86: Move notify_cpu_starting() callback to a later stage · 85257024
      Peter Zijlstra authored
      Because we need to have cpu identification things done by the time we run
      CPU_STARTING notifiers.
      
      ( This init ordering will be relied on by the next fix. )
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1269353485.5109.48.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      85257024
    • Ingo Molnar's avatar
      Merge branch 'perf/urgent' of... · 50d11d19
      Ingo Molnar authored
      Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent
      50d11d19
  2. 01 Apr, 2010 29 commits