1. 23 7月, 2010 2 次提交
  2. 22 7月, 2010 1 次提交
    • T
      x86 cpufreq, perf: Make trace_power_frequency cpufreq driver independent · 4c21adf2
      Thomas Renninger 提交于
      and fix the broken case if a core's frequency depends on others.
      
      trace_power_frequency was only implemented in a rather ungeneric
      way in acpi-cpufreq driver's target() function only.
      
      -> Move the call to trace_power_frequency to
         cpufreq.c:cpufreq_notify_transition() where CPUFREQ_POSTCHANGE
         notifier is triggered.
         This will support power frequency tracing by all cpufreq
         drivers.
      
      trace_power_frequency did not trace frequency changes correctly
      when the userspace governor was used or when CPU cores'
      frequency depend on each other.
      
      -> Moving this into the CPUFREQ_POSTCHANGE notifier and pass the cpu
         which gets switched automatically fixes this.
      
      Robert Schoene provided some important fixes on top of my
      initial quick shot version which are integrated in this patch:
      - Forgot some changes in power_end trace (TP_printk/variable names)
      - Variable dummy in power_end must now be cpu_id
      - Use static 64 bit variable instead of unsigned int for cpu_id
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Cc: davej@codemonkey.org.uk
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Acked-by: NArjan van de Ven <arjan@infradead.org>
      Cc: Robert Schoene <robert.schoene@tu-dresden.de>
      Tested-by: NRobert Schoene <robert.schoene@tu-dresden.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      4c21adf2
  3. 18 7月, 2010 3 次提交
  4. 16 7月, 2010 3 次提交
  5. 15 7月, 2010 1 次提交
  6. 12 7月, 2010 1 次提交
  7. 08 7月, 2010 2 次提交
    • F
      perf: Sync callchains with period based hits · 108553e1
      Frederic Weisbecker 提交于
      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: NFrederic 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
    • F
      perf: Resurrect flat callchains · 97aa1052
      Frederic Weisbecker 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic 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
  8. 06 7月, 2010 3 次提交
    • M
      perf probe: Support static and global variables · b7dcb857
      Masami Hiramatsu 提交于
      Add static and global variables support to perf probe.
      This allows user to trace non-local variables (and
      structure members) at probe points.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100519195749.2885.17451.stgit@localhost6.localdomain6>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b7dcb857
    • M
      perf probe: Support tracing an entry of array · b2a3c12b
      Masami Hiramatsu 提交于
      Add array-entry tracing support to perf probe. This enables to trace an entry
      of array which is indexed by constant value, e.g. array[0].
      
      For example:
      
        $ perf probe -a 'bio_split bi->bi_io_vec[0]'
      
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100519195742.2885.5344.stgit@localhost6.localdomain6>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b2a3c12b
    • M
      perf probe: Support "string" type · 73317b95
      Masami Hiramatsu 提交于
      Support string type casting to event argument. If perf-probe finds an argument
      casted as string, it ensures the target variable is "(unsigned/signed) char
      *(or []). perf-probe also adds dereference if the target is a pointer.
      
      So, both of 'char buf[10];' and 'char *buf;' can be accessed by 'buf:string'
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100519195734.2885.1666.stgit@localhost6.localdomain6>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      73317b95
  9. 05 7月, 2010 2 次提交
  10. 02 7月, 2010 2 次提交
  11. 30 6月, 2010 1 次提交
  12. 25 6月, 2010 4 次提交
  13. 22 6月, 2010 4 次提交
  14. 18 6月, 2010 4 次提交
    • T
      perf scripts perl: Makefile fix · bfde7448
      Tom Zanussi 提交于
      Fix a typo introduced by recent Makefile changes, in f9af3a4c.  Without it, Perl
      scripting support won't get compiled in.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <1276836006.7762.15.camel@tropicana>
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bfde7448
    • I
      perf record: prevent kill(0, SIGTERM); · 5ffc8881
      Ian Munsie 提交于
      At exit, perf record will kill the process it was profiling by sending a
      SIGTERM to child_pid (if it had been initialised), but in certain situations
      child_pid may be 0 and perf would mistakenly kill more processes than intended.
      
      child_pid is set to the return of fork() to either 0 or the pid of the child.
      Ordinarily this would not present an issue as the child calls execvp to spawn
      the process to be profiled and would therefore never run it's sig_atexit and
      never attempt to kill pid 0.
      
      However, if a nonexistant binary had been passed in to perf record the call to
      execvp would fail and child_pid would be left set to 0. The child would then
      exit and it's atexit handler, finding that child_pid was initialised to 0,
      would call kill(0, SIGTERM), resulting in every process within it's process
      group being killed.
      
      In the case that perf was being run directly from the shell this typically
      would not be an issue as the shell isolates the process.  However, if perf was
      being called from another program it could kill unexpected processes, which may
      even include X.
      
      This patch changes the logic of the test for whether child_pid was initialised
      to only consider positive pids as valid, thereby never attempting to kill pid
      0.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <1276072680-17378-1-git-send-email-imunsie@au1.ibm.com>
      Signed-off-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5ffc8881
    • A
      perf session: fix error message on failure to open perf.data · 0f2c3de2
      Andy Isaacson 提交于
      If we cannot open our data file, print strerror(errno) for a more
      comprehensible error message; and only suggest 'perf record' on ENOENT.
      
      In particular, this fixes the nonsensical advice when:
      
          % sudo perf record sleep 1
          [ perf record: Woken up 1 times to write data ]
          [ perf record: Captured and wrote 0.009 MB perf.data (~381 samples) ]
          % perf trace
          failed to open file: perf.data  (try 'perf record' first)
          %
      
      Cc: Ingo Molnar <mingo@elte.hu>
      LPU-Reference: <20100612033615.GA24731@hexapodia.org>
      Signed-off-by: NAndy Isaacson <adi@hexapodia.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0f2c3de2
    • A
      perf debug: fix hex dump partial final line · 84c104ad
      Andy Isaacson 提交于
      The loop counter math in trace_event was much more complicated than
      necessary, resulting in incorrectly decoding the human-readable
      portion of the partial last line of hexdump in "perf trace -D" output:
      
      .  0020:  00 00 00 00 00 00 00 00 2f 73 62 69 6e 2f 69 6e  ......../sbin/i
      .  0030:  69 74 00 00 00 00 00 00                          /sbin/i
      
      With this fixed (and simpler!) code, we get the correct output:
      
      .  0020:  00 00 00 00 00 00 00 00 2f 73 62 69 6e 2f 69 6e  ......../sbin/in
      .  0030:  69 74 00 00 00 00 00 00                          it......
      
      Cc: Ingo Molnar <mingo@elte.hu>
      LPU-Reference: <20100612024404.GA24469@hexapodia.org>
      Signed-off-by: NAndy Isaacson <adi@hexapodia.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      84c104ad
  15. 17 6月, 2010 6 次提交
    • C
      perf probe: Add kernel source path option · 9ed7e1b8
      Chase Douglas 提交于
      The probe plugin requires access to the source code for some operations.  The
      source code must be in the exact same location as specified by the DWARF tags,
      but sometimes the location is an absolute path that cannot be replicated by a
      normal user. This change adds the -s|--source option to allow the user to
      specify the root of the kernel source tree.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      LKML-Reference: <1276543590-10486-1-git-send-email-chase.douglas@canonical.com>
      Signed-off-by: NChase Douglas <chase.douglas@canonical.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9ed7e1b8
    • K
      perf tools: .gitignore += config.make config.make.autogen · cfc21cc6
      Kirill Smelkov 提交于
      These are local-configuration files and should be ignored.
      
      LKML-Reference: <1276516847-25817-1-git-send-email-kirr@landau.phys.spbu.ru>
      Signed-off-by: NKirill Smelkov <kirr@landau.phys.spbu.ru>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cfc21cc6
    • S
      perf record: Add option to avoid updating buildid cache · a1ac1d3c
      Stephane Eranian 提交于
      There are situations where there is enough information in the perf.data
      to process the samples. Updating the buildid cache may add unecessary
      overhead in terms of disk space and time (copying large elf images).
      
      A persistent option to do this already exists via the perfconfig file,
      simply do:
      
      [buildid]
      dir = /dev/null
      
      This patch provides a way to suppress builid cache updates on a per-run
      basis.  It addds a new option, -N, to perf record. Buildids are still
      generated in the perf.data file.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4c19ef89.93ecd80a.40dc.fffff8e9@mx.google.com>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a1ac1d3c
    • E
      perf symbols: Function descriptor symbol lookup · 70c3856b
      Eric B Munson 提交于
      Currently symbol resolution does not work for 64-bit programs on architectures
      that use function descriptors such as ppc64.
      
      The problem is that a symbol doesn't point to a text address, it points to a
      data area that contains (amongst other things) a pointer to the text address.
      
      We look for a section called ".opd" which is the function descriptor area. To
      create the full symbol table, when we see a symbol in the function descriptor
      section we load the first pointer and use that as the text address.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <1276523793-15422-1-git-send-email-ebmunson@us.ibm.com>
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NEric B Munson <ebmunson@us.ibm.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      70c3856b
    • S
      perf record: Avoid synthesizing mmap() for all processes in per-thread mode · cf103a14
      Stephane Eranian 提交于
      A bug was introduced by commit c45c6ea2.
      
      Perf record was scanning /proc/PID to create synthetic PERF_RECOR_MMAP
      entries even though it was running in per-thread mode. There was a bogus
      check to select what mmaps to synthesize. We only need all processes in
      system-wide mode.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <4c192107.4f1ee30a.4316.fffff98e@mx.google.com>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cf103a14
    • A
      perf session: Remove threads from tree on PERF_RECORD_EXIT · 720a3aeb
      Arnaldo Carvalho de Melo 提交于
      Move them to a session->dead_threads list just like we do with maps that
      are replaced, because we may have hist_entries pointing to them.
      
      This fixes a bug when inserting maps for a new thread that reused the
      TID, mixing maps for two different threads, causing an endless loop.
      
      The code for insering maps should be made more robust but for .35 this
      is the minimalistic patch.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      720a3aeb
  16. 10 6月, 2010 1 次提交