1. 07 Aug, 2009 36 commits
  2. 06 Aug, 2009 4 commits
    • Peter Zijlstra's avatar
      perf_counter: Fix double list iteration in per task precise stats · 1054598c
      Peter Zijlstra authored
      Brice Goglin reported this crash with per task precise stats:
      
      > I finally managed to test the threaded perfcounter statistics (thanks a
      > lot for implementing it). I am running 2.6.31-rc5 (with the AMD
      > magny-cours patches but I don't think they matter here). I am trying to
      > measure local/remote memory accesses per thread during the well-known
      > stream benchmark. It's compiled with OpenMP using 16 threads on a
      > quad-socket quad-core barcelona machine.
      >
      > Command line is:
      >  /mnt/scratch/bgoglin/cpunode/linux-2.6.31/tools/perf/perf record -f -s
      > -e r1000001e0 -e r1000002e0 -e r1000004e0 -e r1000008e0 ./stream
      >
      > It seems to work fine with a single -e <counter> on the command line
      > while it crashes when there are at least 2 of them.
      > It seems to work fine without -s as well.
      
      A silly copy-paste resulted in a messed up iteration which would
      cause the OOPS.
      Reported-by: default avatarBrice Goglin <Brice.Goglin@inria.fr>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Tested-by: default avatarBrice Goglin <Brice.Goglin@inria.fr>
      LKML-Reference: <1249574786.32113.550.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      1054598c
    • Peter Zijlstra's avatar
      perf: Auto-detect libelf · 9424edc2
      Peter Zijlstra authored
      Adds autodetection for libelf as well, and simplifies the
      libbfd code. Furthermore, fail make with an error when libelf
      is not found and warn about the lack of libbfd.
      
      Also provide an option to build a 32bit version even though you
      might be running a 64bit kernel.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9424edc2
    • Arnaldo Carvalho de Melo's avatar
      perf symbol: Fix symbol parsing in certain cases: use the build-id as a symlink · 4d1e00a8
      Arnaldo Carvalho de Melo authored
      In some cases distros have binaries and debuginfo in weird places:
      
      [root@doppio tuna]# ls -la /usr/lib64/{xulrunner-1.9.1/xulrunner-stub,firefox-3.5.2/firefox}
      -rwxr-xr-x 1 root root 90024 2009-08-03 19:45 /usr/lib64/firefox-3.5.2/firefox
      -rwxr-xr-x 1 root root 90024 2009-08-03 18:23 /usr/lib64/xulrunner-1.9.1/xulrunner-stub
      [root@doppio tuna]# sha1sum /usr/lib64/{xulrunner-1.9.1/xulrunner-stub,firefox-3.5.2/firefox}
      19a858077d263d5de22c9c5da250d3e4396ae739  /usr/lib64/xulrunner-1.9.1/xulrunner-stub
      19a858077d263d5de22c9c5da250d3e4396ae739  /usr/lib64/firefox-3.5.2/firefox
      [root@doppio tuna]# rpm -qf /usr/lib64/{xulrunner-1.9.1/xulrunner-stub,firefox-3.5.2/firefox}
      xulrunner-1.9.1.2-1.fc11.x86_64
      firefox-3.5.2-2.fc11.x86_64
      [root@doppio tuna]# ls -la /usr/lib/debug/{usr/lib64/xulrunner-1.9.1/xulrunner-stub,usr/lib64/firefox-3.5.2/firefox}.debug
      ls: cannot access /usr/lib/debug/usr/lib64/firefox-3.5.2/firefox.debug: No such file or directory
      -rwxr-xr-x 1 root root 403608 2009-08-03 18:22 /usr/lib/debug/usr/lib64/xulrunner-1.9.1/xulrunner-stub.debug
      
      Seemingly we don't have a .symtab when we actually can find it
      if we use the .note.gnu.build-id ELF section put in place by
      some distros. Use it and find the symbols we need.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4d1e00a8
    • Benjamin Herrenschmidt's avatar
      perf_counter/powerpc: Check oprofile_cpu_type for NULL before using it · e0d82a0a
      Benjamin Herrenschmidt authored
      If the current CPU doesn't support performance counters,
      cur_cpu_spec->oprofile_cpu_type can be NULL. The current
      perf_counter modules don't test for that case and would thus
      crash at boot time.
      
      Bug reported by David Woodhouse.
      Reported-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      LKML-Reference: <19066.48028.446975.501454@cargo.ozlabs.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e0d82a0a