1. 22 Jul, 2010 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf annotate: Fix handling of goto labels that are valid hex numbers · 70a7cb3b
      Arnaldo Carvalho de Melo authored
      When parsing the objdump disassembly output we can have goto labels that
      are valid hex numbers and thus get confused with lines with machine
      code.
      
      Handle the common case of a label that has nothing after it and other
      cases where there is just source code by validating the resulting "ip".
      
      It is still possible that we find goto labels that are in the function
      address range, but only if they are located before the real address we
      should be OK.
      
      A change in the objdump output to have a clear marker separating
      addresses from the disassembly would come handy, but we would still have
      to deal with older versions.
      Reported-by: default avatarGleb Natapov <gleb@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <20100722170541.GF17631@ghostprotocols.net>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      70a7cb3b
  2. 20 Jul, 2010 1 commit
    • Sam Ravnborg's avatar
      tracing: Properly align linker defined symbols · 07fca0e5
      Sam Ravnborg authored
      We define a number of symbols in the linker scipt like this:
      
          __start_syscalls_metadata = .;
          *(__syscalls_metadata)
      
      But we do not know the alignment of "." when we assign
      the __start_syscalls_metadata symbol.
      gcc started to uses bigger alignment for structs (32 bytes),
      so we saw situations where the linker due to alignment
      constraints increased the value of "." after the symbol assignment.
      
      This resulted in boot fails.
      
      Fix this by forcing a 32 byte alignment of "." before the
      assignment.
      
      This patch introduces the forced alignment for
      ftrace_events and syscalls_metadata.
      It may be required in more places.
      Reported-by: default avatarZeev Tarantov <zeev.tarantov@gmail.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      LKML-Reference: <20100710063459.GA14596@merkur.ravnborg.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      07fca0e5
  3. 16 Jul, 2010 2 commits
    • Gui Jianfeng's avatar
      perf symbols: Fix directory descriptor leaking · 74534341
      Gui Jianfeng authored
      When I ran "perf kvm ... top", I encountered the following error output.
      
        Error: perfcounter syscall returned with -1 (Too many open files)
      
        Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?
      
      Looking into perf, I found perf opens too many directories at
      initialization time, but forgets to close them. Here is the fix.
      
      LKML-Reference: <4C230362.5080704@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarGui Jianfeng <guijianfeng@cn.fujitsu.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      74534341
    • Frederic Weisbecker's avatar
      perf: Fix various display bugs with parent filtering · 58c34390
      Frederic Weisbecker authored
      Hists that have been filtered, because they don't have callchains
      matching the parent filter, won't be printed. As such,
      hist_entry__snprintf() returns 0 for them, but we don't control
      this value and we always print the buffer, which might be
      untouched and then only made of random stack garbage.
      
      Not only does it paint the screen with barf, it also prints
      the callchains for these hists, even though they have been filtered,
      since the hist has been filtered as well.
      
      We need to check the return value of hist_entry__snprintf() and
      ignore the hist if it is 0, which means it didn't get any callchain
      matching the parent filter. This fixes the barf and the undesired
      callchains.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      58c34390
  4. 09 Jul, 2010 1 commit
  5. 08 Jul, 2010 2 commits
    • Frederic Weisbecker's avatar
      perf: Sync callchains with period based hits · 108553e1
      Frederic Weisbecker authored
      Hists have their hits increased by the event period. And this
      period based counting is the foundation of all the stats in
      perf report.
      
      But callchains still use the raw number of hits, without taking
      the period into account. So when we compute the percentage,
      absolute based percentages are totally broken, and relative ones
      too in the first parent level. Because we pass the number of events
      muliplied by their period as the total number of hits to the
      callchain filtering, while callchains expect this number to be
      the number of raw hits.
      
      perf report -g graph was simply not working, showing no graph unless
      the min percent was zero. And even there the percentage of the
      branches was always 0. And may be fractal filtering was broken on
      the first branch level too.
      
      flat also was broken, but it was hidden because of other breakages.
      
      Anyway fix this by counting using periods on callchains.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      108553e1
    • Frederic Weisbecker's avatar
      perf: Resurrect flat callchains · 97aa1052
      Frederic Weisbecker authored
      Initialize the callchain radix tree root correctly.
      
      When we walk through the parents, we must stop after the root, but
      since it wasn't well initialized, its parent pointer was random.
      
      Also the number of hits was random because uninitialized, hence it
      was part of the callchain while the root doesn't contain anything.
      
      This fixes segfaults and percentages followed by empty callchains
      while running:
      
      	perf report -g flat
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: 2.6.31.x-2.6.34.x <stable@kernel.org>
      97aa1052
  6. 05 Jul, 2010 10 commits
  7. 04 Jul, 2010 1 commit
    • Will Deacon's avatar
      ARM: 6205/1: perf: ensure counter delta is treated as unsigned · 446a5a8b
      Will Deacon authored
      Hardware performance counters on ARM are 32-bits wide but atomic64_t
      variables are used to represent counter data in the hw_perf_event structure.
      
      The armpmu_event_update function right-shifts a signed 64-bit delta variable
      and adds the result to the event count. This can lead to shifting in sign-bits
      if the MSB of the 32-bit counter value is set. This results in perf output
      such as:
      
       Performance counter stats for 'sleep 20':
      
       18446744073460670464  cycles             <-- 0xFFFFFFFFF12A6000
              7783773  instructions             #      0.000 IPC
                  465  context-switches
                  161  page-faults
              1172393  branches
      
         20.154242147  seconds time elapsed
      
      This patch ensures that the delta value is treated as unsigned so that the
      right shift sets the upper bits to zero.
      
      Cc: <stable@kernel.org>
      Acked-by: default avatarJamie Iles <jamie.iles@picochip.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      446a5a8b
  8. 03 Jul, 2010 1 commit
  9. 02 Jul, 2010 15 commits
  10. 01 Jul, 2010 6 commits